Stock Update transmission

from your system to TB.One

Definition

By the stock of an item we mean the stock that you want to transfer to TB.One. TB.One uses the stock information as the master value in its own database. In TB.One you can later configure for example which channel gets how many articles or if you want to send all stock to your custom channel.

In the TB.Stock update over REST API you can only send one amount per article. An article is every SKU you have. So for example a shirt would have a separate stock for each size or color you offer.

Single, multiple or all articles

In the stock update you can send one, many or all articles.

Best practice would be to send a single stock update immediately whenever an article stock changes on your side. If this is not possible or would cause a huge amount of REST calls, it makes sense to bundle all updates to one call every five minutes or something similar.

The easiest way in most systems is to generate a full XML with all stocks of all articles and send that to the TB.One REST API, for example every hour.

Always keep in mind: Especially the “sold out” event should be communicated to TB.One as fast as possible in order to avoid overselling articles on connected marketplaces.

Best practices​

1. It makes sense to define update frequency along with Delta- and Full-Article Imports.

If you send a DELTA on each article change in your systems it is not needed to additionally send a stock update for the same change, since stock is included in Delta-update. But on the other hand you should send a stock update and not a Delta if only stock has changed, since stock updates are technically much more lightweight and can be processed faster by both your and Tradebyte’s systems.

  • Your XML file must validate against our TB.Stock XSD before sending it to our API.
  • POST your TB.Stock to our REST API endpoint https://rest.trade-server.net/(HNR)/articles/stock
  • As the file is directly processed, the response time of the REST call is directly related to the size of the file. This method is not suitable for files larger than 10 MB.

2. Possible http status code header messages:

  • 200 (all codes starting with 2xx): Call/processing successful.
  • 400 (all codes starting with 4xx): Call not successful resp. request faulty.