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

# Upload lineup from Excel

> Base model view set providing standardized CRUD operations and error handling.

This view set enforces consistent response formats, error handling patterns,
and logging across all API endpoints. Subclasses must override the class
variables below.



## OpenAPI

````yaml /openapi/content.yaml post /api/v1/lineup/upload
openapi: 3.0.3
info:
  title: Content Service API
  version: 1.0.0
  description: |2-

        **Content Service API** - Comprehensive content(story) and management system.
        
servers:
  - url: https://api.capedigital.co.ke/content
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/lineup/upload:
    post:
      tags:
        - Lineup
      summary: Upload lineup from Excel
      description: >-
        Base model view set providing standardized CRUD operations and error
        handling.


        This view set enforces consistent response formats, error handling
        patterns,

        and logging across all API endpoints. Subclasses must override the class

        variables below.
      operationId: lineup_upload
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LineupUploadRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LineupUploadRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BroadcastScheduleList'
              examples:
                ScheduleResponse:
                  value:
                    id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    medium: TV
                    channel: TV47
                    month: 5
                    year: 2026
                    title: TV47 MAY 2026
                    version: 1
                    effective_from: '2026-05-01'
                    effective_to: '2026-05-31'
                    uploaded_by:
                      id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                      name: John Doe
                      employee_number: EMP-001
                    slot_count:
                      '2026-05-01':
                        day: THU
                        count: 12
                    metadata: {}
                    created_at: '2026-05-01T08:00:00Z'
                    updated_at: '2026-05-01T08:00:00Z'
                  summary: Schedule response
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    LineupUploadRequest:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: Excel file (.xlsx) containing the broadcast lineup.
        medium:
          enum:
            - TV
            - RADIO
            - DIGITAL
          type: string
          x-spec-enum-id: aa21c11e9618ab2e
          description: |-
            Broadcast medium: TV, RADIO, or DIGITAL.

            * `TV` - TV
            * `RADIO` - Radio
            * `DIGITAL` - Digital
        channel:
          type: string
          minLength: 1
          description: Specific channel name e.g. TV47, RADIO 47, TV47 DIGITAL.
          maxLength: 100
        effective_from:
          type: string
          format: date
          description: Schedule start date (defaults to 1st of the parsed month/year).
        effective_to:
          type: string
          format: date
          description: Schedule end date (defaults to last day of the parsed month/year).
      required:
        - channel
        - effective_from
        - effective_to
        - file
        - medium
    BroadcastScheduleList:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        medium:
          enum:
            - TV
            - RADIO
            - DIGITAL
          type: string
          description: |-
            * `TV` - TV
            * `RADIO` - Radio
            * `DIGITAL` - Digital
          x-spec-enum-id: aa21c11e9618ab2e
        channel:
          type: string
          maxLength: 100
        month:
          type: integer
          maximum: 2147483647
          minimum: 0
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
        title:
          type: string
          maxLength: 255
        version:
          type: integer
          maximum: 2147483647
          minimum: 0
        effective_from:
          type: string
          format: date
          nullable: true
        effective_to:
          type: string
          format: date
          nullable: true
        uploaded_by:
          type: string
          readOnly: true
        slot_count:
          type: object
          additionalProperties: {}
          readOnly: true
        metadata: {}
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - channel
        - created_at
        - id
        - medium
        - month
        - slot_count
        - title
        - updated_at
        - uploaded_by
        - year
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````