TB.One > Order Data and Order Processing > Order Processing via XML > RETRIEVING ORDER FILES AND DOCUMENTS VIA REST

RETRIEVING ORDER FILES AND DOCUMENTS VIA REST

The REST interface is accessed via an URI which includes identification and specifies the desired actions:

https://rest.core.tradebyte.com/ACCOUNTNR/TARGET/[TARGET_ID][/ACTION]?[CHANNEL=CHID]

The export of pending orders can be activated at "Admin > Export > Orders". If necessary, additional settings can be configured in the corresponding channel's settings ("Channels > [Your Channel] > Settings").

Method

GET

Retrieves in XML format (or openTRANS)

Target/Resource

orders

orders that have not been completed yet (including pending orders if activated)

CHANNEL

?channel=CHID

for the specified channel

Parameter

&mode=tborder

The parameter "mode" will set the format of the order file to Tradebyte's "TB.Order" format. If TB.Order is not possible for your system, you can use openTRANS instead (&mode=opentrans).

Example

https://rest.core.tradebyte.com/ACCOUNTNR/orders/?channel=CHID

Response

<?xml version="1.0" encoding="UTF-8"?>

<ORDER_LIST>

<ORDER>...</ORDER>

<ORDER>...</ORDER>

</ORDER_LIST>

 

Method

GET

Retrieves (in PDF format)

Target/Resource

orders

the documents

TARGET_ID

ORDER_ID

of the specified order ID

Parameter

deliverynote

Here: delivery note

Example

https://rest.core.tradebyte.com/ACCOUNTNR/orders/ORDER_ID/deliverynote?

Response

200 OK

or PDF file

Possible errors

"TCPDF ERROR: [Image] No such file or directory in TCPDF ERROR: Some data has already been output to browser, can't send PDF file"

This means that no company logo was uploaded at "Admin > System settings > Documents".

 

Method

GET

Retrieves (in PDF format)

Target/Resource

orders

the documents

TARGET_ID

ORDER_ID

of the specified order ID

Parameter

invoice

Here: the most recent invoice

Example

https://rest.core.tradebyte.com/ACCOUNTNR/orders/ORDER_ID/invoice?

Response

200 OK

or PDF file

Possible errors

"TCPDF ERROR: [Image] No such file or directory in TCPDF ERROR: Some data has already been output to browser, can't send PDF file"

This means that no company logo was uploaded at "Admin > System settings > Documents".

 

Method

GET

Retrieves (in PDF format)

Target/Resource

orders

the documents

TARGET_ID

ORDER_ID

of the specified order ID

Parameter

shiplabel

Here: the shipping label

Example

https://rest.core.tradebyte.com/ACCOUNTNR/orders/ORDER_ID/shiplabel?

Response

200 OK

or PDF file

Possible errors

"TCPDF ERROR: [Image] No such file or directory in TCPDF ERROR: Some data has already been output to browser, can't send PDF file"

This means that no company logo was uploaded at "Admin > System settings > Documents".

 

Method

GET

Retrieves (in PDF format)

Target/Resource

orders

the documents

TARGET_ID

ORDER_ID

of the specified order ID

Parameter

returnlabel

Here: the returns label

Example

https://rest.core.tradebyte.com/ACCOUNTNR/orders/ORDER_ID/returnlabel?

Response

200 OK

or PDF file

Possible errors

"TCPDF ERROR: [Image] No such file or directory in TCPDF ERROR: Some data has already been output to browser, can't send PDF file"

This means that no company logo was uploaded at "Admin > System settings > Documents".


For further information, see also:

Order processing via REST - overview and status codes

Order processing via XML - files and naming conventions

Field descriptions - order file