POSTAvailabilities

Get Availabilities

/api/v1/availabilities

Retrieve 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

FieldTypeRequiredDescription
productCodestringYesProduct code to check availability for
startDateTimestringNoStart date/time in ISO format. If only this field is sent, endDateTime defaults to end of the same day.
endDateTimestringNoEnd date/time in ISO format. If only this field is sent, startDateTime defaults to start of the same day.
quantityintegerNoNumber 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 StatusCodeMeaning
400INVALID_JSONMalformed JSON body
400INVALID_REQUESTInvalid date range, invalid date format, or no active resources configured
401UNAUTHORIZEDMissing or invalid partner authentication
422VALIDATION_ERRORRequest payload validation failed
403FORBIDDENProduct does not belong to authenticated partner
404NOT_FOUNDProduct is not available
500INTERNAL_SERVER_ERRORServer error