Skip to content

Create Order ​

Creates an order for a chosen trip in a single atomic call: the provider reserves the seats and books the passengers, returning one ticket per passenger. There is no separate seat-lock/reserve step — if the provider needs to hold seats it does so internally for the duration of this request.

INFO

agentorder_id is our internal reservation id; echo it back on the order for reconciliation. Each passenger carries the fields advertised as required by the matching Trip Details; fields the provider did not request may be omitted. tariff_code is the chosen fare (Fare.code from /trip); seat_id is the chosen seat (SeatMap.id) when the trip has selectable seats.

Endpoint ​

Method: POST

URL: /v1/order

Request Headers ​

ParameterTypeRequiredDescription
AuthorizationStringYesBearer <token> from Login

Request Parameters ​

ParameterTypeRequiredDescription
└ trip_idStringYesTrip id from a Search / Trip Details result
└ agentorder_idStringYesOur internal reservation id
└ localeStringNoLanguage, refer to Locale List
└ currencyStringNoRequested order currency
└ contactObjectNoBooking contact (falls back to agency defaults when not required)
  └ emailStringNoContact email
  └ phoneStringNoContact phone
└ passengers[OrderPassenger]YesPassengers to book
  └ indexIntegerYes0-based position; ties the ticket back to the request
  └ firstnameStringYesFirst name
  └ lastnameStringYesLast name
  └ middlenamesStringNoMiddle name(s)
  └ typeStringNoPassenger type, refer to Passenger Types
  └ tariff_codeStringNoChosen fare (Fare.code from /trip)
  └ seat_idStringNoChosen seat (SeatMap.id), when the trip has selectable seats
  └ birthdayStringNoDate of birth (yyyy-MM-dd)
  └ genderStringNoOne of m, f, x
  └ citizenshipStringNoISO-3166 alpha-2 country code
  └ phoneStringNoPhone number
  └ emailStringNoEmail address
  └ documentObjectNoIdentity document
   └ typeStringNoDocument type (passport, ID, …)
   └ numberStringNoDocument number
   └ expiryStringNoExpiry date (yyyy-MM-dd)
   └ issue_dateStringNoIssue date (yyyy-MM-dd)
   └ issue_countryStringNoISO-3166 alpha-2 country code

Request Example ​

json
{
  "trip_id": "trip_8f21",
  "agentorder_id": "TTN-100245",
  "locale": "en",
  "currency": "UAH",
  "contact": { "email": "[email protected]", "phone": "+380501112233" },
  "passengers": [
    {
      "index": 0,
      "type": "adult",
      "firstname": "Ivan",
      "lastname": "Petrenko",
      "tariff_code": "adult",
      "seat_id": "s12a",
      "birthday": "1990-05-14",
      "gender": "m",
      "citizenship": "UA",
      "phone": "+380501112233",
      "email": "[email protected]",
      "document": { "type": "passport", "number": "FC123456", "expiry": "2030-01-01", "issue_country": "UA" }
    }
  ]
}

Response Parameters ​

ParameterTypeRequiredDescription
└ orderObjectYesCreated order
  └ idStringYesProvider order id
  └ agentorder_idStringNoEcho of our reservation id from the request
  └ statusStringNoOrder status, refer to Order Status List (typically created)
  └ currencyStringYesOrder currency
  └ cancel_untilStringNoFree-cancellation deadline (ISO-8601 with offset)
  └ time_for_cancelIntegerNoSeconds the order may be cancelled for free
  └ tickets[OrderTicket]NoIssued tickets (one per passenger)
   └ numberStringYesProvider ticket number
   └ codeStringNoProvider booking/system code (matches RefundTicket.ticket_code)
   └ uidStringNoProvider-unique ticket identifier
   └ passenger_indexIntegerYesIndex of the OrderPassenger this ticket belongs to
   └ seatStringNoAssigned seat number
   └ place_descStringNoSeat-class description
   └ priceNumberNoTicket price
   └ currencyStringNoCurrency
   └ statusStringNoPer-ticket status (defaults to the order status)
   └ cancel_untilStringNoPer-ticket free-cancellation deadline

Response Example ​

json
{
  "order": {
    "id": "ord_7c01",
    "agentorder_id": "TTN-100245",
    "status": "created",
    "currency": "UAH",
    "cancel_until": "2026-06-30T23:59:00+03:00",
    "time_for_cancel": 86400,
    "tickets": [
      {
        "number": "TKT-555001",
        "code": "BK-9931",
        "uid": "u-aa01",
        "passenger_index": 0,
        "seat": "12A",
        "place_desc": "Standard",
        "price": 650.0,
        "currency": "UAH",
        "status": "created"
      }
    ]
  }
}

Error Code List ​

codemessageDescription
UNAUTHORIZEDInvalid tokenThe bearer token is missing, invalid, or expired (401).
NOT_FOUNDTrip not foundThe trip_id is unknown or has expired.
INVALID_PASSENGERInvalid passenger dataA required passenger field is missing or malformed.
SEAT_UNAVAILABLESeat no longer freeA requested seat_id was taken before the order completed.

TTN Octo API documentation