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

# Sellout

> Sellout per inventory item per air week. Defaults to the next 8 weeks.
Only items with weekly_capacity set are included; sellout_pct > 100 means
the week is oversold (capacity is reporting-only, not enforced).



## OpenAPI

````yaml /openapi/inventory.yaml get /api/v1/analytics/sellout
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/analytics/sellout:
    get:
      tags:
        - Analytics
      summary: Sellout
      description: >-
        Sellout per inventory item per air week. Defaults to the next 8 weeks.

        Only items with weekly_capacity set are included; sellout_pct > 100
        means

        the week is oversold (capacity is reporting-only, not enforced).
      operationId: sellout_api_v1_analytics_sellout_get
      parameters:
        - name: from_week
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: From Week
        - name: to_week
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: To Week
        - name: platform
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/Platform'
              - type: 'null'
            title: Platform
      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:
    Platform:
      type: string
      enum:
        - TV
        - RADIO
        - DIGITAL
      title: Platform
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````