TB.One > Order Data and Order Processing > Order Processing via XML > Order Processing via XML with REST

Order Processing via XML with REST

ATTENTION:
When you retrieve data via REST, you need to label each order as "exported", as soon as you have successfully retrieved it.

Note that you need to authenticate with a user name and password to use the REST interface. To be able to do so, create a user with API rights at "Admin > User".

 

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]

 

ATTENTION:
The highest reasonable frequency for retrieving order data via the REST interface is every 60 minutes. Some channels only send order updates twice a day.

 

1. MANDATORY FIELDS

ABBREVIATION

DESCRIPTION

ACCOUNTNR

TB.One account number/Merchant code

TARGET

Specifies the resource group affected by the call (i.e. orders, invoices or messages).

 

2. ADDITIONAL INFORMATION

ABBREVIATION

DESCRIPTION

TARGET_ID

ID of the resource that is being accessed or changed, i.e. a specific order ID

ACTION

Command for changing the resource defined by the TARGET_ID.
For merchants: "exported" to mark something as transferred, "deliverynote", "invoice", "shiplabel", or "returnlabel" if documents are being retrieved.

CHANNEL

If you would like to restrict a call to data concerning a specific channel (e.g. retrieve a specific channel's orders), indicate the respective channel ID (not the channel sign).

 

3. REST CALLS

The individual REST calls are described on the following pages:

Retrieving order files and documents

Status changes after successful retrieval

Sending and retrieving messages

 

4. STATUS CODES

In addition to the respective contents, always note the returned http status code (header):

200 (all codes beginning with 2xx): call/processing successful

400 (all codes beginning with 4xx): call not successful or request failed

500 (all codes beginning with 5xx): faulty processing

 

Example message (successful processing):

Response header:

Status Code: 200 OK

 

The status codes relate exclusively to the connection of the systems via REST. They do not state anything about the correctness of the provided content. You may well receive a header containing the response "200 OK" even if no changes were made.


For further information, see also:

Order processing via XML - overview

Order processing via XML - files and naming conventions

Field descriptions - order file

Field descriptions - message file