Versions
v2
Flights
Create Order

Ordering Flights

Once you have selected your flights, added the necessary ancillaries, and obtained the pricing information, you can proceed to place an order for the selected itinerary. This step finalizes the booking process and requires providing payment information.

Requesting Order

POST /flight/[sessionId]/order

Use this endpoint to place an order for the selected flights using the specified payment details.

You may provide a new payment or an alternative payment method here; or, create one using the Payment Management endpoint.

Request

💣 If you choose to use the payment management endpoints, you must not provide the payment information in this request. Doing so will result in an error.

Order using a Payment Information Object

If paying with a regular payment object and have not created a payment object using the Payment Management endpoint, you must provide the payment information in this request.

POST /flight/[sessionId]/order
{
  "payment": {
    "code": "visa",
    "first_name": "John",
    "last_name": "Doe",
    "token": "401299Hb1tTS9999",
    "expiry": "10/25",
    "billing_information": {
      "unit": "211",
      "country": "CA",
      "state": "ON",
      "address": "529 West Broadway",
      "city": "Toronto",
      "postal_code": "L5W1N6"
    }
  }
}

Order using an Alternative Payment

Alternatively, if you are planning to use an alternative payment method; and, have not attached an alternative payment to the session, you can provide the alternative payment information in this request.

POST /flight/[sessionId]/order
{
  "alternativePayment" : {
    "method": "VERTO",
    "payload" : {
      "token" : "bd12b3d4-5c63-4938-86df-cf4a2207fc59",
    }
  }
}

Response

POST /flight/[sessionId]/order
{
  "flow": "FLIGHT_BOOKING",
  "expireAt": "2023-07-31T00:00:00.000Z",
  "createdAt": "2023-06-27T22:24:45.817Z",
  "public": "aa27fbad-5c63-4938-86df-cf4a2207fc59"
}

The response will be a new session. The order session serves as a reference to manage and access specific orders.

🧨 Once the order is placed, the search session that you have been using will be invalidated. For any action from here on, you will need to use the new public returned in this response.

🛎 The session returned will be of flow FLIGHT_BOOKING. This session is a long-lived one that will expire after the travel date of the last flight in the itinerary. You can see the details of the session using the Get Session endpoint.

Possible Errors

Status CodeErrorReason
400[Validation Error]Failed Validation
404Session not found or expiredRequest targeting a non-existent session.
500NDCx Internal ErrorUnknown
412Pricing not found. Please price the session before attempting to orderPricing call hasn’t been made for the current combination of fares, brands and seats.
409Session is currently locked by another process. Please try again later.Session is locked by another process.
409Multiple payment methods provided for the orderThere are multiple alternativePayment or payment are provided in the order.
412No payment method provided for the orderNo payment of any kind has been provided for the order.
412Alternative payment method is not validThe alternative payment provided cannot be verified.
422The order was created, but the passenger information return was malformed. Order Locator: locatorThe order has been created, but we have not been able to validate the created order. Manual Intervention is required.
412Not all flights are selectedThe Itinerary has not yet been fully selected.