Skip to content
FloeeAPI

API reference · Catalogue

Set stock levels

POST/api/v1/catalogue/stockScope catalogue:sync

Your store's stock numbers, in bulk (up to 1,000). The store owns stock: Floee reads these and never writes them back.

Request

curlshell
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

FieldTypeDescription
sourceapi | woocommerce | shopifyDefault api.
levels[].product_external_id (required)string | numberA product you already synced.
levels[].variant_external_idstring | numberFor a variant of that product.
levels[].quantity (required)integer | nullnull stops tracking stock for the item. Negative counts are stored as 0.
Example bodyjson
{
  "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.

200 responsejson
{
  "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.

StatuserrorWhen
400invalid bodylevels 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.