> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/docs/purple-dot-apis/public-api/availability.md).

# /availability

## Get Waitlist stock for a product

> Returns Purple Dot stock levels for a product and all of its variants. Use it to check whether a variant has Waitlist stock available. Pass \`product\_id\` or \`variant\_id\`.

```json
{"openapi":"3.1.0","info":{"title":"Purple Dot Public API","version":"v1"},"tags":[{"name":"/availability"}],"servers":[{"url":"https://www.purpledotprice.com/api/v1","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"query","name":"api_key","description":"Your store's public API key, from the Integration page of the Purple Dot merchant portal."}},"schemas":{"Availability":{"type":"object","properties":{"id":{"type":["string","null"],"description":"The product ID from the connected store."},"product_code":{"type":["string","null"],"description":"The product code from the connected store (for example, Shopify `product.handle`)."},"available":{"type":"boolean","description":"Whether the product has any remaining Waitlist stock."},"available_stock":{"type":"number","description":"Total Waitlist units available across all variants."},"available_in_stock":{"type":["number","null"]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The variant ID from the connected store."},"sku":{"type":["string","null"]},"available":{"type":"boolean","description":"Whether this variant has remaining Waitlist stock."},"available_stock":{"type":"number","description":"Waitlist units available for this variant."},"available_in_stock":{"type":["number","null"],"description":"Purple Dot's count of units for this variant in your store."},"oversell_enabled":{"type":["boolean","null"],"description":"Whether Purple Dot sees the variant's inventory policy as continue-selling in the store. For stores using the Combined Cart checkout this should be `true` when the variant has Waitlist stock and that Waitlist is live."},"waitlist_id":{"type":["string","null"],"format":"uuid","description":"Purple Dot's ID of the Waitlist holding stock for this variant, or `null`."}},"required":["id","sku","available","available_stock","available_in_stock","oversell_enabled","waitlist_id"]}}},"required":["id","product_code","available","available_stock","available_in_stock","variants"]},"AuthErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"ErrorResponse":{"type":"object","properties":{"meta":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable message."},"errorData":{"type":"object","additionalProperties":{},"description":"Structured detail about the error."}},"required":["error","errorData"]},"data":{"type":"object","properties":{}}},"required":["meta","data"]}}},"paths":{"/availability":{"get":{"tags":["/availability"],"summary":"Get Waitlist stock for a product","description":"Returns Purple Dot stock levels for a product and all of its variants. Use it to check whether a variant has Waitlist stock available. Pass `product_id` or `variant_id`.","parameters":[{"schema":{"type":"string","description":"The product ID from the connected store (for example, Shopify `product.id`)."},"required":false,"description":"The product ID from the connected store (for example, Shopify `product.id`).","name":"product_id","in":"query"},{"schema":{"type":"string","description":"The variant ID from the connected store."},"required":false,"description":"The variant ID from the connected store.","name":"variant_id","in":"query"},{"schema":{"type":"string","description":"The shopper’s country, as an ISO 3166 code."},"required":false,"description":"The shopper’s country, as an ISO 3166 code.","name":"country","in":"query"}],"responses":{"200":{"description":"Stock levels.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"result":{"type":"string","enum":["success"]}},"required":["result"]},"data":{"$ref":"#/components/schemas/Availability"}},"required":["meta","data"]}}}},"400":{"description":"Missing or unknown `api_key`. Neither `product_id` nor `variant_id` was passed.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AuthErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"404":{"description":"No product or variant matches the supplied ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
