API reference · Catalogue
Set stock levels
Your store's stock numbers, in bulk (up to 1,000). The store owns stock: Floee reads these and never writes them back.
Request
curl -X POST "https://icebot.icebergaisolutions.com/api/v1/catalogue/stock" \
-H "Authorization: Bearer $ICEBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"source":"api","levels":[{"product_external_id":"101","quantity":38},{"product_external_id":"102","variant_external_id":"102-L","quantity":null}]}'Body
| Field | Type | Description |
|---|---|---|
source | api | woocommerce | shopify | Default api. |
levels[].product_external_id (required) | string | number | A product you already synced. |
levels[].variant_external_id | string | number | For a variant of that product. |
levels[].quantity (required) | integer | null | null stops tracking stock for the item. Negative counts are stored as 0. |
{
"source": "api",
"levels": [
{
"product_external_id": "101",
"quantity": 38
},
{
"product_external_id": "102",
"variant_external_id": "102-L",
"quantity": null
}
]
}Responses
200
Per-level results.
{
"data": [
{
"product_external_id": "101",
"variant_external_id": null,
"status": "set"
},
{
"product_external_id": "102",
"variant_external_id": "102-L",
"status": "cleared"
}
],
"applied": 2,
"failed": 0
}Errors
Every endpoint can also return 401 (missing, unknown or revoked key), 403 (origin not allowed, or the key lacks catalogue:sync) and 429 (rate limited). See Errors.
| Status | error | When |
|---|---|---|
400 | invalid body | levels is missing or a level is malformed. details lists each. |
Source of truth: /api/v1/catalogue/stock in apps/dashboard/app/api/v1/catalogue/stock/route.ts.