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

# Update a Specific Product by ID

> Update a Specific Product by ID



## OpenAPI

````yaml openapi.json put /v1/products/{product_id}
openapi: 3.1.0
info:
  title: Trata AI API
  description: >-
    Human like conversation to answer calls, drive engagement, automate
    follow-ups & schedule bookings 24/7  with end to end integrations ensuring
    you never miss a sales enquiry.
  version: 1.0.0
servers:
  - url: https://api.trata.ai
    description: Production
  - url: http://localhost:8000
    description: Development
security: []
paths:
  /v1/products/{product_id}:
    put:
      tags:
        - Products
      summary: Update a Specific Product by ID
      description: Update a Specific Product by ID
      operationId: updateProductV1
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the product
            title: Product Id
          description: ID of the product
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Product-Input'
            example:
              id: pro.1731301754.OZSMSU1S
              orgId: org.1726902940.GZChqlpU
              active: true
              defaultPrice: 1299
              currency: USD
              description: Spicy Korean Chicken Wings
              name: Spicy Korean Chicken Wings
              shippable: true
              features: []
              scheduleAppointment: false
              props: {}
              status: active
              createdBy: trata-system
              createdAt: '2024-11-11T05:09:14.979287'
              updatedBy: trata-system
              updatedAt: '2024-11-11T05:09:14.979289'
      responses:
        '200':
          description: Product updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product-Output'
              example:
                id: pro.1731301754.OZSMSU1S
                orgId: org.1726902940.GZChqlpU
                active: true
                defaultPrice: 1299
                currency: USD
                description: Spicy Korean Chicken Wings
                name: Spicy Korean Chicken Wings
                shippable: true
                features: []
                scheduleAppointment: false
                props: {}
                status: active
                createdBy: trata-system
                createdAt: '2024-11-11T05:09:14.979287'
                updatedBy: trata-system
                updatedAt: '2024-11-11T05:09:14.979289'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Product-Input:
      properties:
        active:
          type: boolean
          title: Active
          description: Product is active or not
        defaultPrice:
          type: integer
          title: Defaultprice
          description: >-
            Default price of the product this is represented in the lowest
            currency denomination. Eg: 1000 for $10
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BOV
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHE
            - CHF
            - CHW
            - CLF
            - CLP
            - CNY
            - COP
            - COU
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MXV
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLE
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - USN
            - UYI
            - UYU
            - UYW
            - UZS
            - VED
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XOF
            - XPF
            - XSU
            - XUA
            - YER
            - ZAR
            - ZMW
            - ZWL
          maxLength: 3
          minLength: 3
          title: Currency
          description: Currency of the product
        description:
          type: string
          maxLength: 512
          minLength: 1
          title: Description
          description: Description of the product
          example: High-quality gardening tools
        name:
          type: string
          maxLength: 512
          minLength: 1
          title: Name
          description: Name of the product
          example: Garden Tool Set
        shippable:
          type: boolean
          title: Shippable
          description: Product is shippable or not. Service is not shippable
          default: false
        features:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Features
          description: List of features of the product
        scheduleAppointment:
          type: boolean
          title: Scheduleappointment
          description: Product requires appointment scheduling or not
          default: false
        props:
          anyOf:
            - type: object
            - type: 'null'
          title: Props
          description: Properties of the product
          example: stainless steel
        tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Tags
          description: >-
            Tags for the product. This is used for grouping purpose. Eg:
            ["gardening", "tools"]
          example: gardening
        status:
          $ref: '#/components/schemas/Status'
        agentIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Agentids
          description: List of agent ids which are accessible for this product
      type: object
      required:
        - active
        - defaultPrice
        - currency
        - description
        - name
        - status
      title: Product
    Product-Output:
      properties:
        id:
          type: string
          title: Id
        orgId:
          type: string
          title: Orgid
        active:
          type: boolean
          title: Active
          description: Product is active or not
          default: false
        defaultPrice:
          anyOf:
            - type: integer
            - type: 'null'
          title: Defaultprice
          description: >-
            Default price of the product this is represented in the lowest
            currency denomination. Eg: 1000 for $10
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        description:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: Description
          description: Description of the product
        name:
          type: string
          maxLength: 256
          minLength: 1
          title: Name
          description: Name of the product
        shippable:
          type: boolean
          title: Shippable
          description: Product is shippable or not. Service is not shippable
          default: false
        features:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Features
          description: List of features of the product
        scheduleAppointment:
          type: boolean
          title: Scheduleappointment
          description: Product requires appointment scheduling or not
          default: false
        props:
          anyOf:
            - type: object
            - type: 'null'
          title: Props
          description: Properties of the product
        tags:
          anyOf:
            - items:
                type: string
              type: array
              uniqueItems: true
            - type: 'null'
          title: Tags
        status:
          type: string
          title: Status
        createdBy:
          type: string
          title: Createdby
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedBy:
          type: string
          title: Updatedby
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - status
      title: Product
      description: Product and services offered by the business
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Status:
      type: string
      enum:
        - active
        - inactive
      title: Status
    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

````