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

# Ingest Flight Booking List (XFBL/FBL)

> Bulk ingestion of bookings from Airline FBL/XFBL.

<ParamField status="202" type="object">
  <ParamField name="flightId" type="string">
    Flight identifier
  </ParamField>

  <ParamField name="accepted" type="integer">
    Number of accepted bookings
  </ParamField>

  <ParamField name="failed" type="integer">
    Number of failed bookings
  </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 FBL/XFBL booking ingestion, please refer to:

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


## OpenAPI

````yaml POST /api/flights/{id}/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/flights/{id}/bookings:
    post:
      tags:
        - flights-v1
      summary: Ingest Flight Booking List (XFBL/FBL)
      description: Bulk ingestion of bookings from Airline FBL/XFBL.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Flight ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlightBookingBulkRequest'
      responses:
        '202':
          description: Bookings Ingested Successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlightBookingBulkResponse'
components:
  schemas:
    FlightBookingBulkRequest:
      type: object
      properties:
        flightId:
          type: string
          example: QR001-20240101
        bookings:
          type: array
          items:
            $ref: '#/components/schemas/FlightBookingItem'
      required:
        - flightId
        - bookings
    FlightBookingBulkResponse:
      type: object
      properties:
        flightId:
          type: string
          example: QR001-20240101
        accepted:
          type: integer
          example: 1
        failed:
          type: integer
          example: 0
    FlightBookingItem:
      type: object
      properties:
        awbNumber:
          type: string
          example: 157-12345678
        pieces:
          type: integer
          example: 10
        weight:
          type: number
          example: 500
        volume:
          type: number
          example: 2.1
        origin:
          type: string
          example: DOH
        destination:
          type: string
          example: LHR
        status:
          type: string
          example: BKD
        xfbl:
          type: string
          example: <XFBL XML or IMP>
        fbl:
          type: string
          example: <FBL if sent>
      required:
        - awb
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````