Storefront API
Availability
Fetching the availability of a product.
POST {proxyPathPrefix}/availability_checks
Availability check parameters
variantId
Required. The variants Shopify ID.locationId
Optional. Filter by Shopify location
Return format
unavailableRanges
will be a 2D array e.g.
Each ROW
represents an item.
Each COLUMN
represents a range of dates that are unavailable.
The range is represented as a string with two dates separated by ..
an empty date means minus infinity or infinity.
Data | Meaning |
---|---|
2025-01-20..2025-01-25 | 2025-01-20 TO 2025-01-25 |
..2025-01-15 | UNTIL 2025-01-15 |
2025-01-20.. | FROM 2025-01-20 |
So in the above example there a 3 items:
Item 1 is available from 2025-01-15
to 2025-01-20
and from 2025-01-25
onwards.
Item 2 is available from 2025-01-15
to 2025-01-28
.
Item 3 is available from 2025-01-15
onwards.