Last updated

Get availabilities

Introduction

Offers and sessions can have a limited capacity. When a TicketingOffer or a TicketingSession have a not-null availableQuantity value this means they have a limited quantity available for reservation. The availableQuantity values returned by endpoints such as GET /v1/ticketing/catalogs/{catalogId}/offers/{offerId}/tickets or GET /v1/ticketing/catalogs/{catalogId}/offers are 'close to real-time' values on which you can rely to build your integration. For example if you want to display sessions or offers' availabilities over a month we advise you to use those values.

In the case you want to know the real-time availability value of a specific session or offer you can use the API endpoints described below.

Check session availability

Some sessions have limited access. To avoid getting an error when calling the POST /v1/booking/reservations/_bulk endpoint, you can call the GET /catalogs/{catalogId}/events/{eventId}/sessions/{id}/availability endpoint and check the availableQuantity field in the response.

Request

curl --request GET \
  --url https://api.korusticket.com/v1/ticketing/catalogs/0194abdc-3a71-72b0-a9b9-89d4be0cd73e/events/0194d69e-3df9-73e6-9f2f-2bd0d3c21319/sessions/337177bc-e513-444f-bcee-49a3e25b48a3/availability \
  --header 'accept: application/ld+json' \
  --header 'Authorization: Bearer {{YOUR_JWT_TOKEN}}' \
  --header 'Accept-Language: fr'

Response

{
  "@context": "/contexts/TicketingSession",
  "@id": "/v1/ticketing/catalogs/0194abdc-3a71-72b0-a9b9-89d4be0cd73e/events/0194d69e-3df9-73e6-9f2f-2bd0d3c21319/sessions/337177bc-e513-444f-bcee-49a3e25b48a3/availability",
  "@type": "TicketingSession",
  "availableQuantity": 10
}

Check offer availability

Some offers are available in limited quantity. To avoid getting an error when calling the POST /v1/booking/reservations/_bulk endpoint, you must call the GET /catalogs/{catalogId}/offers/{id}/availability endpoint and check the availableQuantity field in the response.

Request

curl --request GET \
  --url https://api.korusticket.com/v1/ticketing/catalogs/0194abdc-3a71-72b0-a9b9-89d4be0cd73e/offers/0194ac3f-7bdd-7175-a275-30c865618283/availability \
  --header 'accept: application/ld+json' \
  --header 'Authorization: Bearer {{YOUR_JWT_TOKEN}}' \
  --header 'Accept-Language: fr'

Response

{
  "@context": "/contexts/TicketingOfferAvailability",
  "@id": "/v1/ticketing/catalogs/0194abdc-3a71-72b0-a9b9-89d4be0cd73e/offers/0194ac3f-7bdd-7175-a275-30c865618283/availability",
  "@type": "TicketingOfferAvailability",
  "availableQuantity": 41301
}