---
openapi: 3.0.1
info:
  title: DRCT API
  version: '2026-09-01'
  description: |
    Search, price, book and issue airline tickets from one REST API — no SOAP, no GDS terminal.

    Every request needs a bearer token (see the Authentication guide) and a `DRCT-Version`
    header pinning the API version you're integrating against. Full docs, guides and a
    changelog live at https://docs.drct.aero.
  contact:
    name: DRCT Support
    url: https://drct.aero
    email: team@drct.aero
paths:
  "/orders/{id}/ancillaries":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Shop Ancillaries
      operationId: shopAncillaries
      tags:
      - ancillaries
      description: Returns a list of ancillaries available for the specified order.
      responses:
        '200':
          description: Returns available ancillaries
          content:
            application/json:
              schema:
                type: object
                required:
                - ancillaries
                properties:
                  ancillaries:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Ancillary"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          "$ref": "#/components/responses/ChannelOrStatusError"
        '401':
          "$ref": "#/components/responses/Unauthorized"
    post:
      summary: Confirm Ancillary
      operationId: confirmAncillaries
      tags:
      - ancillaries
      description: Adds selected ancillaries to the order. Each item confirms one
        ancillary for one passenger; several ancillaries can be added in a single
        request. Returns the updated order.
      parameters: []
      responses:
        '201':
          description: Returns the updated Order
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Order"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          "$ref": "#/components/responses/ChannelOrStatusError"
        '401':
          "$ref": "#/components/responses/Unauthorized"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - ancillaries
              properties:
                ancillaries:
                  type: array
                  items:
                    type: object
                    required:
                    - id
                    - passenger_id
                    properties:
                      id:
                        type: string
                        example: ANCILLARY_42622140D81C4F8DBFCD3A724E0BA4EE-0DG-5
                        description: Ancillary id obtained from the Shop Ancillaries
                          response.
                      passenger_id:
                        type: string
                        example: PAX_1
                        description: Passenger id from the order.
                      quantity:
                        type: integer
                        minimum: 1
                        example: 1
                        description: Quantity for this passenger. Optional, defaults
                          to 1 and must not exceed max_quantity. Channels that sell
                          baggage as fixed lots (WizzAir) confirm one lot per id —
                          a value above 1 is rejected with ancillary_quantity_not_supported.
        required: true
  "/offers_search":
    parameters:
    - "$ref": "#/components/parameters/acceptEncodingParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    post:
      summary: Search Offers
      operationId: searchOffers
      tags:
      - offers search
      description: For given routes and passengers it returns all possible flights
        combinations with offers. An offer will be used in further operations.
      parameters: []
      responses:
        '201':
          description: Returns a list of an OfferSearch
          content:
            application/json:
              schema:
                type: object
                properties:
                  flights_options:
                    type: array
                    items:
                      "$ref": "#/components/schemas/FlightsOption"
                  passengers:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Passenger"
                  fares:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Fare"
                  segments:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Segment"
                required:
                - flights_options
                - passengers
                - segments
                - fares
        '200':
          description: No offers found for the given parameters
          content:
            application/json:
              schema:
                type: array
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "validation_error"
                  message: "{'flights':['size cannot be less than 1']}"
        '401':
          "$ref": "#/components/responses/Unauthorized"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - flights
              - passengers
              properties:
                flights:
                  type: array
                  minItems: 1
                  description: An array of origin destination pairs. For round-trip
                    or multi-city flights justpass them as a regular items of array
                    (check examples for details).
                  items:
                    type: object
                    properties:
                      departure_airport_code:
                        "$ref": "#/components/schemas/AirportCode"
                      arrival_airport_code:
                        "$ref": "#/components/schemas/AirportCode"
                      departure_date:
                        type: string
                        format: date
                        example: 2026-09-27
                        description: Date of the current flight's departure.
                passengers:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                    - type
                    properties:
                      type:
                        "$ref": "#/components/schemas/PassengerType"
                filters:
                  type: object
                  description: A set of filters to reduce response.
                  properties:
                    carriers:
                      type: array
                      description: A set of IATA carriers codes. Only flight options
                        will be returned where on of these carriers is a validating
                        carrier.
                      items:
                        "$ref": "#/components/schemas/Carrier"
                      example:
                      - LH
            examples:
              One Way Flight:
                summary: Search Offers
                value:
                  flights:
                  - departure_airport_code: WAW
                    arrival_airport_code: FRA
                    departure_date: 2023-10-20
                  passengers:
                  - type: ADT
              Round Trip Flights:
                summary: Search Offers
                value:
                  flights:
                  - departure_airport_code: WAW
                    arrival_airport_code: FRA
                    departure_date: 2023-10-20
                  - departure_airport_code: FRA
                    arrival_airport_code: WAW
                    departure_date: 2023-10-21
                  passengers:
                  - type: ADT
              Multi City Flights:
                summary: Search Offers
                value:
                  flights:
                  - departure_airport_code: MUC
                    arrival_airport_code: FRA
                    departure_date: 2023-10-20
                  - departure_airport_code: IST
                    arrival_airport_code: WAW
                    departure_date: 2023-10-21
                  passengers:
                  - type: ADT
              With Carrier Filter:
                summary: Search Offers
                value:
                  flights:
                  - departure_airport_code: WAW
                    arrival_airport_code: FRA
                    departure_date: 2023-10-20
                  passengers:
                  - type: ADT
                  filters:
                    carriers:
                    - LH
        required: true
  "/offers/{id}/price":
    parameters:
    - "$ref": "#/components/parameters/offerIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    patch:
      summary: Price Offer
      operationId: priceOffer
      tags:
      - offers
      description: In the offer search operation price can be outdated. You need to
        send this request to receive actual price.
      responses:
        '200':
          description: Returns an Offer with actual price
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Offer"
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "validation_error"
                  message: "'value' is not a valid offer_id"
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/offers/{id}/fare_rules":
    parameters:
    - "$ref": "#/components/parameters/offerIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Get Offer Fare Rules
      operationId: getOfferFareRules
      tags:
      - offers
      description: Returns fare rules for the given offer.
      responses:
        '200':
          description: Returns a FareRule
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/FareRule"
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "validation_error"
                  message: "'value' is not a valid offer_id"
        '501':
          description: Not implemented for the provider
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_implemented_error"
                  message: "Method not implemented for current provider"
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/offers/{id}/upsell":
    parameters:
    - "$ref": "#/components/parameters/offerIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Upsell Offer
      operationId: getOfferUpsell
      tags:
      - offers
      description: Returns all bookable fares (branded fares / fare families) available
        for the given offer. Supported only for channels that require offer details;
        other channels return a channel_not_supported error.
      responses:
        '200':
          description: Returns a list of upsell offers
          content:
            application/json:
              schema:
                type: object
                properties:
                  flights_options:
                    type: array
                    items:
                      "$ref": "#/components/schemas/FlightsOption"
                  passengers:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Passenger"
                  fares:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Fare"
                  segments:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Segment"
                required:
                - flights_options
                - passengers
                - segments
                - fares
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "validation_error"
                  message: "'value' is not a valid offer_id"
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/offers/{id}/ancillaries":
    parameters:
    - "$ref": "#/components/parameters/offerIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Shop Offer Ancillaries
      operationId: getOfferAncillaries
      tags:
      - offers
      description: Returns the baggage available for the given offer, before an order
        exists. The selection is confirmed later by passing the ancillary ids into
        the createOrder request. Supported only for channels with offer baggage enabled;
        other channels return a channel_is_off error.
      responses:
        '200':
          description: Returns available offer ancillaries
          content:
            application/json:
              schema:
                type: object
                required:
                - ancillaries
                properties:
                  ancillaries:
                    type: array
                    items:
                      "$ref": "#/components/schemas/Ancillary"
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "validation_error"
                  message: "'value' is not a valid offer_id"
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders":
    parameters:
    - "$ref": "#/components/parameters/apiVersionParam"
    post:
      summary: Create Order
      operationId: createOrder
      tags:
      - orders
      description: Creates an order for the given offer and a set of passengers. An
        order is used to issue tickets. It will be expired at expire_at time.
      parameters: []
      responses:
        '201':
          description: Returns a created Order
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Order"
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              examples:
                validation_error:
                  value:
                    error:
                      code: "validation_error"
                      message: "{'passengers':{'0':{'document':['is missing']}}}"
                offer_not_found:
                  value:
                    error:
                      code: "offer_not_found"
                      message: "Offer is not found."
        '401':
          "$ref": "#/components/responses/Unauthorized"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                offer_id:
                  type: string
                passengers:
                  type: array
                  minItems: 1
                  maxItems: 9
                  items:
                    type: object
                    required:
                    - id
                    - type
                    - individual
                    properties:
                      id:
                        type: string
                        example: PAX1
                        description: Passenger ID returned from searchOffers or priceOffer
                          operations.
                      type:
                        "$ref": "#/components/schemas/PassengerType"
                      individual:
                        type: object
                        required:
                        - first_name
                        - last_name
                        description: An individual information about the passenger.
                          All values must be the same as in document.
                        properties:
                          first_name:
                            type: string
                            example: James
                            description: First name of the passenger.
                          last_name:
                            type: string
                            example: Watson
                            description: Last name of the passenger.
                          title:
                            type: string
                            example: Mr
                            description: Personal title of the passenger. Required
                              by some providers.
                          gender:
                            type: string
                            enum:
                            - M
                            - F
                            example: M
                            description: Gender of the passenger.
                          date_of_birth:
                            type: string
                            format: date
                            example: 1990-10-01
                            description: Date of birth of the passenger.
                      phone:
                        type: string
                        example: "+442079460000"
                        description: Phone number of the passenger. There must be
                          at least one phone number among all passengers.
                      email:
                        type: string
                        example: example@mail.com
                        description: Email address of the passenger. There must be
                          at least one email address among all passengers.
                      document:
                        type: object
                        required:
                        - number
                        - gender
                        - citizenship
                        - country_of_issue
                        - expiration_date
                        description: This field is not required since most providers
                          will issue a ticket without a document. However we recommend
                          to send documents when possible to avoid such errors while
                          isuing.
                        properties:
                          number:
                            type: string
                            example: AA234567
                            description: Document number of the passenger.
                          gender:
                            type: string
                            enum:
                            - M
                            - F
                            example: M
                            description: Gender of the passenger.
                          citizenship:
                            "$ref": "#/components/schemas/CountryCode"
                          country_of_issue:
                            "$ref": "#/components/schemas/CountryCode"
                          expiration_date:
                            type: string
                            format: date
                            example: 2026-09-11
                            description: An expiration date of the document.
                          issued_date:
                            type: string
                            format: date
                            example: 2019-09-11
                            description: An issued date of the document. Required
                              only for FlyOne
                ancillaries:
                  type: array
                  description: Baggage shopped on the offer (getOfferAncillaries)
                    and confirmed together with the order. Supported only on channels
                    with offer baggage enabled (e.g. FlyOne); other channels return
                    channel_is_off.
                  items:
                    type: object
                    required:
                    - id
                    - passenger_id
                    properties:
                      id:
                        type: string
                        example: STB1
                        description: Ancillary id obtained from the getOfferAncillaries
                          response.
                      passenger_id:
                        type: string
                        example: PAX_1
                        description: Passenger id from this order (passengers[].id).
                      quantity:
                        type: integer
                        minimum: 1
                        example: 1
                        description: Quantity for this passenger; must not exceed
                          max_quantity. Optional, defaults to 1. Not supported by
                          every provider — where unsupported, send a separate ancillaries
                          entry per passenger instead.
        required: true
    get:
      summary: List Orders
      operationId: listOrders
      tags:
      - orders
      description: Returns a list of orders created by the current user.
      responses:
        '200':
          description: Returns a list of an Order
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/Order"
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders/{id}":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Get Order
      operationId: getOrder
      tags:
      - orders
      description: Returns actual order information.
      responses:
        '200':
          description: Returns an actual Order
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Order"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '401':
          "$ref": "#/components/responses/Unauthorized"
    delete:
      summary: Cancel Order
      operationId: cancelOrder
      tags:
      - cancellation
      description: Cancels an order and deletes it from the list. Returns a deleted
        time of the order. Check Guides for the details concerning the cancellation
        process.
      responses:
        '200':
          description: Returns a deleted Order
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Order"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders/{id}/issue":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    post:
      summary: Issue Order
      operationId: issueOrder
      tags:
      - orders
      description: Issues tickets for the given order. At this stage payment occurs.
      parameters: []
      responses:
        '200':
          description: Returns an Order with issued tickets
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Order"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          description: Price changed
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              examples:
                price_changed:
                  value:
                    error:
                      code: "price_changed"
                      message: "{'old':100.0,'new':105.0,'currency':'USD'}"
                issue_required_seats:
                  summary: "The fare needs a seat for every passenger first"
                  value:
                    error:
                      code: "issue_required_seats"
                      message: "A seat must be selected for every passenger before issuing."
        '401':
          "$ref": "#/components/responses/Unauthorized"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reshop:
                  type: boolean
                  default: false
                  description: When price of an order changed you need to pass `true`
                    to issue the order with the updated price. Otherwise you will
                    receive price_changed error.
                form_of_payment:
                  type: object
                  required:
                  - type
                  description: Form of payment for the order. If this field is ommited,
                    cash will be used.
                  properties:
                    type:
                      type: string
                      enum:
                      - cash
                      - credit_card
                      default: cash
                      description: Type of payment source.
                    credit_card:
                      type: object
                      description: Credit card information to make payment. Should
                        be passed only if type is credit_card. Currently credit_card
                        is avaiable for specific channels.
                      required:
                      - holder
                      - number
                      - exp_month
                      - exp_year
                      properties:
                        holder:
                          type: string
                          example: John Smith
                          description: Full cardholder name.
                        number:
                          type: string
                          example: '5577810000000004'
                          description: Full card number.
                          pattern: "^\\d{12,19}$"
                        exp_month:
                          type: string
                          example: '07'
                          description: Expiration month of the card.
                          pattern: "^\\d{2}$"
                        exp_year:
                          type: string
                          example: '2027'
                          description: Expiration year of the card.
                          pattern: "^\\d{4}$"
                        cvv:
                          type: string
                          example: '033'
                          description: Verification code ot the card. Could be required
                            for some channels.
                          pattern: "^\\d{3,4}$"
            examples:
              Default:
                summary: Issue Order
                value:
                  reshop: false
                  form_of_payment:
                    type: cash
              Credit Card:
                summary: Issue Order
                value:
                  reshop: false
                  form_of_payment:
                    type: credit_card
                    credit_card:
                      holder: John Smith
                      number: '5577810000000004'
                      exp_month: '07'
                      exp_year: '2027'
                      cvv: '033'
  "/orders/{id}/reprice":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Reprice Order
      operationId: repriceOrder
      tags:
      - orders
      description: 'Re-quotes the current price of the order and reports whether it
        changed. Use before issuing an order whose price_expires_at has passed, then
        issue with `reshop: true` to accept the new price.'
      responses:
        '200':
          description: Returns the current price quote
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PriceChange"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders/{id}/refund_quote":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Quote Order Refund
      operationId: quoteOrderRefund
      tags:
      - cancellation
      description: 'Asks the airline what refunding the order would return, without
        refunding it. Nothing is charged or returned: confirm with POST /orders/{id}/refund.
        Safe to repeat — every call re-quotes. Available on channels that support
        refunds through the API; an order that can still be voided must be cancelled
        instead.'
      responses:
        '200':
          description: Returns the refund quote
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/RefundQuote"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          description: Refund is not available for the channel
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "refund_unavailable"
                  message: "Refund is not available for this channel."
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders/{id}/refund":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    post:
      summary: Refund Order
      operationId: refundOrder
      tags:
      - cancellation
      description: 'Confirms the refund quoted by POST /orders/{id}/refund_quote.
        This moves money: the tickets are refunded with the airline and your balance
        is topped up. A document that comes back with a status other than REFUNDED
        is accepted but still being processed by the airline — poll GET /orders/{id}
        for the final state.'
      responses:
        '200':
          description: Returns the refunded order
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Refund"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          description: Order cannot be refunded
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "refund_not_allowed"
                  message: "Refund is not permitted for the order."
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders/{id}/fare_rules":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: Get Order Fare Rules
      operationId: getOrderFareRules
      tags:
      - orders
      description: Returns fare rules for the given order.
      responses:
        '200':
          description: Returns a FareRule
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/FareRule"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '501':
          description: Not implemented for the provider
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_implemented_error"
                  message: "Method not implemented for current provider"
        '401':
          "$ref": "#/components/responses/Unauthorized"
  "/orders/{id}/seat_maps":
    parameters:
    - "$ref": "#/components/parameters/orderIdParam"
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: View Seat Maps
      operationId: viewSeatMaps
      tags:
      - seat maps
      description: Returns the seat maps of the order, one per passenger per segment.
        Unavailable seats are included so the whole cabin can be rendered.
      responses:
        '200':
          description: Returns the seat maps
          content:
            application/json:
              schema:
                type: object
                required:
                - seat_maps
                properties:
                  seat_maps:
                    type: array
                    items:
                      "$ref": "#/components/schemas/SeatMap"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          "$ref": "#/components/responses/ChannelOrStatusError"
        '401':
          "$ref": "#/components/responses/Unauthorized"
    post:
      summary: Add Seats
      operationId: addSeats
      tags:
      - seat maps
      description: Adds the selected seats to the order. Each item assigns one seat
        (designator) to one passenger on one segment. Returns the updated order.
      parameters: []
      responses:
        '200':
          description: Returns the updated Order
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Order"
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              example:
                error:
                  code: "not_found"
                  message: "We have not found such a resource."
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Error"
              examples:
                validation_error:
                  value:
                    error:
                      code: "validation_error"
                      message: "{\"seat_maps\":[\"must be filled\"]}"
                channel_is_off:
                  summary: "The channel doesn't support seat maps"
                  value:
                    error:
                      code: "channel_is_off"
                      message: "This channel does not support seat maps."
                invalid_order_status:
                  summary: "The order can no longer take seats (e.g. already issued)"
                  value:
                    error:
                      code: "invalid_order_status"
                      message: "The order's status does not allow seat selection."
        '401':
          "$ref": "#/components/responses/Unauthorized"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - seat_maps
              properties:
                seat_maps:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                    - passenger_id
                    - segment_id
                    - designator
                    properties:
                      passenger_id:
                        type: string
                        example: PAX_1
                        description: Passenger id from the order.
                      segment_id:
                        type: string
                        example: SEG_M_1
                        description: Segment id from the order / seat map.
                      designator:
                        type: string
                        example: 12A
                        description: Seat designator from the View Seat Maps response.
        required: true
  "/reporting/tickets":
    parameters:
    - "$ref": "#/components/parameters/apiVersionParam"
    get:
      summary: List Reporting Tickets
      operationId: listReportingTickets
      tags:
      - reporting
      description: Returns a list of all tickets of the current user. This operation
        is usually used for different kinds of reports.
      parameters:
      - in: query
        name: date_from
        schema:
          type: string
          format: date_time
          example: '2022-09-16T00:00:00+03:00'
        description: The default value is the start of today.
      - in: query
        name: date_to
        schema:
          type: string
          format: date_time
          example: '2022-09-16T23:59:59+03:00'
        description: The default value is the end of today.
      - in: query
        name: number
        required: false
        schema:
          type: string
          example: '5661234567890'
        description: Filter by ticket number. Used when locator is blank.
      - in: query
        name: locator
        required: false
        schema:
          type: string
          example: ABCDE12
        description: Filter by booking locator (PNR). Takes precedence over number
          and date range.
      responses:
        '200':
          description: Returns a list of ReportingTicket
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/ReportingTicket"
            application/xml:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/ReportingTicket"
        '401':
          "$ref": "#/components/responses/Unauthorized"
