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

# Update a product



## OpenAPI

````yaml PUT /api/v1/products/{productId}
openapi: 3.0.1
info:
  title: Meadow Open API
  description: The API to connect to the Meadow platform
  version: 1.0.0
servers:
  - url: https://api-staging.getmeadow.com
  - url: https://api.getmeadow.com
security:
  - meadowConsumer: []
    meadowClient: []
paths:
  /api/v1/products/{productId}:
    put:
      parameters:
        - name: productId
          in: path
          description: ID of the product to update
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the product, excluding any brand names.
                description:
                  type: string
                  description: >-
                    A description for the product shown on menus. (Supports
                    markdown)
                unit:
                  type: string
                  enum:
                    - gram
                    - item
                  description: >-
                    Set to `gram` when this product is in a category which is
                    weighed out (i.e. "Flowers"), otherwise set to `item`
                strainType:
                  type: string
                  enum:
                    - sativa
                    - indica
                    - hybrid
                    - hybrid-sativa
                    - hybrid-indica
                    - cbd
                    - mixed
                    - none
                  description: The strain type of the cannabis product, `none` otherwise.
                category:
                  type: string
                  description: >-
                    A category name from the [List categories
                    endpoint](/endpoints/products/list-categories). Please note
                    that different client organizations may customize category
                    names, for example renaming "Flowers" to "Flower."
                subCategories:
                  type: array
                  description: >-
                    A list of sub category names from the [List sub-categories
                    endpoint](/endpoints/products/list-sub-categories), or a new
                    sub category name. Pass an empty array `[]` to have no sub
                    categories.
                  items:
                    type: string
                brandName:
                  type: string
                  description: >-
                    The brand of the product. Meadow will match this to an
                    existing brand or create a new brand if it does not exist.
                photos:
                  type: array
                  description: >-
                    URLs for the image to associate with this product. Meadow
                    will download with a background job. Max photo size is 15MB.
                  items:
                    type: string
                inventoryType:
                  type: string
                  description: >-
                    The inventory type of this product. Please see the
                    [Inventory Guide](/guides/inventory) for more information.
                  enum:
                    - option
                    - product
                    - none
                deletedAt:
                  type: string
                  description: Set to current ISO 8601 timestamp to delete product
                thcAmount:
                  type: string
                  description: The total amount of THC present in this product
                  nullable: true
                thcAmountEach:
                  type: string
                  description: >-
                    The amount of THC per each unit of the product (i.e. 10mg
                    per pre-roll in a pack of 15 pre-rolls)
                  nullable: true
                thcAmountRangeLow:
                  type: string
                  description: >-
                    The low value of a range if this product has a range of THC
                    value.
                  nullable: true
                thcAmountRangeHigh:
                  type: string
                  description: >-
                    The high value of a range if this product has a range of THC
                    value.
                  nullable: true
                thcUnit:
                  type: string
                  description: >-
                    The unit for the THC values submitted. Must be specified if
                    any of the THC amount fields are provided.
                  enum:
                    - '%'
                    - mg
                  nullable: true
                cbdAmount:
                  type: string
                  description: The total amount of CBD present in this product
                  nullable: true
                cbdAmountEach:
                  type: string
                  description: >-
                    The amount of CBD per each unit of the product (i.e. 10mg
                    per pre-roll in a pack of 15 pre-rolls)
                  nullable: true
                cbdAmountRangeLow:
                  type: string
                  description: >-
                    The low value of a range if this product has a range of CBD
                    value.
                  nullable: true
                cbdAmountRangeHigh:
                  type: string
                  description: >-
                    The high value of a range if this product has a range of CBD
                    value.
                  nullable: true
                cbdUnit:
                  type: string
                  description: >-
                    The unit for the CBD values submitted. Must be specified if
                    any of the CBD amount fields are provided.
                  enum:
                    - '%'
                    - mg
                  nullable: true
            example:
              name: Blue Dream
              unit: gram
              strainType: hybrid-sativa
              category: Flower
              subCategories:
                - Top Shelf
              brandName: Awesome Cannabis
              photos:
                - >-
                  https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg
                - >-
                  https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg
      responses:
        '201':
          description: Update product response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsResponse'
        4XX:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    ProductsResponse:
      type: object
      properties:
        id:
          type: string
          description: The ID of the new product
        organizationId:
          type: string
          description: The client organization's ID
        name:
          type: string
          description: The name of the product
        description:
          type: string
          description: The description of the product
          nullable: true
        unit:
          type: string
          description: Either `gram` or `item`
        isActive:
          type: boolean
          description: >-
            Whether this product is shown on the menu. Client organizations must
            update this via Meadow.
        isFeatured:
          type: boolean
          description: >-
            Whether this product is shown as featured. Client organizations must
            update this via Meadow.
        brand:
          type: object
          description: The brand of this product
          nullable: true
          properties:
            name:
              type: string
              description: The name of the brand
        primaryCategory:
          type: object
          description: The category of this product
          properties:
            name:
              type: string
              description: The name of the category
            cannabisType:
              type: string
              description: >-
                The cannabis type of the products in this category used for
                purchase order calculations.
              enum:
                - non-concentrated
                - concentrated
                - mi-infused-solids
                - mi-infused-fluids
                - edibles
                - immature-plant
                - none
        subCategories:
          type: array
          description: >-
            The names of all the sub-categories of this product (may be empty
            `[]`)
          items:
            type: object
            properties:
              name:
                type: string
                description: The name of the sub-category
        photos:
          type: array
          description: Photo URLs submitted in the request
          items:
            type: string
        options:
          type: array
          description: The purchaseable options for this product
          items:
            type: object
            properties:
              id:
                type: number
                description: The ID of this option
              name:
                type: string
                description: The name of this option
                nullable: true
              price:
                type: number
                description: The price of this option in cents
              salesPrice:
                type: number
                description: The sales price of this option in cents
                nullable: true
              content:
                type: string
                description: The cannabis content of this option
              upc:
                type: string
                description: The UPC for this option
                nullable: true
        thcAmount:
          type: string
          description: The total amount of THC present in this product
          nullable: true
        thcAmountEach:
          type: string
          description: >-
            The amount of THC per each unit of the product (i.e. 10mg per
            pre-roll in a pack of 15 pre-rolls)
          nullable: true
        thcAmountRangeLow:
          type: string
          description: The low value of a range if this product has a range of THC value.
          nullable: true
        thcAmountRangeHigh:
          type: string
          description: The high value of a range if this product has a range of THC value.
          nullable: true
        thcUnit:
          type: string
          description: The unit for the THC values submitted.
          enum:
            - '%'
            - mg
          nullable: true
        cbdAmount:
          type: string
          description: The total amount of CBD present in this product
          nullable: true
        cbdAmountEach:
          type: string
          description: >-
            The amount of CBD per each unit of the product (i.e. 10mg per
            pre-roll in a pack of 15 pre-rolls)
          nullable: true
        cbdAmountRangeLow:
          type: string
          description: The low value of a range if this product has a range of CBD value.
          nullable: true
        cbdAmountRangeHigh:
          type: string
          description: The high value of a range if this product has a range of CBD value.
          nullable: true
        cbdUnit:
          type: string
          description: The unit for the CBD values submitted.
          enum:
            - '%'
            - mg
          nullable: true
      example:
        data:
          id: 11867
          organizationId: 25
          brand:
            id: 2238
            name: Awesome Cannabis
            createdAt: '2024-12-12T03:08:58.012Z'
            updatedAt: '2024-12-12T03:08:58.012Z'
            description: null
          subCategories:
            - id: 30325
              organizationId: 25
              name: Top Shelf
              createdAt: '2024-12-12T03:01:11.823Z'
              updatedAt: '2024-12-12T03:01:11.823Z'
          inventoryType: option
          createdAt: '2024-12-12T04:08:00.429Z'
          updatedAt: '2024-12-12T04:08:00.429Z'
          isActive: false
          isFeatured: false
          photos:
            - >-
              https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg
            - >-
              https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg
          name: Blue Dream
          strainType: hybrid-sativa
          isCompliant: true
          unit: gram
          primaryCategory:
            id: 286
            name: Flower
            createdAt: '2023-12-16T02:51:28.738Z'
            updatedAt: '2023-12-16T02:51:28.738Z'
            cannabisType: non-concentrated
          options:
            - id: 15472
              name: Eighth
              amount: 3.5
              price: 4500
              salesPrice: null
              createdAt: '2024-12-12T04:08:00.433Z'
              updatedAt: '2024-12-12T04:08:00.433Z'
              upc: null
              content: '3.5'
          thcAmount: '12'
          thcAmountEach: '12'
          thcAmountRangeLow: null
          thcAmountRangeHigh: null
          thcUnit: mg
          cbdAmount: null
          cbdAmountEach: null
          cbdAmountRangeLow: null
          cbdAmountRangeHigh: null
          cbdUnit: null
    APIError:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: A description of the error code
            code:
              type: string
              example: CODE_OF_ERROR_WILL_BE_HERE
  securitySchemes:
    meadowConsumer:
      type: apiKey
      name: X-Consumer-Key
      description: The key assigned to your company and provided via Meadow
      in: header
    meadowClient:
      type: apiKey
      name: X-Client-Key
      description: The key generated and provided by our mutual client
      in: header

````