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

# Direct Airline Booking

> Create a direct booking with a specific airline system. This API facilitates direct digital booking between ACS and airline systems without intermediate steps.

<ParamField status="200" type="object">
  <ParamField name="bookingId" type="string">
    Booking identifier
  </ParamField>

  <ParamField name="status" type="string">
    Booking status
  </ParamField>

  <ParamField name="airlineConfirmationNumber" type="string">
    Airline confirmation number
  </ParamField>

  <ParamField name="flightDetails" type="object">
    Flight details with departure, arrival, and capacity information
  </ParamField>

  <ParamField name="message" type="string">
    Status message
  </ParamField>
</ParamField>

<ParamField status="400" type="object">
  <ParamField name="error" type="string">
    Error message
  </ParamField>
</ParamField>

<ParamField status="401" type="object">
  <ParamField name="error" type="string">
    Unauthorized error message
  </ParamField>
</ParamField>

### Reference Documentation

<Info>
  For more information on direct airline bookings, please refer to:

  * Page 21 of "Functional\_Requirements\_V18 FINAL": [https://belli.sg/4obmxJa](https://belli.sg/4obmxJa)
</Info>


## OpenAPI

````yaml POST /api/airlines/{airlineCode}/bookings
openapi: 3.0.3
info:
  title: Mock API
  version: 1.0.0
  description: >-
    Mock OpenAPI spec for QR API Service. All endpoints require API key
    authentication via 'Authorization: Bearer <token>' or 'x-api-key: <token>'
    headers.
servers:
  - url: https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io
    description: Production server
security:
  - ApiKeyAuth: []
  - ApiKeyHeader: []
tags:
  - name: auth-v1
    description: Authentication and user management
  - name: reference-data-v1
    description: Reference data and master data
  - name: flights-v1
    description: Flight schedules and capacity
  - name: quotes-v1
    description: Quotation and pricing
  - name: awb-stock-v1
    description: AWB Stock Management
  - name: bookings-v1
    description: Booking management
  - name: shipments-v1
    description: Shipment documents and tracking
  - name: compliance-v1
    description: Compliance and safety declarations
  - name: operations-v1
    description: Operational events and manifests
  - name: webhooks-v1
    description: Webhook management
  - name: admin-v1
    description: Administrative and audit functions
  - name: qr-exp-cgo-ext-availability-v1
    description: Legacy availability service
  - name: qr-exp-cgo-ext-booking-v1
    description: Legacy booking service
  - name: qr-exp-cgo-ext-flight-schedules-v1
    description: Legacy flight schedules service
  - name: qr-exp-cgo-shipments-v1
    description: Legacy shipments service
  - name: qr-exp-cgo-stock-v1
    description: Legacy stock service
  - name: qr-exp-cgo-tables-v1
    description: Legacy table data service
paths:
  /api/airlines/{airlineCode}/bookings:
    post:
      tags:
        - bookings-v1
      summary: Direct Airline Booking
      description: >-
        Create a direct booking with a specific airline system. This API
        facilitates direct digital booking between ACS and airline systems
        without intermediate steps.
      parameters:
        - name: airlineCode
          in: path
          required: true
          schema:
            type: string
          description: Airline code (IATA)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectAirlineBookingRequest'
      responses:
        '200':
          description: Booking confirmed with airline
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectAirlineBookingResponse'
components:
  schemas:
    DirectAirlineBookingRequest:
      type: object
      properties:
        bookingReference:
          type: string
          example: BK-2025-001234
        quoteId:
          type: string
          example: QT-789
        awb:
          $ref: '#/components/schemas/AWB'
        shipper:
          $ref: '#/components/schemas/PartyWithContact'
        consignee:
          $ref: '#/components/schemas/PartyWithContact'
        routing:
          $ref: '#/components/schemas/Routing'
        cargo:
          $ref: '#/components/schemas/Cargo'
        serviceLevel:
          type: string
          example: PRIORITY
        bookingAgent:
          $ref: '#/components/schemas/BookingAgent'
        paymentTerms:
          type: string
          example: PREPAID
        remarks:
          type: string
          example: Handle with care - fragile electronics
      required:
        - bookingReference
        - shipper
        - consignee
        - routing
        - cargo
    DirectAirlineBookingResponse:
      type: object
      properties:
        bookingId:
          type: string
          example: AL-BK-2025-987654
        status:
          type: string
          example: CONFIRMED
        airlineConfirmationNumber:
          type: string
          example: SQ-CONF-123456
        flightDetails:
          $ref: '#/components/schemas/FlightDetails'
        message:
          type: string
          example: Booking confirmed with airline
    AWB:
      type: object
      properties:
        prefix:
          type: string
          example: '157'
        number:
          type: string
          example: '12345678'
    PartyWithContact:
      type: object
      properties:
        name:
          type: string
        address:
          type: string
        contact:
          $ref: '#/components/schemas/Contact'
    Routing:
      type: object
      properties:
        origin:
          type: string
          example: SIN
        destination:
          type: string
          example: LHR
        segments:
          type: array
          items:
            $ref: '#/components/schemas/FlightSegment'
      required:
        - origin
        - destination
        - segments
    Cargo:
      type: object
      properties:
        pieces:
          type: integer
          example: 10
        grossWeightKg:
          type: number
          example: 250.5
        chargeableWeightKg:
          type: number
          example: 300
        volumeCbm:
          type: number
          example: 1.5
        commodity:
          type: object
          properties:
            code:
              type: string
              example: GEN
            description:
              type: string
              example: Electronics Equipment
        specialHandling:
          type: array
          items:
            type: string
          example:
            - ELI
            - VAL
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
    BookingAgent:
      type: object
      properties:
        code:
          type: string
          example: ACA-123
        name:
          type: string
          example: Premium Cargo Agent
    FlightDetails:
      type: object
      properties:
        flightNumber:
          type: string
          example: SQ308
        departureDateTime:
          type: string
          format: date-time
          example: '2025-01-15T23:30:00Z'
        arrivalDateTime:
          type: string
          format: date-time
          example: '2025-01-16T05:45:00Z'
        capacity:
          type: object
          properties:
            allocated:
              type: number
              example: 300
            unit:
              type: string
              example: KG
    Contact:
      type: object
      properties:
        name:
          type: string
        phone:
          type: string
        email:
          type: string
          format: email
    FlightSegment:
      type: object
      properties:
        carrier:
          type: string
          example: SQ
        flightNumber:
          type: string
          example: SQ308
        departureDate:
          type: string
          format: date
          example: '2025-01-15'
        from:
          type: string
          example: SIN
        to:
          type: string
          example: LHR
        allotmentCode:
          type: string
          example: FREE_SALE
    Dimension:
      type: object
      properties:
        pieces:
          type: integer
          example: 10
        length:
          type: number
          example: 100
        width:
          type: number
          example: 50
        height:
          type: number
          example: 30
        unit:
          type: string
          example: CM
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````