Resolve the passenger and holder fields required to create an order.
Authentication and headers
| Header | Description |
|---|---|
Authorization | Bearer <secret_key>. Keep the secret on the server and never write it to client logs. |
X-Travelandz-Id | <public_key>:<profile_code>, where the persisted profile code has the form dp_<12 alphanumeric>. |
Content-Type | application/json for requests with a JSON body. |
Request
Path parameters: gdsprovider is currently 0; bookingId comes from prebook.
Request Params Schema
gdsproviderCurrently
0bookingIdBooking id returned by prebook.
Success response
Returns holder flags and passengers[] flags. Each boolean indicates whether the corresponding field must be sent when creating the order; idx identifies the passenger position.
Response Body Schema
holderholderphoneholderemailholdercountryCodepassengerspassengers[]idxpassengers[]titlepassengers[]typepassengers[]namepassengers[]lastNamepassengers[]agepassengers[]nationalitypassengers[]genderpassengers[]phonepassengers[]emailpassengers[]countryCodepassengers[]addresspassengers[]citypassengers[]postalCodepassengers[]bornDatepassengers[]cityOfBirthpassengers[]countryOfBirthpassengers[]documentIdentifierpassengers[]documentTypepassengers[]documentIssuedAtpassengers[]documentExpiresAtpassengers[]documentCountryCodepassengers[]allowedDocumentspassengers[]allowedDocuments[]Errors
400for validation or unknown fields.401or403for invalid API credentials.500 internal_communication_errororunknown_errorfor provider failures.booking_not_foundwhen the pre-booking is missing or expired.
Usage notes
Build the passenger form from the fields marked true; do not assume every booking needs the same identity data.
cURL example
bash
curl --request GET \
--url "https://api.sandbox.travelandz.com/v1/trains/book/0/booking_123/required-fields" \
--header "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
--header "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"