POST/v1/flights/order/:gdsprovider/:offerId
Create flight order
Creates an instant flight booking or a hold order from a selected offer using the original price, passenger data, documents and segment metadata.
Creates an instant flight booking or a hold order from a selected offer using the original price, passenger data, documents and segment metadata.
Endpoint
| Method | Path | Auth |
|---|---|---|
POST | /v1/flights/order/:gdsprovider/:offerId | Required API key |
| Header | Description |
|---|---|
Authorization | Bearer <secret_key>. The secret is shown only once when the credential is created. |
X-Travelandz-Id | <public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential. |
Content-Type | Use application/json for requests with a body. |
Request Params Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
gdsprovider | number | Yes | - | |
offerId | string | Yes | - |
Request Body Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
originalPrice | number | Yes | - | |
currency | enum | EUR, USD, CNY | Yes | - |
passengers | array | Yes | - | |
totalSegments | array | Yes | - | |
id | string | Yes | - | |
type | enum | adult, child, infant_without_seat | Yes | - |
user_id | string | No | If the order details includes user_id, the property is required | |
title | enum | mr, ms, mrs, miss | Yes | - |
phone_number | string | Format: E.164 phone number | Yes | - |
infant_passenger_id | string | No | Required if has infant passenger | |
identity_documents | array | Yes | - | |
unique_identifier | string | Yes | - | |
type | enum | passport, tax_id, known_traveler_number, passenger_redress_number | Yes | - |
issuing_country_code | string | No | 2 digit | |
expires_on | string | Format: YYYY-MM-DD | No | - |
firstName | string | Yes | - | |
lastName | string | Yes | - | |
gender | enum | m, f | Yes | - |
email | string | Yes | - | |
bornDate | string | Format: YYYY-MM-DD | Yes | - |
country | string | No | 2 digit | |
NationalID | string | No | - | |
loyaltyProgrammeAccounts | array | Yes | - | |
airlineIataCode | string | Yes | - | |
accountNumber | string | Yes | - | |
holdId | string | No | - | |
type | enum | instant, hold | No | - |
Success Response
Returns order identifiers, status and provider booking payload.
Response Body Schema
| Property | Type | Details | Required | Notes |
|---|---|---|---|---|
orderId | string | Yes | - | |
holdExpiresAt | string | Format: ISO 8601 | No | - |
holdPriceGuaranteed | string | No | - |