Skip to main content
View as Markdown

Stock API Quickstart

By the end of this guide, you'll have set the available quantity for a SKU in one of your warehouses using the Stock API.

Prerequisites

Make your first call

UpdateStock (POST /stock/v1/stock-update) sets the available quantity for one or more SKUs in a warehouse. It's the right starting point — pushing availability is the core reason to use this API.

The quantity you send is absolute — it becomes the new available quantity, it is not added to the current value.

# get_authenticated_session() is provided in docs/snippets/auth.mdx — see Authenticating Your Requests
session = get_authenticated_session()

response = session.post(
"https://noon-api-gateway.noon.partners/stock/v1/stock-update",
json={
"items": [
{"warehouse_code": "WH-DXB-01", "partner_sku": "MYSKU-001", "qty": 25}
]
},
headers={"Content-Type": "application/json", "User-Agent": "MyApp/1.0.0"},
timeout=30,
)
response.raise_for_status()
result = response.json()

Replace WH-DXB-01 with your warehouse code, MYSKU-001 with a partner SKU from your catalog, and 25 with the available quantity you want noon to hold.

Response:

<!-- from: v1BatchUpsertStockResponse / v1BatchUpsertStockResponseItem / rpcStatus -->
{
"items": [
{
"warehouse_code": "WH-DXB-01",
"partner_sku": "MYSKU-001",
"status": {
"status_id": 0,
"status_code": "OK",
"message": "",
"details": []
}
}
]
}

What you got back

The response returns one entry per SKU you submitted, echoing its warehouse_code and partner_sku. Each entry carries its own status — a status_code of OK confirms the available quantity was set. After this call, noon offers exactly that many units to customers until the next update or until stock is reserved against an order.

Checking for errors

This API can return errors in two ways:

  • Non-2xx response — the entire request failed (for example, authentication or a malformed body). Check the HTTP status.
  • Item-level error within a 200 — the request succeeded but one or more SKUs failed. Always inspect each item's status in the response body, even when the HTTP status is 200 — a SKU that does not exist on noon can fail while the rest succeed.

Where to go next