Batch Adjust Inventory for Cart Products
Changed onSet the exact on-hand inventory for multiple cart products in a single call. Each line specifies a product and the exact quantity to set; increase and decrease adjustments are not supported here.
Request
- Base URLhttps://production.trackstarhq.com
- URLhttps://production.trackstarhq.com/cart/products/batch-adjust-inventory
- Authnone required
Headers
Your organization-level Trackstar API key.
Your user's access token for a specific integration (ShipHero, Extensiv, etc).
Optional key that makes this request safe to retry. Send the same key on a retry and Trackstar returns the first attempt's response instead of writing again; if the first attempt failed, the retry runs the write again. Reusing a key with a different request is rejected. Keys expire after 24 hours.
Request body
Example request
{
"line_items": [
{
"product_id": "product_id",
"quantity": 1
}
]
}Response
Successful response
Example response
{
"data": [
{
"id": "product_id",
"created_date": "2022-01-01T00:00:00Z",
"updated_date": "2022-01-02T05:05:05Z",
"name": "product_name",
"description": "<p>Soft cotton crew neck tee.</p>",
"sku": "sku",
"gtin": "gtin",
"parent_product_id": "parent_product_id",
"is_kit": true,
"active": true,
"image_url": "https://example.com/image.jpg",
"price": 10,
"unit_cost": 10,
"currency_code": "USD",
"inventory": 10,
"inventory_by_warehouse_id": {
"warehouse_id_1": 6,
"warehouse_id_2": 4
},
"measurements": {
"length": 1.5,
"width": 1.5,
"height": 1.5,
"unit": "in",
"weight": 2.5,
"weight_unit": "lb"
},
"tags": [
"tag_0"
],
"categories": [
"Apparel",
"Shoes",
"Running"
],
"external_system_url": "https://example.com/cartproduct/123",
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
],
"additional_fields": {
"key": "value"
},
"trackstar_created_date": "2023-03-15T13:45:30Z",
"trackstar_updated_date": "2023-03-15T13:45:30Z"
}
],
"unused_fields": [
"unused_fields"
]
}Changes
- breaking
removed from the request body
oneOflist - info
added the new optional
headerrequest parameterIdempotency-Key - info
added to the request body
oneOflist - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status
- breaking