Public API Reference

Purple Dot has a public API that can be used to get information about waitlists and product availability server- and client-side.

Authentication

Include your store's public API key as an api_key query parameter in all requests.

Versioning

The API is versioned using a URL prefix. The current version is v1, and all endpoints use the /api/v1/ namespace.

Response Format

All responses follow a common format:

{
"meta": {
"result": "success"
},
"data": /* Response data */
}

Endpoints

GET /waitlists

Get all open waitlist. Useful for determining which products have a waitlist.

Request:

  • api_key - The store's API key

Response:

  • data - An array containing all the open waitlists
    • id - The waitlist ID
    • state - The waitlist state
    • product - An object containing the waitlist product
      • id - The ID of the product used by the connected store, e.g. Shopify product.id
      • product_code - The product code used by the connected store, e.g. Shopify product.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 /availability

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 key
  • product_id- The ID of the product used by the connected store, e.g. Shopify product.id

Response:

  • data
    • id - The ID of the product used by the connected store, e.g. Shopify product.id
    • product_code - The product code used by the connected store, e.g. Shopify product.handle
    • available - Boolean indicating whether the product has an open waitlist.
    • available_stock - The number of units available on the waitlist.
    • variants - An array containing all the product's variants
      • id - The ID of the product used by the connected store, e.g. Shopify variant.id
      • sku - The SKU used by the connected store, e.g. Shopify variant.sku
      • available - Boolean indicating whether the variant has an available 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
}
]
}
}