Docs
  • Purple Dot Overview
  • Getting Started
  • Shopify app integration
    • Installing our Shopify App
  • Platform Integration with Shopify
    • Connect to Shopify
    • Integrate Purple Dot with your Storefront
      • Integrate into Shopify Themes built with Liquid
        • Minimum Theme Requirements
      • Integrate into Shopify Headless Storefronts
        • Integrate into Shopify Hydrogen Storefronts
    • Configure Shipping Rates
    • Test the Platform Integration
    • Pre-order Tracking
    • Migrating from our Shopify App
  • Platform Integration with Salesforce
    • Integrate Purple Dot with Salesforce
      • Upgrading to 2024-08-29
  • Platform Integration With Other Platforms
    • Integrate into Another Platform
  • Platform Integration References
    • Public API
      • /waitlists
      • /availability
      • /products/preorder-state
      • /variants/preorder-state
      • /pre-orders
    • Private API
      • /waitlists
      • /pre-orders
      • /pre-orders/count
      • /pre-orders/count-units/sku/:sku
      • /inventory
      • /fulfillment-orders
      • /fulfillment
Powered by GitBook
On this page
  1. Platform Integration References
  2. Public API

/availability

Previous/waitlistsNext/products/preorder-state

Last updated 1 month ago

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 query parameters:

  • api_key - Your Purple Dot store's public 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 any remaining Waitlist stock

    • available_stock - The number of units (across all variants) that are 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 this variant has any remaining Waitlist stock

      • available_stock - The number of units available for this variant on the Waitlist

      • available_in_stock - Purple Dot's view of the number of units available for this variant in your Shopify store

      • oversell_enabled - Boolean indicating Purple Dot's view if this variant has its set to continue in Shopify. Should be true for any variant in a store using the checkout type if this variant has Waitlist stock and that Waitlist is live

      • waitlist_id - Purple Dot's internal ID of the Waitlist that has stock of this variant, if any

Examples:

curl --request GET \
  --url 'https://www.purpledotprice.com/api/v1/availability?product_id=4697179062404&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,
        "available_in_stock": 0,
        "oversell_enabled": true,
        "waitlist_id": "578a2f72-bbd9-41e1-9330-7eb3ba190f00",
      },
      {
        "id": "32813576388740",
        "sku": "PD3-5",
        "available": false,
        "available_stock": 0
        "available_in_stock": 0
        "oversell_enabled": false,
        "waitlist_id": null,
      }
    ]
  }
}
inventory_policy
Combined Cart
GET /availability