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

# Update Multiple Products

> With this endpoint, you can update details of multiple products, which could be items, variants, and bundles. **Note**: <br />1. When product type is `Variant`, it can be added either via SKU or ID. <br />2.  When product type is `Item`, either the `parentCategoryId` or `parentCategorySKU` must be specified. <br />3. When product type is `Bundle`, the associated items or variants can be added either via SKU or via ID. <br />4. At least one product must be specified.



## OpenAPI

````yaml product.openapi put /products
openapi: 3.0.0
info:
  title: Product Catalog API
  description: >-
    Product Catalog API, a subset of fabric **Product Catalog**, is designed to
    improve product management. At fabric, the term Product refers to an Item,
    Variant, and/or Bundle. Items are stand-alone and sold individually.
    Variants are the different variations of an item. For example, a Laptop that
    comes in three different sizes (13”, 15”, 17”) and four different colors
    (red, blue, grey, and white) has 12 variations. Variants are nested under a
    parent item, allowing the different options to appear for the item on the
    Storefront. Bundles are collections of two or more products sold exclusively
    together or as individual products. Product Catalog API enables you to
    create items, add variants to an item, create a bundle, add items to a
    bundle, update product attributes, get details of one or more products,
    delete products, find products, and more.
  version: 3.0.0
  x-audience: external-public
  contact:
    email: support@fabric.inc
    name: Product Team
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
servers:
  - url: https://api.fabric.inc/v3
    description: Production URL
security:
  - authorization: []
tags:
  - name: Product Operations by ID
    description: >-
      Products operations based on product IDs. You can use these endpoints to
      perform product operations outside of Storefront.
  - name: Product Operations by SKU
    description: >-
      Products operations based on product SKUs. Merchants are requested to map
      a unique product identifier against fabric standard `SKU` before using
      these endpoints.
  - name: General Product Operations
    description: Supports CRUD operations and product search
externalDocs:
  description: Find out more about Product (Previously called PIM)
  url: https://developer.fabric.inc/docs/products-overview
