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

# Create product

> 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/commercial.yaml post /api/v1/products
openapi: 3.0.3
info:
  title: Commercial Service API
  version: 1.0.0
  description: |2-

        **Commercial Service API** - Lead management and campaign workflow system.

        ## Versioning
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
servers:
  - url: https://api.capedigital.co.ke/commercial
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/products:
    post:
      tags:
        - Products
      summary: Create product
      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: products_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ProductRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ProductRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    ProductRequest:
      type: object
      description: Product Serializer
      properties:
        name:
          type: string
          minLength: 1
          description: Product name
          maxLength: 100
        description:
          type: string
          minLength: 1
          description: Product description
      required:
        - description
        - name
    Product:
      type: object
      description: Product Serializer
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Product name
          maxLength: 100
        description:
          type: string
          description: Product description
      required:
        - description
        - id
        - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````