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

# Add Company Product Endpoint

> The Add Company Product endpoint enables users to add a new or existing product associated with a company within a supply chain. This is achieved by sending a POST request to the specified URL, providing essential information such as product details, company affiliation, and optional forms and premiums. The response includes the newly created product's details, confirming its addition to the supply chain.



## OpenAPI

````yaml post /supply-chains/company-products/
openapi: 3.0.1
info:
  title: Trace Connect API
  version: v1
servers:
  - url: http://localhost:3000/connect/v1
security:
  - Bearer: []
paths:
  /supply-chains/company-products/:
    post:
      tags:
        - supply-chains
      description: A viewset for viewing and editing CompanyProduct instances.
      operationId: supply-chains_company-products_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyProduct'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyProduct'
components:
  schemas:
    CompanyProduct:
      required:
        - company
      type: object
      properties:
        id:
          type: string
        product:
          $ref: '#/components/schemas/Product'
        product_id:
          title: Product id
          minLength: 1
          type: string
        updated_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        created_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        is_active:
          title: Is Company Product Active
          type: boolean
        creator:
          type: string
        updater:
          type: string
        company:
          type: string
        forms:
          uniqueItems: true
          type: array
          items:
            type: string
        premiums:
          uniqueItems: true
          type: array
          items:
            type: string
    Product:
      required:
        - name
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the product.
        premiums:
          title: Premiums
          type: string
          readOnly: true
          description: Premiums associated with the product.
        is_active:
          title: Is active
          type: string
          readOnly: true
          description: Indicates whether the product is currently active.
        updated_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
          description: Date and time when the product information was last updated.
        created_on:
          title: Created On
          type: string
          format: date-time
          readOnly: true
          description: Date and time when the product was created.
        name:
          title: Product Name
          maxLength: 500
          minLength: 1
          type: string
          description: Name of the product.
        description:
          title: Product Description
          maxLength: 500
          type: string
          nullable: true
          description: Description of the product.
        image:
          title: Product Image
          type: string
          format: uri
          nullable: true
          readOnly: true
          description: URL to the image or photo of the product.
        creator:
          type: string
          description: Identifier of the user who created the product.
        updater:
          type: string
          description: Identifier of the user who last updated the product.
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````