Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
GET

Get stock levels for a warehouse

Scope: inventory:warehouses.read https://api.alladdin.com/api/v2/warehouses/{warehouseId}/stock

Returns the stock levels for all products stored in a specific warehouse.
The response includes each product's ID, variant ID (if applicable), and current stock quantity. Use this endpoint to audit inventory or synchronize stock with external systems.

Parameters

Path parameters

warehouseId string required

Warehouse ID (24-char hex ObjectId)

Request

python
import requests

url = "https://api.alladdin.com/api/v2/warehouses/{warehouseId}/stock"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Responses

Response

json
{
  "items": [
    {
      "product_id": "string",
      "variant_id": "string",
      "stock": "15.3"
    }
  ],
  "cursor": "string",
  "has_more": false
}

Success responses

200 Stock items for the warehouse application/json object items[] object[] product_id string

Identifier of the product

variant_id string | null

Identifier of the product variant, if applicable

stock string

Current stock quantity in this warehouse as a decimal string

cursor string | null has_more boolean

Error responses

401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Warehouse not found application/json 429 Rate limit exceeded application/json

← PreviousGet a warehouse by ID →

Next →Delete a warehouse →