Public API
Purple Dot has a public API that can be used to get information about waitlists and product availability server- and client-side.
Include your store's public API key as an
api_key
query parameter in all requests.The API is versioned using a URL prefix. The current version is
v1
, and all endpoints use the /api/v1/
namespace.All responses follow a common format:
{
"meta": {
"result": "success"
},
"data": /* Response data */
}
Get all open waitlists. Useful for determining which products have a waitlist.
Request:
api_key
- The store's API key
Response:
data
- An array containing all the open waitlistsid
- The waitlist IDstate
- The waitlist stateproduct
- An object containing the waitlist productid
- The ID of the product used by the connected store, e.g. Shopifyproduct.id
product_code
- The product code used by the connected store, e.g. Shopifyproduct.handle
Examples:
curl 'https://www.purpledotprice.com/api/v1/waitlists?api_key={{api key}}'
{
"meta": {
"result": "success"
},
"data": [
{
"id": "3bbc58c6-9a11-422f-9cf5-6a5ac8468eec",
"state": "OPEN",
"product": {
"id": "4697179062404",
"product_code": "womens-white-sneakers"
}
}
]
}
Get the Purple Dot stock levels for a product and all its variants. Useful for determining whether a particular variant has stock available in Purple Dot.
Request:
api_key
- The store's API keyproduct_id
- The ID of the product used by the connected store, e.g. Shopifyproduct.id
Response:
data
id
- The ID of the product used by the connected store, e.g. Shopifyproduct.id
product_code
- The product code used by the connected store, e.g. Shopifyproduct.handle
available
- Boolean indicating whether the product has any remaining Waitlist stock.available_stock
- The number of units available on the waitlist.variants
- An array containing all the product's variantsid
- The ID of the product used by the connected store, e.g. Shopifyvariant.id
sku
- The SKU used by the connected store, e.g. Shopifyvariant.sku
available
- Boolean indicating whether the variant has any remaining Waitlist stock.available_stock
- The number of units available for this variant.
Examples:
curl 'https://www.purpledotprice.com/api/v1/availability?product_id=4697179062404&api_key={{api key}}'
{
"meta": {
"result": "success"
},
"data": {
"id": "4697179062404",
"product_code": "womens-white-sneakers",
"available": true,
"available_stock": 500,
"variants": [
{
"id": "32813576749188",
"sku": "PD3-10",
"available": true,
"available_stock": 500
},
{
"id": "32813576388740",
"sku": "PD3-5",
"available": true,
"available_stock": 500
}
]
}
}