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

# Add Line



## OpenAPI

````yaml /openapi/inventory.yaml post /api/v1/bookings/{order_id}/lines
openapi: 3.1.0
info:
  title: Cape Digi - Inventory Service
  description: >-
    Ad inventory catalog, rate cards, booking orders, campaign tracking, ad
    asset management, and commercial transmission scheduling.
  version: 1.0.0
servers:
  - url: https://api.capedigital.co.ke/inventory
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/bookings/{order_id}/lines:
    post:
      tags:
        - Bookings
      summary: Add Line
      operationId: add_line_api_v1_bookings__order_id__lines_post
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BookingLineCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BookingLineCreate:
      properties:
        inventory_item_id:
          type: string
          format: uuid
          title: Inventory Item Id
        platform:
          $ref: '#/components/schemas/Platform'
        description:
          type: string
          title: Description
        daily_count:
          type: integer
          minimum: 1
          title: Daily Count
          default: 1
        duration_type:
          $ref: '#/components/schemas/DurationType'
          default: WEEKS
        duration_count:
          type: integer
          minimum: 1
          title: Duration Count
          default: 1
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
        rate_card_price:
          anyOf:
            - type: number
              minimum: 0
            - type: string
            - type: 'null'
          title: Rate Card Price
        base_units:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Base Units
        unit_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit Label
        price_per_extra_unit:
          anyOf:
            - type: number
              minimum: 0
            - type: string
            - type: 'null'
          title: Price Per Extra Unit
        is_value_add:
          type: boolean
          title: Is Value Add
          default: false
        requires_production:
          type: boolean
          title: Requires Production
          default: false
      type: object
      required:
        - inventory_item_id
        - platform
        - description
      title: BookingLineCreate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Platform:
      type: string
      enum:
        - TV
        - RADIO
        - DIGITAL
      title: Platform
    DurationType:
      type: string
      enum:
        - DAYS
        - WEEKS
      title: DurationType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````