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

# Create or update product

> Create a new product or update an existing one. The composite key (product_number + language_code) in the path determines the upsert target.




## OpenAPI

````yaml PUT /product/{product_number}/{language_code}
openapi: 3.1.0
info:
  title: DocOpsAI API
  version: 0.1.0
  description: >
    AI-based order processing application that extracts information from email
    attachments and forwards to backend systems. Provides endpoints for order
    management, customer and product CRUD, email watching, and template
    parameter configuration.
  contact:
    name: DevOps Company
servers:
  - url: https://start.aiotic.ai
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: healthcheck
    description: Service health monitoring
  - name: order
    description: Order document upload and processing
  - name: order_status
    description: Order processing status tracking
  - name: customer
    description: Customer record management with vector search
  - name: product
    description: Product record management
  - name: template_parameters
    description: Prompt template parameter management
  - name: email-watcher
    description: Email inbox monitoring and processing
paths:
  /product/{product_number}/{language_code}:
    put:
      tags:
        - product
      summary: Create or update product
      description: >
        Create a new product or update an existing one. The composite key
        (product_number + language_code) in the path determines the upsert
        target.
      operationId: upsertProduct
      parameters:
        - $ref: '#/components/parameters/ProductNumberPath'
        - $ref: '#/components/parameters/LanguageCodePath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductUpsert'
      responses:
        '202':
          description: Product created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    ProductNumberPath:
      name: product_number
      in: path
      required: true
      description: Product item number
      schema:
        type: string
    LanguageCodePath:
      name: language_code
      in: path
      required: true
      description: Product language code (e.g., "en", "nl")
      schema:
        type: string
  schemas:
    ProductUpsert:
      type: object
      required:
        - description
      properties:
        description:
          type: string
          description: Product description
        remark:
          type: string
          nullable: true
          description: Additional remarks about the product
    Product:
      type: object
      required:
        - item_number
        - language_code
        - created_at
      properties:
        item_number:
          type: string
          description: Unique product identifier
        language_code:
          type: string
          description: Language code for the product description (e.g., "en", "nl")
        description:
          type: string
          nullable: true
          description: Product description
        remark:
          type: string
          nullable: true
          description: Additional remarks about the product
        created_at:
          type: string
          format: date-time
          description: When this product was created in the database
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        API key for authentication. Required on all endpoints except
        /healthcheck. Customer and product endpoints also accept a
        customer-specific API key.

````