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

# Create Booking

> Create booking with FFR fields and reference to quote

Create a new booking with FFR fields and reference to quote.

<ParamField status="200" type="BookingResponseACS">
  <ParamField name="bookingId" type="string">
    Unique booking identifier
  </ParamField>

  <ParamField name="awbNumber" type="string">
    Air Waybill number
  </ParamField>

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

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

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

### Reference Documentation

<Info>
  For more information on booking creation workflows, please refer to:

  * Pages 20-24 of "Functional\_Requirements\_V18 FINAL": [https://belli.sg/4nxxCDR](https://belli.sg/4nxxCDR)
</Info>


## OpenAPI

````yaml POST /api/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/bookings:
    post:
      tags:
        - bookings-v1
      summary: Create booking
      description: Create booking with FFR fields and reference to quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BookingRequest'
      responses:
        '201':
          description: Booking created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookingResponse'
components:
  schemas:
    BookingRequest:
      type: object
      properties:
        quoteId:
          type: string
          example: quote-123
          description: Quote identifier from the pricing response
        flightId:
          type: string
          example: QR001-20240101
          description: Flight identifier for the booking
        pieces:
          type: integer
          example: 10
          description: Number of pieces in the shipment
        weight:
          type: number
          example: 500
          description: Total weight in kilograms
        volume:
          type: number
          example: 2.5
          description: Total volume in cubic meters
        commodity:
          type: string
          example: GEN
          description: Commodity code
        shc:
          type: array
          items:
            type: string
          example:
            - PER
          description: Special handling codes
        shipper:
          $ref: '#/components/schemas/Party'
        consignee:
          $ref: '#/components/schemas/Party'
        awb:
          type: object
          properties:
            prefix:
              type: string
              example: '157'
              description: AWB prefix
            number:
              type: string
              example: '157000001'
              description: AWB number
          required:
            - prefix
            - number
        routing:
          type: array
          items:
            type: object
            properties:
              from:
                type: string
                example: LAX
              to:
                type: string
                example: DOH
              carrier:
                type: string
                example: QR
              flightNumber:
                type: string
                example: QR001
              date:
                type: string
                format: date
                example: '2024-01-01'
            required:
              - from
              - to
              - carrier
              - flightNumber
              - date
          example:
            - from: LAX
              to: DOH
              carrier: QR
              flightNumber: QR001
              date: '2024-01-01'
            - from: DOH
              to: DXB
              carrier: QR
              flightNumber: QR123
              date: '2024-01-02'
        grossWeightKg:
          type: number
          example: 500.5
          description: Gross weight in kilograms
        chargeableWeightKg:
          type: number
          example: 520
          description: Chargeable weight in kilograms
        dimensionsCm:
          type: array
          items:
            type: object
            properties:
              l:
                type: number
                example: 120.5
                description: Length in centimeters
              w:
                type: number
                example: 80
                description: Width in centimeters
              h:
                type: number
                example: 60
                description: Height in centimeters
              pieces:
                type: integer
                example: 5
                description: Number of pieces with these dimensions
            required:
              - l
              - w
              - h
              - pieces
          example:
            - l: 120.5
              w: 80
              h: 60
              pieces: 5
            - l: 100
              w: 70
              h: 50
              pieces: 5
      required:
        - quoteId
        - flightId
        - pieces
        - weight
        - commodity
        - shipper
        - consignee
        - awb
        - routing
        - grossWeightKg
        - chargeableWeightKg
        - dimensionsCm
    BookingResponse:
      type: object
      properties:
        id:
          type: string
          example: booking-123
        quoteId:
          type: string
          example: quote-123
        status:
          type: string
          enum:
            - pending
            - confirmed
            - rejected
            - cancelled
          example: pending
        flightId:
          type: string
          example: QR001-20240101
        awbNumber:
          type: string
          example: '15712345678'
        createdAt:
          type: string
          format: date-time
          example: '2024-01-01T10:00:00Z'
    Party:
      type: object
      properties:
        name:
          type: string
          example: Example Corp
        address:
          type: string
          example: 123 Main St, City, Country
        contact:
          type: string
          example: contact@example.com
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````