TB.One > Import & Export > REST Calls & the API > Stock Update Via XML and REST-API
With TB.One's REST API, stock updates can be uploaded directly. This allows you to circumvent the schedule for import jobs and run stock updates at any time. It is appropriate to use this method if you want to keep stock numbers of previously registered articles up-to-date during the processing of large product data catalogues.
ATTENTION: |
The files are processed directly. Therefore, the response time of the the REST call depends directly on the file's size. This method of updating stock numbers is not suitable for files larger than 10 MB.
THE REST CALL
TIP: "ACCOUNT-NR" is a placeholder for your TB.One account number |
SEND STOCK UPDATES
METHOD |
POST |
Sends |
||
|---|---|---|---|---|
ACCOUNT-NR |
Your account number |
to your TB.One system |
||
TARGET/RESOURCE |
articles/stock |
an inventory list |
||
EXAMPLE |
https://rest.core.tradebyte.com/9951/articles/stock |
|||
TO SEND |
The inventory file "TBCAT_STOCK_[timestamp].xml" (naming convention) for import has the following content: One central warehouse:
Several warehouses:
|
|||
The XML scheme can be found at:
https://api.core.tradebyte.com/schema/all_in_one/tb-stock_all_in_one.xsd |
After pushing your file, the API will return a status message with a status code in the HTTP header:
200 (all codes starting with 2xx): Call/processing successful
400 (all codes starting with 4xx): Call not successful/request faulty
For further information, see also:
•Providing stock data as part of the product data catalogue (XML, CSV)