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

> Update UPC fields for product options

<Note>You may notice there are extra properties in the response than are dictated below. Generally speaking, you should only ever have to use the properties that we explicitly documented below. If you have any questions, please feel free to reach out.</Note>


## OpenAPI

````yaml PUT /api/v1/products/{productId}/options/upc
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}/options/upc:
    put:
      description: Update UPC fields for product options
      parameters:
        - name: productId
          in: path
          description: ID of the product these options belong to
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - options
              properties:
                options:
                  type: array
                  description: Array of product options to update
                  items:
                    type: object
                    required:
                      - id
                      - upc
                    properties:
                      id:
                        type: number
                        description: >-
                          The ID from the [menu api
                          response](/endpoints/menu/list-menu)
                          `data[].options[].id`
                      upc:
                        type: string
                        description: The new UPC for this option
            example:
              options:
                - id: 2307
                  upc: TEST_UPC_1
                - id: 2325
                  upc: TEST_UPC_2
      responses:
        '200':
          description: Update UPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  options:
                    type: array
                    description: >-
                      The options for this product. Please note that all options
                      will be returned, not just the ones you submitted.
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                          description: 'The product option ID '
                        name:
                          type: string
                          description: The name for this option
                          nullable: true
                        amount:
                          type: number
                          description: The amount for this option
                        price:
                          type: number
                          description: The price of this option
                        upc:
                          type: string
                          description: The upc for this option
                          nullable: true
              example:
                data:
                  id: 994
                  organizationId: 1
                  name: Blue Dream
                  unit: gram
                  strainType: none
                  percentThc: null
                  percentCbd: null
                  description: ''
                  createdAt: '2022-05-03T20:07:46.098Z'
                  updatedAt: '2022-08-08T18:16:17.477Z'
                  isActive: true
                  isFeatured: false
                  archivedAt: null
                  subCategoryIds: []
                  categoryId: 1
                  inventoryType: option
                  unitPlural: grams
                  deletedAt: null
                  movingAverageCostPerUnit: null
                  defaultCostPerUnit: null
                  leaflyCategory: null
                  strainName: null
                  isCompliant: true
                  brandId: 330
                  thcAmount: null
                  thcAmountEach: null
                  thcUnit: null
                  cbdAmount: null
                  cbdAmountEach: null
                  cbdUnit: null
                  options:
                    - id: 2307
                      productId: 994
                      name: Eighth
                      amount: 3.5
                      price: 4000
                      createdAt: '2022-05-03T20:07:46.121Z'
                      updatedAt: '2022-05-03T20:07:46.121Z'
                      deletedAt: null
                      upc: TEST_UPC_1
                      movingAverageCostPerUnit: null
                      content: null
                      defaultCostPerUnit: null
                      salesPrice: 3500
                    - id: 2308
                      productId: 994
                      name: Quarter
                      amount: 7
                      price: 6500
                      createdAt: '2022-08-08T16:45:53.625Z'
                      updatedAt: '2022-08-08T18:16:17.463Z'
                      deletedAt: null
                      upc: TEST_ZZ2
                      movingAverageCostPerUnit: null
                      content: null
                      defaultCostPerUnit: null
                      salesPrice: null
        4XX:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    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

````