Structure of stock data in TB.Stock format

Once all product and article data have been created, it is no longer necessary to send the entire product data catalogue just to update stock numbers. The transfer of entire product data catalogues may take a long time. Sending a stock feed is much faster and less error-prone. General requirements for the Data exchange via REST as well as a description of the file name for stock updates and the relevant XML scheme can be found here. The REST call for the stock updates is listed on the page "REST calls for channels and merchants".

The XML for stock data is structured as follows:

TBSTOCK / ARTICLE / A_STOCK

Node Mandatory Data type (Length) Description
TBSTOCK Y Identification as stock file
Attribute: changedate N Unix Automatic time stamp to compare the up-to-dateness of file and existing information
Element: ARTICLE Y Start of the article to be updated. the node may occur as often as needed
Sub-element:A_NR/A_EAN Y String(50) Article number or EAN for unique identificaton of an existing article
Sub-element: A_STOCK N posINT Stock; either referenced as one absolute number or for individual warehouses. If stock numbers are split by warehouse, the attributes below have to be provided for each warehouse
Attribute: identifier N ENUM Flag for referencing; for TB.IO, the identifier is always "name"
Attribute: key N String(100) Indicates the warehouse for which the stock number is valid
Attribute: name N String(100) During import, this attribute fills the designation field.

See also:

Example XML

One central warehouse:

<TBSTOCK changedate="1378275377"> <ARTICLE> <A_NR>4712</A_NR> <A_STOCK>20</A_STOCK> </ARTICLE> </TBSTOCK>

Multiple warehouses:

<TBSTOCK changedate="1378275377"> <ARTICLE> <A_NR>4712</A_NR> <A_STOCK identifier="name" key="whberlin">5</A_STOCK> <A_STOCK identifier="name" key="whfrankfurt">10</A_STOCK> </ARTICLE> </TBSTOCK>