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

# Request AWB Stock

> ACA/EPO requests AWB stock allocation from airline

ACA/EPO requests AWB stock from airline.

<ParamField status="200" type="object">
  <ParamField name="requestId" type="string">
    Unique request identifier
  </ParamField>

  <ParamField name="status" type="string">
    Request status
  </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 ACA stock request, please refer to:

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


## OpenAPI

````yaml POST /api/awb-stock/requests
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/awb-stock/requests:
    post:
      tags:
        - awb-stock-v1
      summary: Request AWB stock
      description: ACA/EPO requests AWB stock allocation from airline
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AWBStockRequest'
      responses:
        '201':
          description: Stock request submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AWBStockRequestResponse'
        '400':
          description: Invalid AWB stock request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AWBStockRequestErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthErrorResponse'
components:
  schemas:
    AWBStockRequest:
      type: object
      properties:
        organizationId:
          type: string
          example: org-123
        airlinePrefix:
          type: string
          example: '157'
        requestedStock:
          type: integer
          example: 100
        validityPeriod:
          type: integer
          example: 12
      required:
        - organizationId
        - airlinePrefix
        - requestedStock
    AWBStockRequestResponse:
      type: object
      properties:
        requestId:
          type: string
          example: req-123456789
          description: Unique identifier for the stock request
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - processing
          example: pending
          description: Current status of the stock request
        organizationId:
          type: string
          example: org-123
          description: Organization identifier that made the request
        airlinePrefix:
          type: string
          example: '157'
          description: Airline AWB prefix requested
        requestedStock:
          type: integer
          example: 100
          description: Number of AWB stock units requested
        allocatedStock:
          type: integer
          example: 0
          description: Number of AWB stock units allocated (if any)
        validityPeriod:
          type: integer
          example: 12
          description: Validity period in months as requested
        validFrom:
          type: string
          format: date
          example: '2024-01-15'
          description: Validity start date for allocated stock
        validTo:
          type: string
          format: date
          example: '2025-01-15'
          description: Validity end date for allocated stock
        submittedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: Timestamp when the request was submitted
        processedAt:
          type: string
          format: date-time
          example: null
          description: Timestamp when the request was processed (if applicable)
        notes:
          type: string
          example: Request for Q1 2024 operations
          description: Additional notes or comments
        approvalNotes:
          type: string
          example: null
          description: Notes from the airline regarding approval/rejection
      required:
        - requestId
        - status
        - organizationId
        - airlinePrefix
        - requestedStock
        - validityPeriod
        - submittedAt
    AWBStockRequestErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: validation_error
        errorDescription:
          type: string
          example: Invalid AWB stock request parameters
        errorUri:
          type: string
          example: https://docs.example.com/awb-stock/errors
        validationErrors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                example: requestedStock
              message:
                type: string
                example: Requested stock must be between 1 and 10000
              code:
                type: string
                example: INVALID_RANGE
          example:
            - field: requestedStock
              message: Requested stock must be between 1 and 10000
              code: INVALID_RANGE
            - field: airlinePrefix
              message: Invalid airline prefix format
              code: INVALID_FORMAT
    OAuthErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: invalid_grant
        errorDescription:
          type: string
          example: Invalid client credentials provided
        errorUri:
          type: string
          example: https://docs.example.com/oauth/errors
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````