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

# Attach BOL to an order

> Send a base 64 encoded PDF and attach it to an existing order



## OpenAPI

````yaml /openapi.json post /api/documents/bol/{order_id}
openapi: 3.0.0
info:
  title: Authentication API
  description: API for user authentication and token generation
  version: 1.0.0
servers:
  - url: https://api.retailreadyai.com
    description: Production server
  - url: https://stg.retailreadyai.com
    description: Staging server
security: []
paths:
  /api/documents/bol/{order_id}:
    post:
      tags:
        - Documents
      summary: Attach BOL to an order
      description: Send a base 64 encoded PDF and attach it to an existing order
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the order to attach the BOL to
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file_content:
                  type: string
                  description: Base 64 encoded PDF
                  example: JVBERi0xL...
                file_name:
                  type: string
                  description: Name of the file
                  example: bol.pdf
                bill_of_lading_number:
                  type: string
                  description: Bill of Lading number
                  example: '12345689'
                pro_number:
                  type: string
                  description: Pro Number
                  example: 123-4567890
                carrier:
                  type: string
                  description: Carrier
                  example: UPS FREIGHT
                carrier_alpha_code:
                  type: string
                  description: Carrier Alpha Code
                  example: EXLA
                scheduled_delivery_date:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
                  example: '2024-10-19 07:00:00'
                  description: 'Scheduled delivery date in format: YYYY-MM-DD HH:mm:ss'
                external_load_number:
                  type: string
                  description: External Load ID
                  example: LOAD-1234
              required:
                - file_content
                - file_name
                - bill_of_lading_number
                - pro_number
                - carrier
                - carrier_alpha_code
      responses:
        '200':
          description: Successfully uploaded BOL
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
              example:
                message: BOL uploaded successfully
        '400':
          description: Bad request - missing or invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    description: Error Object
                    properties:
                      code:
                        type: string
                        description: Error code
              example:
                message: Invalid Request - Missing required fields
                error:
                  code: INVALID_REQUEST
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    description: Error Object
                    properties:
                      code:
                        type: string
                        description: Error code
              example:
                message: Failed to upload BOL
                error:
                  code: INTERNAL_SERVER_ERROR
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````