paths:
  /products:
    put:
      tags:
        - General Product Operations
      summary: Update Multiple Products
      description: >-
        With this endpoint, you can update details of multiple products, which
        could be items, variants, and bundles. **Note**: <br />1. When product
        type is `Variant`, it can be added either via SKU or ID. <br />2.  When
        product type is `Item`, either the `parentCategoryId` or
        `parentCategorySKU` must be specified. <br />3. When product type is
        `Bundle`, the associated items or variants can be added either via SKU
        or via ID. <br />4. At least one product must be specified.
      operationId: updateProducts
      parameters:
        - in: query
          name: locales
          schema:
            type: string
            example: fr-CA%2Cen-US
          description: >-
            Comma-separated locale codes of product. The service throws a 400
            error if the locale isn't supported. Standard locales can be found
            at https://www.rfc-editor.org/rfc/rfc5646. <br /> **Note**: The
            recommended way to get the locale is by invoking multi-channel
            service.
          required: false
          deprecated: true
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - $ref: '#/components/parameters/statusQueryParam'
      requestBody:
        $ref: '#/components/requestBodies/updateProductsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upsertProductsResponse'
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/x-fabric-request-id-header'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/notAuthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '413':
          $ref: '#/components/responses/payloadLimitExceededError'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    x-fabric-tenant-id:
      name: x-fabric-tenant-id
      in: header
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      schema:
        type: string
        example: 517fa9dfd42d8b00g1o3k312
    x-fabric-request-id:
      name: x-fabric-request-id
      in: header
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
    statusQueryParam:
      in: query
      name: status
      schema:
        type: string
        enum:
          - DRAFT
          - LIVE
        example: LIVE
        default: LIVE
      description: >-
        Determines the version of the product applicable for this operation
        (endpoint action). If the status is `DRAFT`, only the Draft version of
        the product, if it exists, is considered for the operation.
      required: false
  requestBodies:
    updateProductsRequest:
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - products
            properties:
              products:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - sku
                    - categoryId
                    - type
                    - id
                  allOf:
                    - $ref: '#/components/schemas/insertProductsRequestBody'
                  properties:
                    id:
                      $ref: '#/components/schemas/productId'
                    variants:
                      anyOf:
                        - $ref: '#/components/schemas/variantProducts'
                        - $ref: '#/components/schemas/variantProductSKU'
                    localizedProperties:
                      $ref: '#/components/schemas/localizedPropertiesUpdateRequest'
  schemas:
    upsertProductsResponse:
      description: Add product response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/upsertProducts'
    insertProductsRequestBody:
      description: Request body for creating Items, Variants and Bundles
      type: object
      properties:
        sku:
          $ref: '#/components/schemas/sku'
        categoryId:
          type: string
          description: 24-character system-generated category ID
          example: QWE1234CCVFDDERW21
        isActive:
          type: boolean
          example: true
          description: >-
            Determines if the Product is published or unpublished. Status
            parameter takes precedence
          deprecated: true
        type:
          $ref: '#/components/schemas/productType'
        attributes:
          $ref: '#/components/schemas/productAttributes'
        parentProduct:
          anyOf:
            - $ref: '#/components/schemas/parentProductId'
            - $ref: '#/components/schemas/parentProductSKU'
          description: ID or SKU of parent product
        bundleProducts:
          anyOf:
            - $ref: '#/components/schemas/bundleSKUProducts'
            - $ref: '#/components/schemas/bundleProducts'
          description: Bundle ID or SKU
    productId:
      type: string
      example: AASSBCC12334FCD12334V
      description: Product ID
    variantProducts:
      type: array
      description: Product variants by ID
      items:
        type: object
        required:
          - id
        properties:
          id:
            $ref: '#/components/schemas/productId'
    variantProductSKU:
      type: array
      description: Lists product variants by SKU.
      items:
        type: object
        required:
          - sku
        properties:
          sku:
            $ref: '#/components/schemas/sku'
    localizedPropertiesUpdateRequest:
      type: object
      additionalProperties:
        type: object
        properties:
          attributes:
            $ref: '#/components/schemas/productAttributes'
        description: Localized attribute names
      example:
        en-US:
          attributes:
            - id: W123333RRTT555y1
              value: blue
        en-IN:
          attributes:
            - id: W123333RRTT555AA
              value: blue
    upsertProducts:
      description: Add product response
      allOf:
        - $ref: '#/components/schemas/bulkOperationsResponse'
      example:
        success:
          - id: AASSBCC12334FCD12334V
            sku: XP-123345
        errors:
          - id: AASSBCC12334FCD23456A
            sku: XP-23456
            message:
              - Attribute ID 6d7329dfd5288b0011332311 can not be null
    genericError:
      type: object
      properties:
        message:
          type: string
          description: Place holder error message for all 4xx, 5xx errors
          example: Request is invalid
        type:
          type: string
          description: Place holder for error types such as 4xx, 5xx
          example: Bad request
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: Error type
                example: CLIENT_ERROR
              message:
                type: string
                description: Error message
                example: Invalid request. Unable to find or create product
    sku:
      type: string
      example: XP-123345
      description: >-
        Unique product ID that maps to fabric's standard attribute called `SKU`.
        <br /> <b>Note:</b> `sku` shouldn't include `;` or `=`
      pattern: ^[^;=]*$
    productType:
      type: string
      enum:
        - ITEM
        - VARIANT
        - BUNDLE
      example: ITEM
      description: Supported product types
    productAttributes:
      type: array
      description: Array of product attributes
      items:
        $ref: '#/components/schemas/productAttribute'
    parentProductId:
      description: Parent item ID of the Variant
      type: object
      properties:
        id:
          $ref: '#/components/schemas/productId'
    parentProductSKU:
      description: Parent item SKU of the Variant
      type: object
      properties:
        sku:
          $ref: '#/components/schemas/sku'
    bundleSKUProducts:
      type: array
      description: Items or variants that are part of the bundle
      items:
        type: object
        minItems: 1
        required:
          - sku
          - quantity
        properties:
          sku:
            $ref: '#/components/schemas/sku'
          quantity:
            type: integer
            format: int32
            example: 2
            description: Number of items or variants in bundle
    bundleProducts:
      type: array
      description: Items or variants that are part of Bundle by ID
      items:
        minItems: 1
        required:
          - id
          - quantity
        type: object
        properties:
          id:
            $ref: '#/components/schemas/productId'
          quantity:
            type: integer
            format: int32
            example: 2
            description: Number of items or variants in bundle
    bulkOperationsResponse:
      description: Bulk operation response
      type: object
      properties:
        success:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/productId'
              sku:
                $ref: '#/components/schemas/sku'
        errors:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/productId'
              sku:
                $ref: '#/components/schemas/sku'
              message:
                type: array
                items:
                  description: Error detail
                  type: string
                  example: Attribute ID 6d7329dfd5288b0011332311 can't be null
    productAttribute:
      type: object
      description: Details of product attributes
      required:
        - id
        - value
      properties:
        id:
          type: string
          example: 6d7329dfd5288b0011332311
          description: 24-character system-generated attribute ID
        value:
          anyOf:
            - $ref: '#/components/schemas/booleanSchema'
            - $ref: '#/components/schemas/stringSchema'
            - $ref: '#/components/schemas/integerSchema'
            - $ref: '#/components/schemas/doubleSchema'
            - $ref: '#/components/schemas/arrayOfStrings'
          example: blue
          description: Attribute value
    booleanSchema:
      type: boolean
      nullable: true
      description: Sample `boolean` schema
      example: true
    stringSchema:
      type: string
      nullable: true
      description: Sample `string` schema
      example: blue
    integerSchema:
      type: integer
      nullable: true
      format: int32
      description: Sample `integer` schema
      example: 1
    doubleSchema:
      type: number
      nullable: true
      format: double
      description: Sample `double` schema
      example: 1
    arrayOfStrings:
      type: array
      description: Array of strings
      items:
        $ref: '#/components/schemas/stringSchema'
  headers:
    x-fabric-request-id-header:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  responses:
    badRequest:
      description: Request is invalid or malformed
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
    notAuthorized:
      description: Request is unauthorized
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: UNAUTHORIZED_ERROR
            message: The requester is unauthorized
    forbidden:
      description: User isn't allowed to perform the action
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: REQUEST_DENIED
            message: User doesn't have the required permission
    conflict:
      description: Conflict
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            type: object
            description: Request conflict error
            properties:
              type:
                description: Error code
                type: string
                example: CONFLICT
              message:
                description: Error description
                type: string
                example: >-
                  Unable to update as there is a conflict with a unique
                  attribute.
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: Error type
                      example: CONFLICT
                    message:
                      type: string
                      description: Error message
                      example: <ID> already exists
    payloadLimitExceededError:
      description: Payload limit exceeded (> 10MB)
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: PAYLOAD_LIMIT_EXCEEDED_ERROR
            message: Payload exceeds maximum configured size
    internalServerError:
      description: Internal server error
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            message: Internal Server Error
            type: SERVER_ERROR
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: S2S access token (JWT) from fabric Identity service (during Login)

````