servers:
- url: https://sandbox-api.drct.aero
  description: Sandbox server (test bookings; real flight data for LOT, Lufthansa, Turkish Airlines and Wizz Air)
- url: https://api.drct.aero
  description: Production server (uses live data)
tags:
- name: offers search
  description: Find bookable flight and fare combinations for a route and a list of passengers.
- name: offers
  description: Work with a single searched offer before booking — reprice it, expand its branded fares, read its fare rules, shop its ancillaries.
- name: orders
  description: Create, issue, read and reprice orders (bookings).
- name: cancellation
  description: Cancel an order, or quote and process a refund for an issued one.
- name: ancillaries
  description: Shop and confirm paid extras such as checked baggage on an existing order.
- name: seat maps
  description: View an order's seat maps and assign seats before it is issued.
- name: reporting
  description: Pull issued-ticket records for reconciliation.
security:
- bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  parameters:
    acceptEncodingParam:
      name: Accept-Encoding
      in: header
      description: We can compress a response with gzip.
      required: false
      schema:
        type: string
        example: gzip deflate
    apiVersionParam:
      name: DRCT-Version
      in: header
      description: DRCT API contract version — `2021-06-01` or `2026-09-01`. When
        omitted, the newest version that existed when your account was created is
        used. See the Versioning section for the differences.
      required: false
      schema:
        type: string
        enum:
        - 2021-06-01
        - 2026-09-01
        example: 2026-09-01
    offerIdParam:
      name: id
      in: path
      schema:
        type: string
        example: LH_6322c0cc1af833380f7e7bc5
      description: An OfferId obtained from searchOffers operation.
      required: true
    orderIdParam:
      name: id
      in: path
      schema:
        type: string
        example: 25a40284-991c-4368-842d-14a704c9bae6
        format: uuid
      description: An OrderId obtained from createOrder operation.
      required: true
  responses:
    Unauthorized:
      description: The API key is missing, malformed, or used against the wrong environment.
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
          example:
            error:
              code: unauthorized
              message: "Key missing, malformed, or used against the wrong environment."
    ChannelOrStatusError:
      description: The order's channel doesn't support this operation, or the order's current status doesn't allow it.
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
          examples:
            channel_is_off:
              summary: The order's channel doesn't support this operation
              value:
                error:
                  code: channel_is_off
                  message: "This channel does not support this operation."
            invalid_order_status:
              summary: The order's status doesn't allow this operation (e.g. already issued)
              value:
                error:
                  code: invalid_order_status
                  message: "The order's status does not allow this operation."
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: validation_error
              description: "Machine-readable error type — branch on this, never on message. Documented codes (https://docs.drct.aero/#errors): unauthorized, not_found, validation_error, offer_not_found, price_changed, channel_not_supported, refund_unavailable, refund_not_allowed, channel_is_off, invalid_order_status, ancillary_quantity_not_supported, issue_required_seats, provider_error, not_implemented_error. Deliberately not an enum: a refusal from the airline itself is passed through with the provider's own code, so treat any code you don't recognise as a generic failure."
            message:
              type: string
              example: We have not found such a resource.
              description: A human-readable error description — for logs and support, not for branching.
    Airport:
      type: object
      required:
      - code
      - name
      properties:
        code:
          "$ref": "#/components/schemas/AirportCode"
        name:
          type: string
          example: Boryspil International Airport
    AirportCode:
      type: string
      example: KBP
      description: An IATA 3-Letter airport's code.
      pattern: "^[A-Z]{3}$"
    Ancillary:
      type: object
      required:
      - id
      - name
      - type
      - price
      - segments
      description: An ancillary service available for the order.
      properties:
        id:
          type: string
          example: ANCILLARY_42622140D81C4F8DBFCD3A724E0BA4EE-0DG-5
          description: Unique ancillary id. Use this value when confirming the ancillary.
        name:
          type: string
          example: Bag 20 KG
          description: Name of the ancillary service.
        type:
          type: string
          enum:
          - baggage
          - service
          example: baggage
          description: baggage for bags, service for any other extra (priority boarding,
            check-in, special assistance…).
        price:
          "$ref": "#/components/schemas/Price"
          description: Total price for one unit of the ancillary.
        max_quantity:
          type: integer
          minimum: 1
          example: 1
          description: Maximum quantity per passenger, when reported by the provider.
        segments:
          type: array
          items:
            type: string
            example: SEG_M_1
          description: Segment ids the ancillary is bound to (match getOrder). Empty
            in the shop list for a service that applies to the passenger on the whole
            order (e.g. special assistance); once confirmed, the order shows it with the
            flight's segments.
        passengers:
          type: array
          items:
            type: string
            example: PAX_1
          description: Passenger ids the ancillary applies to, when the provider scopes
            it per passenger. Omitted for passenger-agnostic providers.
    OrderAncillary:
      type: object
      required:
      - name
      - type
      - price
      - segments
      - passenger
      description: An ancillary service confirmed on the order.
      properties:
        id:
          type: string
          example: ANCILLARY_42622140D81C4F8DBFCD3A724E0BA4EE-0DG-5
          description: Unique ancillary id.
        name:
          type: string
          example: Bag 20 KG
          description: Name of the ancillary service.
        type:
          type: string
          enum:
          - baggage
          - service
          example: baggage
          description: baggage for bags, service for any other extra.
        price:
          "$ref": "#/components/schemas/Price"
          description: Price paid for the ancillary.
        segments:
          type: array
          items:
            type: string
            example: SEG_M_1
          description: Segment ids the ancillary is bound to (match getOrder).
        passenger:
          type: string
          example: PAX_1
          description: Passenger id the ancillary is assigned to.
        status:
          type: string
          enum:
          - confirmed
          - pending
          - issued
          - cancelled
          example: issued
          description: Status of the ancillary in the order.
    SeatMap:
      type: object
      required:
      - segment
      - passenger
      - cabin
      - rows
      description: Seat map for one passenger on one segment.
      properties:
        segment:
          type: string
          example: SEG_M_1
          description: Segment id the map is built for (matches getOrder).
        passenger:
          type: string
          example: PAX_1
          description: Passenger id the map is built for.
        cabin:
          type: string
          example: Economy
        rows:
          type: array
          items:
            "$ref": "#/components/schemas/SeatRow"
    SeatRow:
      type: object
      required:
      - number
      - seats
      properties:
        number:
          type: integer
          example: 12
        seats:
          type: array
          items:
            "$ref": "#/components/schemas/Seat"
    Seat:
      type: object
      required:
      - designator
      - available
      - price
      description: A single seat. Unavailable seats are included too, so the whole
        cabin can be rendered.
      properties:
        designator:
          type: string
          example: 12A
          description: Seat designator.
        available:
          type: boolean
          example: true
        characteristics:
          type: array
          items:
            "$ref": "#/components/schemas/SeatCharacteristic"
          description: IATA seat characteristics (e.g. window, exit row, extra legroom).
        price:
          "$ref": "#/components/schemas/Price"
          description: Final price to select this seat (markup already applied).
    SeatCharacteristic:
      type: object
      required:
      - code
      - description
      properties:
        code:
          type: string
          example: L
          description: IATA seat characteristic code.
        description:
          type: string
          example: Leg space seat
    OrderSeat:
      type: object
      required:
      - passenger
      - segment
      - designator
      - price
      description: A seat confirmed on the order.
      properties:
        passenger:
          type: string
          example: PAX_1
          description: Passenger id the seat is assigned to.
        segment:
          type: string
          example: SEG_M_1
          description: Segment id the seat is on.
        designator:
          type: string
          example: 12A
        price:
          "$ref": "#/components/schemas/Price"
          description: Price paid for the seat (final; markup already applied).
        status:
          type: string
          example: issued
          description: Status of the seat on the order, when reported.
    OrderEmd:
      type: object
      required:
      - number
      - passenger
      - price
      - segments
      description: An electronic document (EMD) issued on the order.
      properties:
        number:
          type: string
          example: ZZ655S
          description: EMD document number.
        name:
          type: string
          example: Seat 01A
          description: Human-readable name of the document (e.g. the seat or bag),
            when the provider reports it.
        passenger:
          type: string
          example: PAX_1
          description: Passenger the EMD is issued for.
        price:
          "$ref": "#/components/schemas/Price"
          description: Price of the EMD (final; markup already applied).
        segments:
          type: array
          items:
            type: string
            example: SEG_M_1
          description: Segment ids the EMD applies to.
    CancellationRule:
      type: object
      required:
      - cancelable
      properties:
        cancelable:
          type: boolean
          description: Indicates whether is it possible to cancel the booking.
          example: true
        fee_applies:
          type: boolean
          description: Indicates are there any fees applied when booking is canceled.
          example: false
        before_departure:
          "$ref": "#/components/schemas/Price"
          description: Before departure fee (if applied).
        after_departure:
          "$ref": "#/components/schemas/Price"
          description: After departure fee (if applied).
    Carrier:
      type: string
      example: LH
      description: An IATA 2-Letter airline's code.
      pattern: "^[\\dA-Z]{2}$"
    City:
      type: object
      required:
      - code
      - name
      properties:
        code:
          type: string
          example: IEV
          description: An IATA 3-Letter city's code. Usually equals to the airport
            code.
          pattern: "^[A-Z]{3}$"
        name:
          type: string
          example: Kyiv
    CountryCode:
      type: string
      pattern: "^[A-Z]{2}$"
      example: UA
      description: An ISO 3166-1 alpha-2 country code.
    Currency:
      type: string
      example: EUR
      pattern: "^[A-Z]{3}$"
      description: An ISO 4217 alpha-3 currency code.
    Document:
      type: object
      required:
      - passenger
      - number
      - citizenship
      - expiration_date
      - date_of_birth
      - gender
      properties:
        passenger:
          type: string
          example: PAX1
          description: A passenger identifier within current response.
        number:
          type: string
          example: AA234567
          description: Document number of the passenger.
        citizenship:
          "$ref": "#/components/schemas/CountryCode"
        expiration_date:
          type: string
          format: date
          example: 2026-09-11
          description: An expiration date of the document.
        date_of_birth:
          type: string
          format: date
          example: 1990-10-01
          description: Date of birth of the passenger.
        gender:
          type: string
          enum:
          - M
          - F
          example: M
          description: Gender of the passenger.
        country_of_issue:
          "$ref": "#/components/schemas/CountryCode"
        first_name:
          type: string
          example: James
          description: First name of the passenger.
        last_name:
          type: string
          example: Watson
          description: Last name of the passenger.
        segments:
          type: array
          minItems: 1
          description: A list of segments ids within current response.
          example:
          - 63299a951af83376ede02bb8
          items:
            type: string
        action_code:
          type: string
          example: HK
          description: A documents's PNR action code returned from the airline.
        carrier:
          "$ref": "#/components/schemas/Carrier"
        ssr_code:
          type: string
          example: DOCS
          description: A documents's PNR ssr code returned from the airline.
        type:
          type: string
          example: P
          description: A document type returned from the airline (usually a code).
    Email:
      type: object
      required:
      - address
      properties:
        address:
          type: string
          example: example@mail.com
          description: A valid email address.
        type:
          type: string
          example: work
        passengers:
          type: array
          minItems: 1
          description: A list of passengers ids that are bound to this email.
          example:
          - PAX1
          items:
            type: string
    Fare:
      type: object
      required:
      - price_class_name
      - cabin_class
      - baggage
      properties:
        id:
          type: string
          example: 6329a0ff1af83376ede02bc5
          description: Identifies a fare.
        segments:
          type: array
          minItems: 1
          description: A list of segments ids within current response.
          example:
          - 63299a951af83376ede02bb8
          items:
            type: string
        passengers:
          type: array
          minItems: 1
          description: A list of passengers ids within current response.
          example:
          - PAX1
          items:
            type: string
        price_class_name:
          type: string
          example: Basic
          description: A marketing name for the price class determined by a channel.
        fare_basis_code:
          type: string
          example: SSAVP0
          description: An identifier of a fare in scope of a channel.
        class_of_service:
          type: string
          example: L
          description: An internal identifier of a fare group inside a channel.
        cabin_class:
          type: string
          enum:
          - Economy
          - Premium Economy
          - Business
          - First
          example: Economy
          description: The section of an aircraft in which passengers travel.
        baggage:
          type: array
          description: 'There are three types of baggage restrictions: by pieces,
            by weight or by pieces and weight.'
          items:
            type: object
            required:
            - quantity
            - type
            properties:
              quantity:
                type: integer
                minimum: 0
                example: 1
                description: Number of baggage pieces allowed under current fare rules.
                  If quantity equals zero and max_weight parameter is present then
                  any number of pieces allowed up to max_weight.
              type:
                type: string
                enum:
                - checked
                - carry-on
                example: checked
                description: Type of a baggage allowance. Usually you need only checked
                  baggage, in this case just do not use carry-on type.
              max_weight:
                type: object
                required:
                - value
                - unit
                description: Any number of pieces will be limited by max weight if
                  this parameter present.
                properties:
                  value:
                    type: integer
                    minimum: 0
                    example: 8
                    description: Amount of maximum baggage weight.
                  unit:
                    type: string
                    example: KG
                    description: Unit of measurement.
        changes:
          "$ref": "#/components/schemas/ModificationRule"
          description: Describes ability and price of changing the booking.
        cancellation:
          "$ref": "#/components/schemas/CancellationRule"
          description: Describes ability and price of cancelling the booking.
    FareRule:
      type: object
      required:
      - route
      - name
      - text
      description: A fare rule is returned directly from provider.
      properties:
        route:
          type: string
          example: FRA-CDG
          description: A pair of departure/arrival airports where the rule is applied.
        name:
          type: string
          example: Day and/or Time Application
          description: A short description of the rule returned by provider.
        text:
          type: string
          example: NO DAY/TIME TRAVEL RESTRICTIONS
          description: A text description of the rule returned by provider.
        category:
          type: string
          example: APP
          description: A code description of the rule returned by provider.
    Flight:
      type: object
      required:
      - journey_time
      - segments
      properties:
        journey_time:
          type: integer
          example: 9600
          minimum: 1
          description: A time in seconds between departure from the departure airport
            of the first segment and arriving to the arrival airport of the last.
        segments:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Segment"
    FlightsOption:
      type: object
      required:
      - flights
      - offers
      properties:
        flights:
          type: array
          description: A journey from one airport to another. It is composed of either
            one or several married segments.
          minItems: 1
          items:
            type: object
            required:
            - id
            - journey_time
            - segments
            properties:
              id:
                type: string
                example: F1
                description: An identifier of the flight in scope of current response.
              journey_time:
                type: integer
                example: 9600
                minimum: 1
                description: A time in seconds between departure from the departure
                  airport of the first segment and arriving to the arrival airport
                  of the last.
              segments:
                type: array
                minItems: 1
                description: A list of segments ids that composes the flight. Use
                  this id to find a segment in top-level `segments` field.
                example:
                - 63299a951af83376ede02bb8
                items:
                  type: string
        offers:
          type: array
          minItems: 1
          description: A set of fares and prices for the given route and passengers
            types. Used in further operations to create an order.
          items:
            type: object
            required:
            - id
            - channel
            - fares
            - price
            - price_details
            properties:
              id:
                type: string
                example: LH_6322c0cc1af833380f7e7bc5
                description: Identifies an offer. Use this ID for further operations.
              channel:
                type: string
                example: Lufthansa Group
                description: A name of the channel. Corresponds to channels in your
                  DRCT account.
              expire_at:
                type: string
                format: date-time
                example: '2022-09-20T14:46:15+03:00'
                description: An expiration time after which an offer will be invalid.
                  Concrete value depends on channel, however maximum ttl is 30 minutes.
              fares:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - segments
                  properties:
                    id:
                      type: string
                      example: 6329a0ff1af83376ede02bc5
                      description: Identifies a fare. Use this id to find a segment
                        in top-level `fares` field.
                    segments:
                      type: array
                      minItems: 1
                      description: A list of segments ids for which the fare is applied.
                        Use this id to find a segment in top-level `segments` field.
                      example:
                      - 63299a951af83376ede02bb8
                      items:
                        type: string
              price:
                "$ref": "#/components/schemas/Price"
              price_details:
                type: array
                items:
                  "$ref": "#/components/schemas/PriceDetail"
    ModificationRule:
      type: object
      required:
      - changeable
      properties:
        changeable:
          type: boolean
          description: Indicates whether is it possible to change the booking.
          example: true
        fee_applies:
          type: boolean
          description: Indicates are there any fees applied when booking is changed.
          example: false
        before_departure:
          "$ref": "#/components/schemas/Price"
          description: Before departure fee (if applied).
        after_departure:
          "$ref": "#/components/schemas/Price"
          description: After departure fee (if applied).
    MoneyAmount:
      type: number
      format: float
      example: 100.0
      description: A positive float value representing amount of money.
    Offer:
      type: object
      required:
      - id
      - channel
      - passengers
      - flights
      - fares
      - price
      - price_details
      properties:
        id:
          type: string
          example: LH_6322c0cc1af833380f7e7bc5
          description: Identifies an offer.
        expire_at:
          type: string
          format: date-time
          example: '2022-09-20T14:46:15+03:00'
          description: An expiration time after which an offer will be invalid. Concrete
            value depends on channel, however maximum ttl is 30 minutes.
        channel:
          type: string
          example: Lufthansa Group
          description: A name of the channel. Corresponds to channels in your DRCT
            account.
        price:
          "$ref": "#/components/schemas/Price"
        price_details:
          type: array
          items:
            "$ref": "#/components/schemas/PriceDetail"
        passengers:
          type: array
          minItems: 1
          maxItems: 9
          items:
            "$ref": "#/components/schemas/Passenger"
        flights:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Flight"
        fares:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Fare"
    Order:
      type: object
      required:
      - id
      - status
      - channel
      - locator
      properties:
        id:
          type: string
          example: 6e5257be-d8d4-484f-8db0-922df4c8402a
          description: Identifies an order.
        channel:
          type: string
          example: Lufthansa Group
          description: A name of the channel. Corresponds to channels in your DRCT
            account.
        locator:
          type: string
          example: C57I60
          description: A PNR identifier supplied by the provider.
        status:
          type: string
          example: new
          enum:
          - new
          - pending
          - voided
          - issued
          - refunded
          - deleted
          description: 'Current order status. It will be changed when an operation
            will be applied. `pending` — the provider accepted the order for issuing
            but has not returned tickets yet; it turns into `issued` once they arrive.
            `pending` is only returned on `DRCT-Version: 2026-09-01` — on `2021-06-01`
            the same order is reported as `issued`.'
        airline_locators:
          type: array
          items:
            type: object
            required:
            - locator
            - carrier
            description: A PNR identifier supplied by an airline.
            properties:
              locator:
                type: string
                example: C57I60
                description: A PNR identifier supplied by the provider.
              carrier:
                "$ref": "#/components/schemas/Carrier"
        cancel_before:
          type: string
          format: date-time
          example: '2022-10-08T11:44:45.000+03:00'
          description: An expiry time of the order. After this time the order will
            be deleted automatically.
        price_expires_at:
          type: string
          format: date-time
          example: '2022-10-08T11:44:45.000+03:00'
          description: 'When the guaranteed price expires. Present only while the
            order is new. After this time re-quote the price via the reprice operation
            and issue with `reshop: true`. Continuous-pricing channels never freeze
            a price, so this is set to the booking creation time (in the past) to
            signal that the price must be re-quoted before issuing.'
        passengers:
          type: array
          minItems: 1
          maxItems: 9
          items:
            "$ref": "#/components/schemas/Passenger"
        flights:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Flight"
        fares:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Fare"
        phones:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Phone"
        emails:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/Email"
        tickets:
          type: array
          items:
            "$ref": "#/components/schemas/Ticket"
        documents:
          type: array
          items:
            "$ref": "#/components/schemas/Document"
        ancillaries:
          type: array
          items:
            "$ref": "#/components/schemas/OrderAncillary"
        seat_maps:
          type: array
          items:
            "$ref": "#/components/schemas/OrderSeat"
        emds:
          type: array
          items:
            "$ref": "#/components/schemas/OrderEmd"
        price:
          "$ref": "#/components/schemas/Price"
        price_details:
          type: array
          items:
            "$ref": "#/components/schemas/PriceDetail"
        deleted_at:
          type: string
          format: date-time
          example: '2022-10-07T12:32:21+03:00'
          description: A time when the order was deleted.
    Passenger:
      type: object
      required:
      - id
      - type
      properties:
        id:
          type: string
          example: PAX1
          description: Passenger ID returned from searchOffers or priceOffer operations.
        type:
          "$ref": "#/components/schemas/PassengerType"
        individual:
          type: object
          required:
          - first_name
          - last_name
          description: An individual information about the passenger. All values must
            be the same as in document.
          properties:
            first_name:
              type: string
              example: James
              description: First name of the passenger.
            last_name:
              type: string
              example: Watson
              description: Last name of the passenger.
            title:
              type: string
              example: Mr
              description: Personal title of the passenger. Required by some providers.
            gender:
              type: string
              enum:
              - M
              - F
              example: M
              description: Gender of the passenger.
            date_of_birth:
              type: string
              format: date
              example: 1990-10-01
              description: Date of birth of the passenger.
        infant_ref:
          type: string
          example: PAX2
          description: Passenger id of adult passenger associated with the infant.
            Filled only if this passenger is an infant.
    PassengerType:
      type: string
      enum:
      - ADT
      - CHD
      - INF
      example: ADT
      description: Name of a group of passengers.
    Phone:
      type: object
      required:
      - number
      properties:
        number:
          type: string
          example: "+442079460000"
          description: An international phone number.
        type:
          type: string
          example: Mobile
          description: A type of phone number (e.g. mobile, home, agency).
        passengers:
          type: array
          minItems: 1
          description: A list of passengers ids that are bound to this phone number.
          example:
          - PAX1
          items:
            type: string
    Price:
      type: object
      required:
      - amount
      - currency
      description: A money amount with currency.
      properties:
        amount:
          "$ref": "#/components/schemas/MoneyAmount"
        currency:
          "$ref": "#/components/schemas/Currency"
    PriceChange:
      type: object
      required:
      - price_changed
      description: A fresh price quote for an order compared to its current price.
      properties:
        old_price:
          "$ref": "#/components/schemas/Price"
        new_price:
          "$ref": "#/components/schemas/Price"
        price_changed:
          type: boolean
          example: true
          description: 'Whether the re-quoted price differs from the current order
            price. When true, issue with `reshop: true` to accept `new_price`.'
    RefundQuote:
      type: object
      required:
      - locator
      - total
      - penalty
      description: What a refund would return, quoted by the airline. Nothing is charged
        or returned until the refund is confirmed.
      properties:
        locator:
          type: string
          example: C57I60
          description: A PNR identifier supplied by the provider.
        total:
          allOf:
          - "$ref": "#/components/schemas/Price"
          description: The money that comes back to your balance. The penalty is already
            deducted from it.
        penalty:
          allOf:
          - "$ref": "#/components/schemas/Price"
          description: The penalty the airline holds back. Zero when the fare is fully
            refundable.
        fare:
          allOf:
          - "$ref": "#/components/schemas/Price"
          description: The fare half of the total. Omitted when the provider does
            not break the refund down.
        taxes:
          allOf:
          - "$ref": "#/components/schemas/Price"
          description: The taxes half of the total. Omitted when the provider does
            not break the refund down.
    RefundDocument:
      type: object
      required:
      - number
      - status
      description: A ticket or EMD covered by the refund.
      properties:
        number:
          type: string
          example: '2205740877684'
          description: A number of an electronic document issued by the airline.
        passenger:
          type: string
          example: PAX1
          description: A passenger identifier within current response.
        status:
          type: string
          example: REFUNDED
          description: REFUNDED once the airline has processed the document. Any other
            value means the refund is accepted but still in progress.
        total:
          "$ref": "#/components/schemas/Price"
        penalty:
          "$ref": "#/components/schemas/Price"
    Refund:
      type: object
      required:
      - id
      - locator
      - channel
      - status
      - tickets
      description: The outcome of a confirmed refund.
      properties:
        id:
          type: string
          format: uuid
          example: 6e5257be-d8d4-484f-8db0-922df4c8402a
          description: Identifies an order.
        locator:
          type: string
          example: C57I60
          description: A PNR identifier supplied by the provider.
        channel:
          type: string
          example: Turkish
          description: A name of the channel. Corresponds to channels in your DRCT
            account.
        status:
          type: string
          example: refunded
          description: The order status after the refund.
        total:
          allOf:
          - "$ref": "#/components/schemas/Price"
          description: The total returned to your balance, covering the documents
            the airline has already processed. Omitted while every document is still
            pending, and when the documents were refunded in different currencies.
        penalty:
          allOf:
          - "$ref": "#/components/schemas/Price"
          description: The total penalty held back, on the same terms as the total.
        tickets:
          type: array
          items:
            "$ref": "#/components/schemas/RefundDocument"
        emds:
          type: array
          description: Refunded EMDs, when the order had any.
          items:
            "$ref": "#/components/schemas/RefundDocument"
    PriceDetail:
      type: object
      required:
      - type
      - count
      - price
      description: A fare information grouped by a passenger type.
      properties:
        type:
          "$ref": "#/components/schemas/PassengerType"
        count:
          type: integer
          minimum: 1
          example: 1
          description: A number of passengers for the given group.
        price:
          "$ref": "#/components/schemas/Price"
        fare:
          type: object
          required:
          - amount
          - currency
          properties:
            amount:
              "$ref": "#/components/schemas/MoneyAmount"
            currency:
              "$ref": "#/components/schemas/Currency"
            equivalent_price:
              "$ref": "#/components/schemas/Price"
        taxes:
          type: object
          required:
          - amount
          - currency
          properties:
            amount:
              "$ref": "#/components/schemas/MoneyAmount"
            currency:
              "$ref": "#/components/schemas/Currency"
            breakdown:
              type: array
              description: List of applied taxes.
              items:
                type: object
                required:
                - code
                - amount
                - currency
                properties:
                  code:
                    type: string
                    example: YQ
                    description: A tax code determined by the channel.
                  description:
                    type: string
                    example: YQI LH CARRIER IMPOSED MISC FEE
                    description: A tax description determined by the channel.
                  amount:
                    "$ref": "#/components/schemas/MoneyAmount"
                  currency:
                    "$ref": "#/components/schemas/Currency"
                  equivalent_price:
                    "$ref": "#/components/schemas/Price"
    Segment:
      type: object
      required:
      - id
      - departure_airport
      - departure_city
      - arrival_airport
      - arrival_city
      - carrier
      - departure_date
      - departure_time
      - arrival_date
      - arrival_time
      - flight_number
      properties:
        id:
          type: string
          example: 6329a0ff1af83376ede02bc5
          description: Identifies a segment.
        departure_airport:
          "$ref": "#/components/schemas/Airport"
        departure_city:
          "$ref": "#/components/schemas/City"
        arrival_airport:
          "$ref": "#/components/schemas/Airport"
        arrival_city:
          "$ref": "#/components/schemas/City"
        carrier:
          type: object
          required:
          - airline_code
          - airline_name
          description: An airline whose designator code is recorded in flight coupon
            of an electronic ticket. This airline actually sells tickets.
          properties:
            airline_code:
              "$ref": "#/components/schemas/Carrier"
            airline_name:
              type: string
              example: Lufthansa
        operating_carrier:
          type: object
          required:
          - airline_code
          - airline_name
          description: An airline having operational control of an aircraft used for
            a given Codeshared Flight. This airline flies the plane.
          properties:
            airline_code:
              "$ref": "#/components/schemas/Carrier"
            airline_name:
              type: string
              example: Lufthansa
        departure_date:
          type: string
          example: 2022-10-27
          format: date
        departure_time:
          type: string
          example: '11:15'
          description: 24-hour time H:M.
          pattern: "^\\d{2}:\\d{2}$"
        arrival_date:
          type: string
          example: 2022-10-27
          format: date
        arrival_time:
          type: string
          example: '14:15'
          description: 24-hour time H:M.
          pattern: "^\\d{2}:\\d{2}$"
        flight_number:
          type: string
          example: '441'
          description: A numeric part of flight designator used to identify a flight
            in a specific airline.
          pattern: "^\\d{1,4}$"
        duration:
          type: integer
          example: 9600
          minimum: 1
          description: A time in seconds between departure and arrival.
        change_of_airport:
          type: boolean
          example: false
          description: Indicates is there an airport change between current and next
            segment.
        next_day:
          type: boolean
          example: false
          description: Indicates if the depature date differs from the arrival date.
        transfer_time:
          type: integer
          example: 1000
          description: A time in seconds between current segment's arrival time and
            next segment's departure time.
        status:
          type: string
          example: HK
          description: A segment's PNR status code returned from the airline (e.g.
            confirmed, waitlisted, unable to sell).
        departure_terminal:
          type: string
          example: D
        arrival_terminal:
          type: string
          example: A
        meal:
          type: string
          example: R
          description: A meal usually returned as a code and depends on an airline.
        aircraft:
          type: string
          example: Airbus A320
        stops:
          type: array
          description: An array of possible techinical stops, usually up to one.
          items:
            type: object
            required:
            - airport
            - departure_date
            - departure_time
            - arrival_date
            - arrival_time
            description: A single techinical stop occured during segment.
            properties:
              airport:
                "$ref": "#/components/schemas/Airport"
              departure_date:
                type: string
                example: 2022-10-27
                format: date
              departure_time:
                type: string
                example: '14:15'
                description: 24-hour time H:M.
                pattern: "^\\d{2}:\\d{2}$"
              arrival_date:
                type: string
                example: 2022-10-27
                format: date
              arrival_time:
                type: string
                example: '12:15'
                description: 24-hour time H:M.
                pattern: "^\\d{2}:\\d{2}$"
    Ticket:
      type: object
      required:
      - number
      - passenger
      - segments
      - status
      properties:
        number:
          type: string
          description: A number of an electronic document issued by the airline.
          example: '2205740877684'
        passenger:
          type: string
          example: PAX1
          description: A passenger identifier within current response.
        segments:
          type: array
          minItems: 1
          description: A list of segments ids within current response.
          example:
          - 63299a951af83376ede02bb8
          items:
            type: string
        status:
          type: string
          example: TICKETED
        commission:
          type: number
          example: 10
          description: An amount of agent's commission applied to the ticket.
        nett_total:
          type: number
          example: 4680.79
          description: An original ticket price without commission.
        last_transaction_at:
          type: string
          format: date-time
          example: '2022-10-07T12:32:21+03:00'
          description: A time when last status change occured.
        ticketing_office:
          type: string
          example: AH89
          description: Office ID of the order's issue.
        booking_office:
          type: string
          example: AH89
          description: Office ID of the order's creation.
    ReportingTicket:
      type: object
      required:
      - id
      - number
      - status
      - locator
      - type
      - booked_at
      - last_transaction_at
      - total_price
      - fare
      - originator
      - company
      - channel
      - passenger
      - segments
      properties:
        id:
          type: string
          format: uuid
          example: fca3a393-1f4b-4fd3-952b-a4a5df3fe61d
          description: Identifies a ticket.
        number:
          type: string
          description: A number of an electronic document issued by the airline.
          example: '2205740877684'
        status:
          type: string
          example: issued
          enum:
          - issued
          - void
          - reissued
          - refund
          - exchanged
          description: Current document's status. It will be changed when an operation
            will be applied.
        locator:
          type: string
          example: C57I60
          description: A PNR identifier supplied by the provider.
        type:
          type: string
          enum:
          - Ticket
          - EMD
          example: Ticket
          description: Eletronic document type.
        booked_at:
          type: string
          format: date-time
          example: '2022-10-07T12:32:21+03:00'
          description: A time when order of current ticket was created.
        last_transaction_at:
          type: string
          format: date-time
          example: '2022-10-07T12:32:21+03:00'
          description: A time when last status change occured.
        total_price:
          "$ref": "#/components/schemas/Price"
        fare:
          "$ref": "#/components/schemas/Price"
        taxes:
          "$ref": "#/components/schemas/Price"
        commission:
          type: number
          example: 10
          description: An amount of agent's commission applied to the document.
        commission_equivalent:
          type: number
          example: 10
          description: An amount of agent's equivalent commission applied to the document.
        originator:
          type: object
          required:
          - id
          - name
          description: A user that issued the electronic document.
          properties:
            id:
              type: string
              example: ZZ7YQ6
              description: A DRCT identifier of a user.
              pattern: "^[A-Z\\d]{6}$"
            name:
              type: string
              example: John Watson
              description: A user full name.
        company:
          type: object
          required:
          - id
          - name
          properties:
            id:
              type: string
              example: ZZ7YQ6
              description: A DRCT identifier of a company.
              pattern: "^[A-Z\\d]{6}$"
            name:
              type: string
              example: Travel Gods
              description: A user full name.
        ticketing_office:
          type: string
          example: AH89
          description: Office ID of the order's issue.
        booking_office:
          type: string
          example: AH89
          description: Office ID of the order's creation.
        channel:
          type: string
          example: Lufthansa Group
          description: A name of the channel. Corresponds to channels in your DRCT
            account.
        passsenger:
          type: object
          required:
          - first_name
          - last_name
          - type
          properties:
            first_name:
              type: string
              example: James
              description: First name of the passenger.
            last_name:
              type: string
              example: Watson
              description: Last name of the passenger.
            type:
              "$ref": "#/components/schemas/PassengerType"
        segments:
          type: array
          items:
            type: object
            required:
            - validating_carrier
            - carrier
            - flight_number
            - departure_airport_code
            - departure_airport_name
            - arrival_airport_code
            - arrival_airport_name
            - departured_at
            - arrived_at
            - duration
            - baggage
            - flight_class
            properties:
              validating_carrier:
                "$ref": "#/components/schemas/Carrier"
                description: An airline that validates or issues tickets (for multi-leg
                  flights).
              carrier:
                "$ref": "#/components/schemas/Carrier"
                description: An airline whose designator code is recorded in flight
                  coupon of an electronic ticket. This airline actually sells tickets.
              flight_number:
                type: integer
                example: 441
                description: A numeric part of flight designator used to identify
                  a flight in a specific airline.
                pattern: "^\\d{1,4}$"
              departure_airport_code:
                "$ref": "#/components/schemas/AirportCode"
              departure_airport_name:
                type: string
                example: Boryspil International Airport
              arrival_airport_code:
                "$ref": "#/components/schemas/AirportCode"
              arrival_airport_name:
                type: string
                example: Boryspil International Airport
              departured_at:
                type: string
                description: Datetime in ISO 8601 without a timezone. It's timezone
                  depends on departure airport.
                example: '2022-08-07T08:11:40'
              arrived_at:
                type: string
                description: Datetime in ISO 8601 without a timezone. It's timezone
                  depends on arrival airport.
                example: '2022-08-07T09:11:40'
              duration:
                type: string
                example: '02:40'
                description: A time between departure and arrival.
              fare_basis:
                type: string
                example: SSAVP0
                description: An identifier of a fare in scope of a channel.
              booking_class:
                type: string
                example: L
                description: An internal identifier of a fare group inside a channel.
              flight_class:
                type: string
                enum:
                - Economy
                - Premium Economy
                - Business
                - First
                example: Economy
                description: The section of an aircraft in which passengers travel.
              co2e:
                type: number
                format: float
                example: 113.019
                description: An amount of CO2e in kg applied to the segment.
