> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Flight Order

> Book the selected offer and pay with your Aisa balance. Always refresh the offer immediately before ordering.



## OpenAPI

````yaml openapi/duffel.json POST /duffel/flights/orders/create
openapi: 3.0.3
info:
  title: Duffel Flights API
  version: v2
  description: >-
    Flight search, booking, changes, and cancellations through the Duffel
    network. Search by route and passengers, refresh offers before ordering,
    then book with a balance payment. Currently operates in sandbox mode (Duffel
    Airways test data).
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /duffel/flights/orders/create:
    post:
      summary: Create Flight Order
      description: >-
        Book the selected offer and pay with your Aisa balance. The payment
        amount must equal the refreshed offer total. Returns the airline booking
        reference and electronic ticket documents. Always refresh the offer
        immediately before ordering.
      operationId: post_duffel_orders_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - selected_offers
                    - payments
                    - passengers
                  properties:
                    selected_offers:
                      type: array
                      items:
                        type: string
                      maxItems: 1
                      description: Exactly one offer id
                    payments:
                      type: array
                      items:
                        $ref: '#/components/schemas/BalancePayment'
                      maxItems: 1
                    passengers:
                      type: array
                      items:
                        $ref: '#/components/schemas/BookingPassenger'
                    services:
                      type: array
                      description: Optional ancillaries (bags, seats) by service id
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          quantity:
                            type: integer
                          passenger_ids:
                            type: array
                            items:
                              type: string
      responses:
        '201':
          description: Order created with booking reference
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Order'
        '422':
          description: Validation error, expired offer, or amount mismatch (not charged)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    BalancePayment:
      type: object
      required:
        - type
        - amount
        - currency
      properties:
        type:
          type: string
          enum:
            - balance
        amount:
          type: string
          description: Must equal the refreshed offer total_amount
        currency:
          type: string
          description: Must equal the refreshed offer total_currency
    BookingPassenger:
      type: object
      required:
        - id
        - title
        - gender
        - given_name
        - family_name
        - born_on
        - email
        - phone_number
      properties:
        id:
          type: string
          description: Passenger id from the offer request response
        title:
          type: string
          enum:
            - mr
            - ms
            - mrs
            - dr
        gender:
          type: string
          enum:
            - m
            - f
            - x
        given_name:
          type: string
        family_name:
          type: string
        born_on:
          type: string
          format: date
        email:
          type: string
          format: email
          description: Must be the passenger's own email
        phone_number:
          type: string
        infant_passenger_id:
          type: string
          description: >-
            Infant passenger id this adult is responsible for; one infant per
            adult
    Order:
      type: object
      properties:
        id:
          type: string
          example: ord_0000BAzrYIJiDdmFJKIhcy
        booking_reference:
          type: string
          example: DJMT4D
        total_amount:
          type: string
        total_currency:
          type: string
        live_mode:
          type: boolean
        documents:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
                enum:
                  - electronic_ticket
              unique_id:
                type: string
        available_actions:
          type: array
          items:
            type: string
    ErrorEnvelope:
      type: object
      properties:
        meta:
          type: object
          properties:
            request_id:
              type: string
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              message:
                type: string
              source:
                type: object
                properties:
                  field:
                    type: string
                  pointer:
                    type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.