Skip to main content

Bulk Check Product Availability

Check availability for multiple products in a single request. Useful for validating an entire cart before booking.

Endpointโ€‹

POST /v1/availability/products/bulk

Request Bodyโ€‹

FieldTypeRequiredDescription
itemsarrayYesArray of products to check (max 50)
items[].product_idintegerYesProduct ID
items[].variation_idintegerNoVariation ID
items[].quantityintegerNoQuantity to check (default: 1)
start_datestringYesStart date/time (ISO 8601)
end_datestringYesEnd date/time (ISO 8601)

Example Requestโ€‹

curl -X POST "https://app.equipdash.com/api/v1/availability/products/bulk" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"product_id": 1, "quantity": 2},
{"product_id": 5, "variation_id": 12, "quantity": 1},
{"product_id": 8, "quantity": 3}
],
"start_date": "2026-02-15T09:00:00Z",
"end_date": "2026-02-17T17:00:00Z"
}'

Responseโ€‹

{
"data": {
"all_available": false,
"period": {
"start_date": "2026-02-15T09:00:00+00:00",
"end_date": "2026-02-17T17:00:00+00:00"
},
"items": [
{
"product_id": 1,
"variation_id": null,
"product_name": "Mountain Bike",
"available": true,
"available_quantity": 5,
"bookable_quantity": 5,
"requested_quantity": 2
},
{
"product_id": 5,
"variation_id": 12,
"product_name": "Wetsuit",
"available": true,
"available_quantity": 3,
"bookable_quantity": 3,
"requested_quantity": 1
},
{
"product_id": 8,
"variation_id": null,
"available": false,
"available_quantity": 1,
"bookable_quantity": 1,
"requested_quantity": 3,
"error": "Product not found"
}
]
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}

Response Fieldsโ€‹

FieldTypeDescription
all_availablebooleantrue if ALL items are available
period.start_datestringRequested start date
period.end_datestringRequested end date
itemsarrayResults for each product
items[].product_idintegerProduct ID
items[].variation_idinteger|nullVariation ID
items[].product_namestringProduct name (if found)
items[].availablebooleanWhether the requested quantity can be booked โ€” computed as bookable_quantity >= requested_quantity
items[].available_quantityintegerUnits physically on hand for the window
items[].bookable_quantityintegerUnits that may actually be sold: on hand plus whatever is left of the product's shortage allowance. Identical to available_quantity unless the product has allow_shortage enabled
items[].requested_quantityintegerWhat was requested
items[].errorstringMessage explaining why the item could not be checked (e.g. the product was not found)

Products That Keep Selling When Sold Outโ€‹

A product can be set to keep taking bookings after its on-hand stock is gone, up to a small allowance (allow_shortage / max_shortage โ€” see Keep selling when sold out). Its row reports a bookable_quantity above available_quantity, and available follows bookable_quantity, so the item counts toward all_available:

{
"product_id": 3,
"variation_id": null,
"product_name": "Helmet",
"available": true,
"available_quantity": 0,
"bookable_quantity": 2,
"requested_quantity": 2
}

The allowance is one shared budget per product โ€” not per variation โ€” and it is drawn down by bookings already flagged short over overlapping dates, then freed again by a cancellation. Kits are never sold short, and experiences do not use the allowance at all.

Use Casesโ€‹

Validate Cart Before Checkoutโ€‹

# Check all cart items are available
curl -X POST "https://app.equipdash.com/api/v1/availability/products/bulk" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"product_id": 1, "quantity": 1},
{"product_id": 2, "quantity": 2}
],
"start_date": "2026-02-15T09:00:00Z",
"end_date": "2026-02-17T17:00:00Z"
}'

If all_available is true, proceed to create booking. Otherwise, show user which items are unavailable.

Check Alternative Datesโ€‹

# If items unavailable, check different dates
curl -X POST "https://app.equipdash.com/api/v1/availability/products/bulk" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"product_id": 1, "quantity": 2}
],
"start_date": "2026-02-22T09:00:00Z",
"end_date": "2026-02-24T17:00:00Z"
}'

Limitsโ€‹

  • Maximum 50 items per request
  • Each item is checked independently
  • Products not found or invalid variations are returned with error field