API Documentation
- Management
- Sandbox
- Inventory
- Products
- Orders
- Inbound Shipments
- Shipping Methods
- Returns
- Billing
- Warehouses
- Warehouse Customers
Adjust Inventory Item
Adjust the inventory for the specified inventory item.
curl --request PUT \
--url https://production.trackstarhq.com/wms/inventory/{inventory_id}/adjust \
--header 'Content-Type: application/json' \
--header 'x-trackstar-access-token: <x-trackstar-access-token>' \
--header 'x-trackstar-api-key: <x-trackstar-api-key>' \
--data '{
"quantity": 1,
"adjustment_type": "increase",
"warehouse_id": "",
"location_id": ""
}'
{
"data": {
"id": "inv_id",
"warehouse_customer_id": "warehouse_customer_id",
"created_date": "2022-01-01T00:00:00Z",
"updated_date": "2022-01-02T05:05:05Z",
"name": "name",
"sku": "sku",
"unit_cost": 1,
"active": true,
"awaiting": 0,
"onhand": 5,
"committed": 1,
"unfulfillable": 0,
"fulfillable": 4,
"unsellable": 0,
"sellable": 2,
"substitute_skus": [
"sub_sku_1",
"sub_sku_2"
],
"inventory_by_warehouse_id": {
"warehouse_id_1": {
"onhand": 4,
"committed": 1,
"unfulfillable": 0,
"fulfillable": 3,
"unsellable": 2,
"sellable": 2,
"awaiting": 0
},
"warehouse_id_2": {
"onhand": 1,
"committed": 0,
"unfulfillable": 0,
"fulfillable": 1,
"unsellable": 0,
"sellable": 1,
"awaiting": 0
}
},
"lots": [
{
"lot_id": "lot_id_1",
"onhand": 2,
"expiration_date": "2022-01-01T00:00:00Z",
"warehouse_id": "warehouse_id1"
},
{
"lot_id": "lot_id_2",
"onhand": 1,
"expiration_date": "2022-01-03T00:00:00Z",
"warehouse_id": "warehouse_id2"
}
],
"measurements": {
"length": 1.5,
"width": 1.5,
"height": 1.5,
"unit": "in",
"weight": 2.5,
"weight_unit": "lb"
},
"locations": [
{
"location_id": "location_id_1",
"quantity": 2,
"warehouse_id": "warehouse_id1"
},
{
"location_id": "location_id_2",
"quantity": 1,
"warehouse_id": "warehouse_id2"
}
],
"external_system_url": "https://example.com/inventoryitem/123",
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
]
},
"id": "id",
"unused_fields": [
""
]
}
Headers
Your organization-level Trackstar API key.
"<x-trackstar-api-key>"
Your user's access token for a specific integration (ShipHero, Extensiv, etc).
"<x-trackstar-access-token>"
Path Parameters
Body
The quantity to adjust the inventory by.
1
The type of adjustment to make to the inventory.
increase
, decrease
"increase"
ID of the warehouse to adjust inventory in. Can be passed into the Warehouse endpoint for more details.
""
ID of the location to adjust inventory in. Can be passed into the Warehouse Location endpoint for more details.
""
Response
The unique ID of the inventory item.
"inv_id"
The ID of the merchant/tenant/customer that owns the inventory item. Can be passed into the Warehouse Customer endpoint for more details.
"warehouse_customer_id"
The date the inventory item was created.
"2022-01-01T00:00:00Z"
The date the inventory item was last updated.
"2022-01-02T05:05:05Z"
name
"name"
sku
"sku"
The cost of a single unit of the inventory item.
1
Whether the inventory item is active.
true
Inventory that the warehouse is awaiting delivery of.
0
The total amount of inventory in the warehouse.
5
Inventory that is already assigned to orders.
1
Inventory that can't be fulfilled for orders (e.g. damaged/quarantined).
0
Inventory that can be fulfilled for orders.
4
This field is deprecated.
0
Inventory that is available in sales channels.
2
A list of inventory item SKUs that can replace this item if it runs out of stock.
sub_sku
["sub_sku_1", "sub_sku_2"]
Inventory broken down by warehouse.
0
0
0
0
0
0
0
{
"warehouse_id_1": {
"onhand": 4,
"committed": 1,
"unfulfillable": 0,
"fulfillable": 3,
"unsellable": 2,
"sellable": 2,
"awaiting": 0
},
"warehouse_id_2": {
"onhand": 1,
"committed": 0,
"unfulfillable": 0,
"fulfillable": 1,
"unsellable": 0,
"sellable": 1,
"awaiting": 0
}
}
A lot is a specific batch of inventory items that are stored together and expire together. If an item doesn't expire, it is not allocated to a lot.
Lot ID.
""
The total amount of inventory in the lot.
0
The date that the lot expires.
""
[
{
"lot_id": "lot_id_1",
"onhand": 2,
"expiration_date": "2022-01-01T00:00:00Z",
"warehouse_id": "warehouse_id1"
},
{
"lot_id": "lot_id_2",
"onhand": 1,
"expiration_date": "2022-01-03T00:00:00Z",
"warehouse_id": "warehouse_id2"
}
]
1.5
1.5
1.5
The unit of measurement for the size of the inventory item.
cm
, in
"in"
2.5
The unit of measurement for the weight of the inventory item.
kg
, oz
, lb
"lb"
A list of locations within a warehouse where the inventory item is stored.
Location ID.
""
The total amount of inventory stored in the location.
0
[
{
"location_id": "location_id_1",
"quantity": 2,
"warehouse_id": "warehouse_id1"
},
{
"location_id": "location_id_2",
"quantity": 1,
"warehouse_id": "warehouse_id2"
}
]
URL link to the inventory item in the external system (WMS/Freight etc).
"https://example.com/inventoryitem/123"
A list of custom tags associated with the inventory item. A tag can be either a string or a dictionary with one key-value pair. e.g. ['tag1', 'tag2', {'key1': 'value1'}]
["tag1", "tag2", { "tag3": "value3" }]
The ID of the object that has been created or modified
"id"
Unused fields
curl --request PUT \
--url https://production.trackstarhq.com/wms/inventory/{inventory_id}/adjust \
--header 'Content-Type: application/json' \
--header 'x-trackstar-access-token: <x-trackstar-access-token>' \
--header 'x-trackstar-api-key: <x-trackstar-api-key>' \
--data '{
"quantity": 1,
"adjustment_type": "increase",
"warehouse_id": "",
"location_id": ""
}'
{
"data": {
"id": "inv_id",
"warehouse_customer_id": "warehouse_customer_id",
"created_date": "2022-01-01T00:00:00Z",
"updated_date": "2022-01-02T05:05:05Z",
"name": "name",
"sku": "sku",
"unit_cost": 1,
"active": true,
"awaiting": 0,
"onhand": 5,
"committed": 1,
"unfulfillable": 0,
"fulfillable": 4,
"unsellable": 0,
"sellable": 2,
"substitute_skus": [
"sub_sku_1",
"sub_sku_2"
],
"inventory_by_warehouse_id": {
"warehouse_id_1": {
"onhand": 4,
"committed": 1,
"unfulfillable": 0,
"fulfillable": 3,
"unsellable": 2,
"sellable": 2,
"awaiting": 0
},
"warehouse_id_2": {
"onhand": 1,
"committed": 0,
"unfulfillable": 0,
"fulfillable": 1,
"unsellable": 0,
"sellable": 1,
"awaiting": 0
}
},
"lots": [
{
"lot_id": "lot_id_1",
"onhand": 2,
"expiration_date": "2022-01-01T00:00:00Z",
"warehouse_id": "warehouse_id1"
},
{
"lot_id": "lot_id_2",
"onhand": 1,
"expiration_date": "2022-01-03T00:00:00Z",
"warehouse_id": "warehouse_id2"
}
],
"measurements": {
"length": 1.5,
"width": 1.5,
"height": 1.5,
"unit": "in",
"weight": 2.5,
"weight_unit": "lb"
},
"locations": [
{
"location_id": "location_id_1",
"quantity": 2,
"warehouse_id": "warehouse_id1"
},
{
"location_id": "location_id_2",
"quantity": 1,
"warehouse_id": "warehouse_id2"
}
],
"external_system_url": "https://example.com/inventoryitem/123",
"trackstar_tags": [
"tag1",
"tag2",
{
"tag3": "value3"
}
]
},
"id": "id",
"unused_fields": [
""
]
}