> ## 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 Search

> Search flights by route and passengers and receive priced offers with full segment details.



## OpenAPI

````yaml openapi/duffel.json POST /duffel/flights/offer-requests/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/offer-requests/create:
    post:
      summary: Create Flight Search
      description: >-
        Search flights by route and passengers. Returns an offer request with
        priced offers including full segment details. $0.02 per request.
      operationId: post_duffel_offer_requests_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - slices
                    - passengers
                  properties:
                    slices:
                      type: array
                      items:
                        $ref: '#/components/schemas/SliceInput'
                    passengers:
                      type: array
                      items:
                        $ref: '#/components/schemas/PassengerInput'
                    cabin_class:
                      $ref: '#/components/schemas/CabinClass'
                    max_connections:
                      type: integer
                      default: 1
                      description: Maximum connections per slice; 0 for direct flights only
      responses:
        '201':
          description: Offer request created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/OfferRequest'
        '422':
          description: Validation error (not charged)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    SliceInput:
      type: object
      required:
        - origin
        - destination
        - departure_date
      properties:
        origin:
          type: string
          description: IATA airport code (JFK) or city code (NYC)
        destination:
          type: string
          description: IATA airport code (ATL) or city code
        departure_date:
          type: string
          format: date
          description: YYYY-MM-DD
    PassengerInput:
      type: object
      properties:
        type:
          type: string
          enum:
            - adult
          description: Use for adults; passengers under 18 must provide age instead
        age:
          type: integer
          description: Required for passengers under 18
    CabinClass:
      type: string
      enum:
        - economy
        - premium_economy
        - business
        - first
    OfferRequest:
      type: object
      properties:
        id:
          type: string
          example: orq_0000BAzrX1jsN0lVbavyvg
        live_mode:
          type: boolean
        cabin_class:
          type: string
        slices:
          type: array
          items:
            $ref: '#/components/schemas/SliceInput'
        passengers:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: pas_0000BAzrX1jsN0lVbavyvi
              type:
                type: string
        offers:
          type: array
          items:
            $ref: '#/components/schemas/Offer'
    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
    Offer:
      type: object
      properties:
        id:
          type: string
          example: off_0000BAzrX1wdbYyQFAuAoz
        total_amount:
          type: string
          description: Decimal string, e.g. 70.48
          example: '70.48'
        total_currency:
          type: string
          example: USD
        expires_at:
          type: string
          format: date-time
        passenger_ids:
          type: array
          items:
            type: string
        slices:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              segments:
                type: array
                items:
                  $ref: '#/components/schemas/Segment'
    Segment:
      type: object
      properties:
        id:
          type: string
        origin:
          $ref: '#/components/schemas/Airport'
        destination:
          $ref: '#/components/schemas/Airport'
        departing_at:
          type: string
          format: date-time
        arriving_at:
          type: string
          format: date-time
        flight_number:
          type: string
        operating_carrier:
          type: object
          properties:
            name:
              type: string
            iata_code:
              type: string
    Airport:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        iata_code:
          type: string
        city_name:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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