POSTAvailabilities
Get Availabilities
/api/v1/availabilitiesRetrieve product availability for a specific date range. Checks resource availability and returns available dates and time slots.
Authentication Required
Include Bearer token in Authorization header: Authorization: Bearer YOUR_TOKEN
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
productCode | string | Yes | Product code to check availability for |
startDateTime | string | No | Start date/time in ISO format. If only this field is sent, endDateTime defaults to end of the same day. |
endDateTime | string | No | End date/time in ISO format. If only this field is sent, startDateTime defaults to start of the same day. |
quantity | integer | No | Number of spots/tickets requested. Defaults to 1 when omitted or null. |
Request Body Example
Example:
{
"productCode": "PROD-001",
"startDateTime": "2026-03-15T09:00:00",
"endDateTime": "2026-03-22T18:00:00",
"quantity": 2
}Response
Success Response Example:
{
"success": true,
"availabilities": [
{
"date": "2026-03-15",
"available": true,
"allDay": false,
"stockTotal": 10,
"stockAvailable": 8,
"times": [
{
"time": "09:00",
"stockAvailable": 8
},
{
"time": "14:00",
"stockAvailable": 5
}
],
"prices": [
{
"label": "Adult",
"value": 15
},
{
"label": "Child",
"value": 5
}
]
},
{
"date": "2026-03-16",
"available": true,
"allDay": true,
"stockTotal": 10,
"stockAvailable": 10,
"times": [],
"prices": [
{
"label": "Adult",
"value": 15
},
{
"label": "Child",
"value": 5
}
]
}
]
}Error Response
Error Example:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "productCode",
"message": "The productCode field must be defined",
"rule": "required"
}
]
}
}Available Errors
| HTTP Status | Code | Meaning |
|---|---|---|
400 | INVALID_JSON | Malformed JSON body |
400 | INVALID_REQUEST | Invalid date range, invalid date format, or no active resources configured |
401 | UNAUTHORIZED | Missing or invalid partner authentication |
422 | VALIDATION_ERROR | Request payload validation failed |
403 | FORBIDDEN | Product does not belong to authenticated partner |
404 | NOT_FOUND | Product is not available |
500 | INTERNAL_SERVER_ERROR | Server error |