API Referencev1InventoryProductsBy Product

Get inventory by product

Retrieve inventory levels for a product by its public ID. Includes variant-level inventory when variants exist.

GET
/v1/inventory/products/{productId}
X-API-Key<token>

Per-store API key created in the dashboard at Settings > Developer > API Keys.

In: header

Path Parameters

productId*string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://api.whatalo.com/v1/inventory/products/472819365047"
{
  "data": {
    "product_id": "472819365047",
    "sku": "PROD-001",
    "stock_quantity": 42,
    "track_inventory": true,
    "low_stock_threshold": 10,
    "continue_selling_when_out_of_stock": false,
    "variants": [
      {
        "variant_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "variant_type": "Color",
        "variant_value": "Rojo",
        "sku": "SKU-RED-001",
        "stock_quantity": 25,
        "track_inventory": true,
        "low_stock_threshold": 5,
        "continue_selling_when_out_of_stock": false
      }
    ]
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  }
}