The inventory can be accessed via the url GET http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/companies(<company system id>)/inventories?$filter=webshopChannelCode eq '<webshop-channel-code>' and itemNo eq '<item-no>'&$expand=itemVariants
. The filter on the webshop channel code and item no. is mandatory. The response is a JSON with all inventories with applied filters.
{
"@odata.context": "http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/$metadata#companies(<company system id>)/inventories",
"value": [
{
"@odata.etag": "W/\"JzIwOzExMjQ2MDYyNDM0MDYyOTU1OTM2MTswMDsn\"",
"systemId": "b5faadd0-88f7-ec11-be4b-ede4b77edebd",
"webshopChannelCode": "B2B",
"itemNo": "1906-S",
"itemVariants": [
{
"@odata.etag": "W/\"JzIwOzExMjQ2MDYzNzc0NTc1OTI4MDQwMTswMDsn\"",
"systemId": "bdcd1b75-ba01-ed11-be4f-e43ead1669c9",
"code": "T1",
"inventory": "60"
},
{
"@odata.etag": "W/\"JzIwOzExMjQ2MDU3NDM5NzI2MTI1MDUyMTswMDsn\"",
"systemId": "b1f5bcd4-d201-ed11-be4f-e43ead1669c9",
"code": "T2",
"inventory": "0"
}
]
}
]
}
The fields of header are documented in the following table.
field | data type | content |
---|---|---|
systemId |
GUID | distinct identifier for an inventory record |
webshopChannelCode |
Code[20] | the webshop channel code |
itemNo |
Code[20] | the no. of the item |
The fields of part are documented in the following table.
field | data type | content |
---|---|---|
systemId |
GUID | distinct identifier for an inventory record |
code |
Code[10] | the code of the item variant |
inventory |
Text | the value of the inventory |