API

Sections

Theme switcher

/connections/vacancy

This endpoint is used to confirm the price and availability for the specified number and type of passengers for the selected trip. It is essential that you use this endpoint prior to allowing the customer to book and pay for the journey.

For details about how this endpoint fits into the flow, check the Checking Price & Vacancy step.

Header Parameters

api-keystring Required

Set your API key. To request a demo API key please reach out to us at partner@distribusion.com. Reference value: ZW8FXhnBl53yTkrMvoqLp4Xq7mf9nEBGsxpTWrid.

Query Parameters

currencystring Required

Set the currency of all monetary results in the response. The field accepts ISO 4217 currency codes. For more details check our Currencies guide. Reference value: EUR.

marketing_carrierstring Required

Set the carrier code. Use the value retrieved from the selected trip from the /connections/find response. Reference value: AMTR.

departure_stationstring Required

Set the departure station code. Use the value retrieved from the selected trip from the /connections/find response. Reference value: FRPARPGB.

arrival_stationstring Required

Set the arrival station code. Use the value retrieved from the selected trip from the /connections/find response. Reference value: DEBERCBS.

departure_timestring Required

Set the departure date and time. Use the value retrieved from the selected trip from the /connections/find response. Reference value: 2024-04-25T06:58.

arrival_timestring Required

Set the arrival date and time. Use the value retrieved from the selected trip from the /connections/find response. Reference value: 2024-04-25T08:30.

return_departure_timestring

Set the departure date and time for the return leg of the trip. Use the value retrieved from the selected trip from the /connections/find response. Reference value: 2024-04-26T06:22.

return_arrival_timestring

Set the arrival date and time for the return leg of the trip. Use the value retrieved from the selected trip from the /connections/find response. Reference value: 2024-04-26T10:34.

passengers[][pax]string Required

Set the number of passengers of a certain type. Carrier passenger types and age definitions can be found in the /marketing_carriers/{marketing_carrier_id} endpoint or the /connections/find endpoint. Reference value: 1.

passengers[][type]string Required

Set the type of passenger. Carrier passenger types and age definitions can be found in /marketing_carriers/{marketing_carrier_id} endpoint or /connections/find endpoint. For more details check our Passenger Types guide. Reference value: PNOS.

fare_classstring Required

Set the fare class. Use the value retrieved from the selected trip from the /connections/find response. Default set to FARE-1 if the field is not used. Reference value: FARE-1.

retailer_partner_numberstring

Set the retailer partner number (RPN). Contact your partnership manager to receive yours. Reference value: 012345.

includestring

Activate results including ancillaries such as extra luggage, bicycles, pets, seat preference/reservation, meals, and carbon offset, when offered by the selected carrier. For more details check our Ancillaries guide. Reference value: ancillary_options.

booking_idstring

Set the booking ID for amending a previously created booking. For more details check our Amendments guide. Reference value: EyfvbaiaOc5SwbyBT7Nl-A.

passengers[][cards][][name]string

Set the name for the discount card, loyalty card, or voucher. Valid for cards that apply at passenger level. For more details check our Discount Cards guide. Reference value: ADVANTAGE_LIBERTE_STES.

passengers[][cards][][code]string

Set the code for the discount card, loyalty card, or voucher. Valid for cards that apply at passenger level. For more details check our Discount Cards guide. Reference value: C002Z19.

cards[][name]string

Set the name for the discount card, loyalty card, or voucher. Valid for cards that apply at booking level. For more details check our Discount Cards guide. Reference value: ADVANTAGE_LIBERTE_STES.

cards[][code]string

Set the code for the discount card, loyalty card, or voucher. Valid for cards that apply at booking level. For more details check our Discount Cards guide. Reference value: C002Z98.

multiple_legsstring

Activate results for carriers that allow virtual interlining for supported retailer accounts. For more details check our Virtual Interlining guide. Reference value: true.

Response

200 (vacant true)
Object
Successful response with trip is still vacant

Response Attributes

dataobject

Show child attributes

jsonapiobject

Show child attributes

metaobject

Show child attributes

includedarray

Show child attributes

200 (vacant false)
Object
Successful response with trip not vacant

Response Attributes

dataobject

Show child attributes

jsonapiobject

Show child attributes

includedarray

Show child attributes

200 (with ancillaries)
Object
Successful response with trip is still vacant, with ancillaries included

Response Attributes

dataobject

Show child attributes

jsonapiobject

Show child attributes

metaobject

Show child attributes

includedarray

Show child attributes

200 (with discount card)
Object
Successful response with trip is still vacant, with discount cards applied
400 (departure in past)
Object
Error response: departure time/date set in the past

Response Attributes

errorsarray

Show child attributes

jsonapiobject

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

GET

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?

View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot