ASOS Stock Availability API by Size: Check the Variant, Not Just the Product

Published October 22, 2026

isInStock: true is the field that can make a size alert wrong. In an observed ASOS stock response, product 210916181 had that flag and eight variants. Its detail record also contained eight variants. Neither the flag nor the matching counts proves that the size someone is watching is available.

isInStock=true does not answer the size question

A product-level stock result answers a broader question than “Can I buy US 7?” Your application needs a product, market context, identified size variant, and verified variant-level availability before answering that narrower question.

The observed stock record included a current USD price of 94.99. That was an observation, not a continuing offer. The observed v4 detail record had no root isInStock or price field; do not transplant those fields from another response version.

For an ASOS stock availability API by size integration, the dangerous shortcut is treating an absent size result as false, then declaring a restock when a later request resolves it. Missing evidence must remain unknown.

Keep US, USD, en-US, and US sizing attached to the watch

The country directory, queried with lang=en-US, returned a United States entry supporting this context:

  • country=US where the operation accepts country;
  • store=US, currency=USD, lang=en-US, and sizeSchema=US for detail and stock reads.

Store these values with the watch, not just in global defaults. Changing size schema can change the interpretation of a size label. A price comparison across storefronts also needs currency and product-variant normalization; a shared number or label is insufficient. Directory membership does not prove identical assortment or compatible settings everywhere.

For discovery, inspect nested category navigation and use link.categoryId, not the navigation node's own ID. Category 4209 yielded ten products from a reported itemCount of 1523. That total is not the page size or proof of an exhaustive export.

An empty keyword result does not contradict a populated category. A separate keyword observation returned empty products and facets; it did not establish why. The published listing contract requires categoryId, although its q notes say not to combine them. Use the category example rather than inventing a compliant keyword-only call. Autocomplete numberOfResults describes catalog matches, not search volume or demand.

Find the watched size among eight detail variants

Pass a listing's product id to products-v4-detail. For the observed product, detail variant 210916195 had sizeId=388476 and displaySizeText="US 7". These are three distinct identifiers: product, variant, and size. Detail also exposed variant isAvailable, but that does not establish the stock response's field names or prove a cross-response join.

Inspect identifiers and labels before implementing that join. This diagnostic makes an explicit detail request; it is not yet a restock detector:

import os
from datetime import datetime, timezone

import requests

BASE = "https://api.opendata-api.com/api/project/asos"
PRODUCT_ID = 210916181
CONTEXT = {
    "store": "US", "currency": "USD",
    "lang": "en-US", "sizeSchema": "US",
}


def read(operation, **inputs):
    response = requests.get(
        f"{BASE}/{operation}",
        params={**CONTEXT, **inputs, "key": os.environ["OPENDATA_API_KEY"]},
        timeout=30,
    )
    observed_at = datetime.now(timezone.utc).isoformat()
    if not 200 <= response.status_code < 300:
        raise RuntimeError("HTTP request failed; availability is unresolved")
    envelope = response.json()
    if not isinstance(envelope, dict) or envelope.get("code") != 200:
        raise RuntimeError("Gateway business failure; availability is unresolved")
    return envelope.get("data"), observed_at


detail, _ = read("products-v4-detail", id=PRODUCT_ID)
if not isinstance(detail, dict) or str(detail.get("id")) != str(PRODUCT_ID):
    raise ValueError("Missing or mismatched detail product")
variants = detail.get("variants")
if not isinstance(variants, list):
    raise ValueError("Missing detail variants")
print([
    (v.get("id"), v.get("sizeId"), v.get("displaySizeText"))
    for v in variants if isinstance(v, dict)
])

Obtain your own authorized platform key from the dashboard and set OPENDATA_API_KEY locally. The request sends it as query parameter key, represented as YOUR_API_KEY in URL templates. Redact request URLs from logs and error reports; never embed a usable key in browser code. Reading this guide or copying code sends no request.

Match product 210916181 inside the stock-price array

The stock-price operation takes numeric productIds. Despite that plural name, only a single-product input is verified; do not infer comma-separated batching or a batch limit.

Its operation payload is an array even for one product. After checking HTTP status and the gateway's code/message/data business result, match productId inside data; do not assume element zero is your product.

Continue the diagnostic with the same context:

stock, observed_at = read("products-v4-get-stock-price", productIds=PRODUCT_ID)
if not isinstance(stock, list):
    raise ValueError("Expected a stock-price array")
matches = [
    row for row in stock
    if isinstance(row, dict) and str(row.get("productId")) == str(PRODUCT_ID)
]
if len(matches) != 1:
    raise ValueError("Missing or ambiguous stock product")
stock_variants = matches[0].get("variants")
if not isinstance(stock_variants, list):
    raise ValueError("Missing stock variants")
print(sorted({
    key for variant in stock_variants if isinstance(variant, dict)
    for key in variant
}))

This prints field names for inspection, not a size-stock verdict. Confirm the actual shared variant identifier and availability semantics against the detail variant. Eight rows on each side do not justify zip, array-index joins, or matching by a size label alone. If the contract cannot be confirmed, stop at unknown.

APIs for similar apps can be requested through the contact page, and private source-code deployment is available.

Keep unknown, unavailable, and available as separate states

The stock evidence establishes product fields and eight variants, but not the exact variant identifier, size-label, or availability keys. Accordingly, this guide does not supply an invented stock parser. Once those fields and their meaning are verified, a conservative decision boundary can accept a verified Boolean:

def size_state(verified_availability):
    if verified_availability is True:
        return "available"
    if verified_availability is False:
        return "unavailable"
    return "unknown"

Do not pass the product's isInStock into this function. Supply a size-specific decision only after identity and semantics are established. Missing variants, ambiguous joins, unexpected types, HTTP failures, or gateway business failures belong on the unknown path. An HTTP 200 response alone does not establish gateway success, and gateway success alone does not establish size availability.

A restock notification needs a verified unavailable-to-available transition for the same watch. Unknown-to-available is newly resolved evidence, not proof of a restock. Keep failure reasons separate from the last confirmed state, apply a freshness policy, and avoid duplicate notifications.

Compare stockLastUpdatedDate with your own observation time

Observed variant stockLastUpdatedDate values included 2026-10-23T01:53:27.387Z. That is a reported stock-data timestamp, not automatically the time your application fetched it or a freshness guarantee.

Save the reported value alongside your own observed_at, product and verified variant identity, regional context, decision, and diagnostic reason. Missing or stale timestamps should follow an explicit policy rather than being silently replaced with the current time. A successful request can retrieve previously updated data.

Scheduled observations can support an application-built restock watch; these operations do not establish a push notification service. Space requests within your budget, preserve unknown intervals, and recognize that polling can miss changes between observations. Historical prices likewise require your own stored, context-matched observations.

Where the alert contract stops: quantity, reservation, and history

Availability is not an exact remaining-unit count. These reads do not reserve a size, place an order, guarantee stock at checkout, provide built-in price history, or establish a refresh interval. Catalog access is not an official seller or fulfillment integration.

For new work, use products-v2-list, products-v4-detail, and products-v4-get-stock-price. The older detail, listing, and similarity routes marked deprecated remain migration references, not verified compatible fallbacks.

A defensible alert therefore reports a verified size-availability observation in a named market at a recorded time. Where variant identity, freshness, or stock meaning remains unresolved, the honest result is unknown—not a fabricated shortage or a promised restock.