curl --request PUT \
--url https://api.rootfi.dev/v4/ecommerce/inventories/{id} \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"data": [
{
"item_id": "<string>",
"variant_id": "<string>",
"sku": "<string>",
"quantity": 123,
"reserved_quantity": 123,
"available_quantity": 123,
"status": "in_stock",
"is_trackable": true,
"reorder_level": 123,
"reorder_quantity": 123,
"addresses": [
{
"rootfi_id": 123,
"platform_id": "<string>",
"type": "billing",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>"
}
]
}
'{
"rootfi_id": 157,
"rootfi_created_at": "2024-01-22T05:07:31.465Z",
"rootfi_updated_at": "2024-01-22T05:07:31.465Z",
"rootfi_company_id": 1089,
"platform_id": "123456_1",
"product_id": "prod_789",
"sku": "WH-2024-BLK",
"quantity": 45
}Update an existing inventory record in the e-commerce platform.
curl --request PUT \
--url https://api.rootfi.dev/v4/ecommerce/inventories/{id} \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"data": [
{
"item_id": "<string>",
"variant_id": "<string>",
"sku": "<string>",
"quantity": 123,
"reserved_quantity": 123,
"available_quantity": 123,
"status": "in_stock",
"is_trackable": true,
"reorder_level": 123,
"reorder_quantity": 123,
"addresses": [
{
"rootfi_id": 123,
"platform_id": "<string>",
"type": "billing",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>"
}
]
}
'{
"rootfi_id": 157,
"rootfi_created_at": "2024-01-22T05:07:31.465Z",
"rootfi_updated_at": "2024-01-22T05:07:31.465Z",
"rootfi_company_id": 1089,
"platform_id": "123456_1",
"product_id": "prod_789",
"sku": "WH-2024-BLK",
"quantity": 45
}| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The rootfi_id or platform_id of the inventory record to update |
| Field | Type | Required | Description |
|---|---|---|---|
| quantity | integer | No | Available quantity in stock |
| reserved_quantity | integer | No | Quantity reserved for pending orders |
| warehouse_location | string | No | Warehouse or location identifier |
The rootfi_id or platform_id of the inventory record
The data of the inventories endpoint
Show child attributes
Inventory updated successfully
V4 Inventory object with comprehensive stock tracking
The unique ID we assign for that data's information
157
The date at which RootFi first synced this data
"2024-01-22T05:07:31.465Z"
The latest date at which RootFi updated this data
"2024-01-22T05:07:31.000Z"
The ID of the company in the accounting platform
1089
An unique custom RootFi ID made from platform's unique_id.
"123456"
The date at which the data was deleted in the accounting platform
The ID of the data in the accounting platform.
A JSON containing fields that you can directly get from the accounting platform.
The hash of the data
Reference to the Item being tracked
Reference to the specific Variant being tracked
Stock Keeping Unit for this inventory item
Total physical quantity in stock
Quantity allocated to pending orders but not yet shipped
Quantity available for new orders (quantity - reserved_quantity)
Current inventory status
in_stock, low_stock, out_of_stock, discontinued, unknown Whether inventory levels are actively monitored for this item
Quantity threshold that triggers reorder alerts
Suggested quantity to reorder when stock is low
Warehouse locations where this inventory is stored
Show child attributes
When this inventory record was created
When this inventory record was last updated