COS stock per size (same as stock)

GET https://api.api.sh/cos/v1/availability
1 credit / call e-commerce try it in the playground →

The same answer as /cos/v1/stock: live online stock per size of one COS product in one market.

Every response includes credits_used: the credits this call cost.

Part of the COS API: 13 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
url string A cos.com product link (its locale sets the market and language), the product's uri (name-colour-<10-digit article>), or a 10-digit article number. Example: https://www.cos.com/de-ch/women/womenswear/knitwear/cardigans/cashmere/product/brushed-cashmere-crew-neck-cardigan-blue-1341040003
sku string 10-digit article number (one colour of a product), instead of url, e.g. 1341040003.
market string Market: us (default), ca, gb, ie, de, at, ch, fr, es, it, nl, dk, no, se, pl, eu, eue, au, ww, or a site locale such as de-ch. Prices, currency and stock follow the market. country is accepted as the same thing.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/cos/v1/availability?url=https%3A%2F%2Fwww.cos.com%2Fde-ch%2Fwomen%2Fwomenswear%2Fknitwear%2Fcardigans%2Fcashmere%2Fproduct%2Fbrushed-cashmere-crew-neck-cardigan-blue-1341040003" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)

{"market": "ch","sku": "1341040003","uri": "brushed-cashmere-crew-neck-cardigan-blue-1341040003","in_stock": true,"sizes": [{"id": "24982-88679","name": "XS","sku": "1341040003002","stock_quantity": null,"stock_level": "yes","stock": "in_stock","in_stock": true},{"id": "24982-88680","name": "S","sku": "1341040003003","stock_quantity": null,"stock_level": "yes","stock": "in_stock","in_stock": true},"… 3 more"],"cached": false,"credits_used": 1}
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.