Skip to main content

Check product availability by external product and variant ID (API key only)

POST 

/api/v1/sdk/cart/store/:storeId/availability

This endpoint checks product availability using external IDs without requiring customer authentication. Useful for displaying stock status on product pages.

Authentication: Requires Public API Key (pk_*) only - NO customer authentication needed.

Response Data:

  • In-stock status (boolean)
    • Available quantity (if tracked)
    • Current pricing information
    • Product and variant details
    • Back-in-stock notification availability

Use Cases:

  • Displaying real-time stock status on product pages
    • Pre-add-to-cart validation
    • Inventory checking before allowing purchase
    • Product catalog synchronization

Error Scenarios:

  • 404 NOT FOUND - Product variant not found for given external IDs (Error code: VARIANT_NOT_FOUND)
    • 400 BAD REQUEST - Invalid request format or missing required fields (Error code: INVALID_REQUEST)
    • 401 UNAUTHORIZED - Invalid or missing API key (Error code: INVALID_API_KEY)
    • 403 FORBIDDEN - API key doesn't have access to this store (Error code: NO_STORE_ACCESS)

Request​

Responses​

Product availability retrieved successfully