Modify, Update inventory data
You call thisinventoryinventory:selflegacy
const url = 'https://api.zentail.com/v1/inventory';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"products":[{"SKU":"example","quantity":1,"delta_quantity":1,"onhand_quantity":1,"binLocation":"example","warehouseId":1,"warehouseUniqueId":"example"}],"validAsOf":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.zentail.com/v1/inventory \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "products": [ { "SKU": "example", "quantity": 1, "delta_quantity": 1, "onhand_quantity": 1, "binLocation": "example", "warehouseId": 1, "warehouseUniqueId": "example" } ], "validAsOf": "2026-04-15T12:00:00Z" }'This call allows updating inventory data for SKUs. If the SKU does not exist in your Zentail account, it will be created and assigned the inventory provided. This works only for warhouses that dont have an integration controlling inventory.
Include only one of quantity, delta_quantity, or onhand_quantity in your request.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Provide the validAsOf timestamp and the items (Up to 50 SKUs per call)
object
object
SKU value is the unique identifier for a product in Zentail.
Quantity of the product available for sale.
Additional quantity of this product that is now available for sale. Adds the quantity provided to quantity currently shown in Zentail.
This is the quantity of the product on hand. If this quantity is provided, the quantity that is reserved for ‘PENDING_PAYMENT’ and ‘PENDING’ orders is deducted, and the rest is made available for sale.
Name of the Bin location, if applicable.
Unique identifer for warehouse in Zentail.
The integration’s unique identifier for the warehouse
Examplegenerated
{ "products": [ { "SKU": "example", "quantity": 1, "delta_quantity": 1, "onhand_quantity": 1, "binLocation": "example", "warehouseId": 1, "warehouseUniqueId": "example" } ], "validAsOf": "2026-04-15T12:00:00Z"}Responses
Section titled “ Responses ”Success
object
SKU value is the unique identifier for a product in Zentail.
Depending on the type defined in standardProductIdType this field contains either the UPC, EAN, ISBN, or GTIN for this product.
One of UPC, EAN, ISBN or GTIN.
This is the total quantity across all warehouses that is made available for sale on the marketplaces. This does not include stock committed or reserved for various sales orders.
Contains error message if the inventory has not been processed successfully, else null
Examplegenerated
[ { "SKU": "example", "standardProductId": "example", "standardProductIdType": "example", "active": true, "totalAvailableQuantity": 1, "lastInventoryUpdateTs": "2026-04-15T12:00:00Z", "errorMessage": "example" }]Bad Request
object
Example
{ "errorCode": 400}Permission Denied
object
Example
{ "errorCode": 403}Not Found
object
Example
{ "errorCode": 404}Zentail Error
object
Example
{ "errorCode": 500}Zentail Error
object
Example
{ "errorCode": 503}