API

Sections

Theme switcher

/bookings/create

This endpoint allows you to place a booking directly in the carrier’s system.

The recommended flow does not use this endpoint, but instead uses the full reservation flow as described at Creating Reservation section. If you still want to use this booking endpoint please contact your Partnership Manager as it could limit your access to some carriers and to some Enterprise Features.

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.

Body Parameters

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.

retailer_partner_numberstring Required

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

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.

total_pricenumber Required

Set the price. Use the value retrieved from the selected trip from the /connections/vacancy response. Reference value: 10000.

original_pricenumber

Set the original price. Use the value retrieved from the selected trip from the /connections/vacancy response. Reference value: 10000.

paxnumber

Set the number of passengers. Reference value: 1.

localestring Required

Set the language for the content of the response. The field accepts ISO 639 language codes. If the content in the specified language is unavailable, English will be returned. For more details check our Languages guide. Reference value: en.

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.

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.

execute_paymentstring Required

Set the payment execution method. Standard value should be set to false for all retailers, unless discussed with your Partnership Manager. Reference value: false.

payment_methodstring Required

Set the payment method. Standard value should be set to demand_note for all retailers, unless discussed with your Partnership Manager. Reference value: demand_note.

terms_acceptedstring Required

Set the acceptance status of the terms by the passenger. Reference value: true.

send_customer_emailstring Required

Enable the standard Distribusion confirmation and cancellation email to be sent to the passenger. If set to false, retailer must send their own email with the pdf ticket attached. For more details check our Ticket Delivery guide. Reference value: true.

titlestring

Set the title of the lead passenger. The field accepts mr or mrs. Reference value: mr.

first_namestring Required

Set the first name of the lead passenger. Reference value: John.

last_namestring Required

Set the last name of the lead passenger. Reference value: Smith.

emailstring Required

Set the email of the lead passenger. Reference value: email@provider.com.

phonestring

Set the phone number of the lead passenger. Some carriers validate the phone number formatting. Reference value: +493533400275.

citystring

Set the city of the lead passenger. Reference value: Berlin.

zip_codestring

Set the city of the lead passenger. Reference value: 13355.

street_and_numberstring

Set the street and number of the lead passenger. Reference value: Wattstrasse 10.

retailer_booking_numberstring

Set the ID of the reservation/booking. This value can be created by the retailer and used to make identification easier. Reference value: ABC123.

transaction_referencestring

Set the ID of the payment retrieved from the retailer payment flow. It can be useful when the retailer has to do reconciliation of payments and bookings. Reference value: ABC123.

passengersarray

Show child attributes

ancillariesarray

Show child attributes

cardsarray

Show child attributes

Response

200 (booking created)
Object
Successful response with booking confirmed

Response Attributes

dataobject

Show child attributes

jsonapiobject

Show child attributes

metaobject

Show child attributes

includedarray

Show child attributes

400 (invalid fare class)
Object
Error response: invalid fare class

Response Attributes

errorsarray

Show child attributes

jsonapiobject

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

POST

/

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