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

# Partially Update Product by SKU

> Product attributes are the objective and factual descriptions of products that shoppers see when they browse through an e-commerce platform. Attributes may be technical specifications like size, weight, etc., design specifications like color, material, etc., or basic specifications such as name, description, ID, etc. This endpoint is used to partially update attributes of the given product attributes. **Note**: <br /> 1. This endpoint is recommended over `PUT /products/sku/{sku}/attributes` (Update product attributes by SKU) if you want to update only specific attributes without affecting the others. <br />2. If you don't have product SKU, use the corresponding ID-based endpoint - `PATCH /products/{id}/attributes`.



## OpenAPI

````yaml product.openapi patch /products/sku/{sku}/attributes
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/sku/{sku}/attributes:
    patch:
      tags:
        - Product Operations by SKU
      summary: Partially Update Product by SKU
      description: >-
        Product attributes are the objective and factual descriptions of
        products that shoppers see when they browse through an e-commerce
        platform. Attributes may be technical specifications like size, weight,
        etc., design specifications like color, material, etc., or basic
        specifications such as name, description, ID, etc. This endpoint is used
        to partially update attributes of the given product attributes.
        **Note**: <br /> 1. This endpoint is recommended over `PUT
        /products/sku/{sku}/attributes` (Update product attributes by SKU) if
        you want to update only specific attributes without affecting the
        others. <br />2. If you don't have product SKU, use the corresponding
        ID-based endpoint - `PATCH /products/{id}/attributes`.
      operationId: updateProductPartiallyBySku
      parameters:
        - in: path
          name: sku
          schema:
            type: string
          required: true
          example: CAXCC1234
          description: Product SKU
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - $ref: '#/components/parameters/statusesQueryParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/partialUpdateProductRequest'
            examples:
              addProductAttribute:
                summary: Assign attribute to product
                value:
                  data:
                    - op: add
                      path: /attributes/-
                      value:
                        id: 6454e9e045276428de74c554
                        value: blue
              replaceProductAttributeValue:
                summary: Update attribute value assigned to product
                value:
                  data:
                    - op: replace
                      path: /attributes/0/value
                      value: red
              removeProductAttribute:
                summary: Remove attribute assigned to product
                value:
                  data:
                    - op: remove
                      path: /attributes/0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/skuBasedProduct'
              examples:
                Product:
                  $ref: '#/components/examples/productSKUExample'
          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'
        '404':
          $ref: '#/components/responses/notFoundError'
        '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
    statusesQueryParam:
      in: query
      name: statuses
      schema:
        type: string
        example: DRAFT
        default: DRAFT,LIVE
      description: >-
        Comma-separated statuses indicating the preferred order of the product
        versions considered for this operation (endpoint action). For example,
        <br />1. When the status is `DRAFT`, this operations will only apply to
        the Draft version of product, if it exists <br />2. When the status is
        `LIVE`, this operation will only apply to the Live version of the
        product, if it exists <br />3 When the status is `LIVE,DRAFT`, this
        operation will prioritize Live version first, if it exists. Otherwise,
        the Draft version is considered. <br />4 When the status is `DRAFT,LIVE`
        this operation will prioritize the Draft version first, if it exists.
        Otherwise, the Live version is considered.
      required: false
      allowReserved: true
  schemas:
    partialUpdateProductRequest:
      type: object
      description: Request for partial update
      required:
        - data
      properties:
        data:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - op
              - path
            properties:
              op:
                $ref: '#/components/schemas/patchOperation'
              path:
                type: string
                example: /attributes/0/value
                description: Attribute path
              value:
                anyOf:
                  - $ref: '#/components/schemas/booleanSchema'
                  - $ref: '#/components/schemas/stringSchema'
                  - $ref: '#/components/schemas/integerSchema'
                  - $ref: '#/components/schemas/doubleSchema'
                  - $ref: '#/components/schemas/arrayOfStrings'
                  - $ref: '#/components/schemas/productAttribute'
                  - $ref: '#/components/schemas/productAttributes'
                  - $ref: '#/components/schemas/productValueWithAttributeArray'
                description: Attribute value
                example: blue
    skuBasedProduct:
      type: object
      description: Details of Item by SKU
      properties:
        id:
          $ref: '#/components/schemas/productId'
        sku:
          $ref: '#/components/schemas/sku'
        type:
          $ref: '#/components/schemas/productType'
        isActive:
          type: boolean
          example: true
          description: 'true: Product is active <br /> false: Product is inactive'
        hasDraft:
          $ref: '#/components/schemas/hasDraft'
        hasLive:
          $ref: '#/components/schemas/hasLive'
        status:
          $ref: '#/components/schemas/status'
        attributes:
          type: array
          description: Attributes assigned to product
          items:
            $ref: '#/components/schemas/productAttributeValue'
        localizedProperties:
          $ref: '#/components/schemas/productProperties'
        parentProduct:
          allOf:
            - $ref: '#/components/schemas/parentProductId'
            - $ref: '#/components/schemas/parentProductSKU'
        variants:
          $ref: '#/components/schemas/variantSKUAndIDProducts'
        bundleProducts:
          $ref: '#/components/schemas/bundleSKUAndIDProducts'
        categoryId:
          $ref: '#/components/schemas/categoryIdResponse'
        createdAt:
          type: string
          example: '2021-09-14T22:10:30.618Z'
          description: Time of product creation (UTC)
        updatedAt:
          type: string
          example: '2021-09-14T22:10:30.618Z'
          description: Time of last update to product (UTC)
    patchOperation:
      type: string
      enum:
        - add
        - replace
        - remove
      example: add
      description: Patch operations
    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'
    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
    productAttributes:
      type: array
      description: Array of product attributes
      items:
        $ref: '#/components/schemas/productAttribute'
    productValueWithAttributeArray:
      type: object
      description: patch value with attributes
      properties:
        attributes:
          $ref: '#/components/schemas/productAttributes'
    productId:
      type: string
      example: AASSBCC12334FCD12334V
      description: Product ID
    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
    hasDraft:
      type: boolean
      example: true
      description: >-
        true: Product has a Draft version <br /> false: Product doesn't have a
        Draft version
    hasLive:
      type: boolean
      example: true
      description: >-
        true: Product has a Live version <br /> false: Product doesn't have a
        Live version
    status:
      type: string
      description: >-
        Represents the current status of product. This value takes precedence
        over `isActive` if both are sent in the request.
      enum:
        - DRAFT
        - LIVE
      example: LIVE
    productAttributeValue:
      type: object
      description: Details of product attributes
      properties:
        id:
          $ref: '#/components/schemas/productId'
        name:
          type: string
          example: color
          description: Attribute name
        type:
          type: string
          example: string
          description: Attribute type
        validation:
          type: object
          description: Attribute validation - date
          properties:
            dateFormat:
              type: string
              description: Date format. <br> Applicable when `attributeType` is `DATETIME`.
              example: MM-DD-YYYY
        isDeleted:
          type: boolean
          nullable: true
          example: false
          description: >-
            true: Attributes are inherited from parent product <br /> false:
            Attributes aren't inherited from parent product **Note**: Attributes
            are soft deleted when a product is moved from one category to
            another.
        isInherited:
          type: boolean
          nullable: true
          example: true
          description: >-
            true: Attributes are inherited from parent product <br /> false:
            Attributes aren't inherited from parent product
        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
    productProperties:
      type: object
      description: Localized attribute names
      additionalProperties:
        type: object
        properties:
          attributes:
            type: array
            items:
              $ref: '#/components/schemas/productAttributeValue'
      example:
        en-US:
          attributes:
            - id: 4e7329dfd5288b0011332366
              name: Color
              type: string
              isDeleted: false
              value: blue
              isInherited: true
    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'
    variantSKUAndIDProducts:
      type: array
      description: Variants with ID and SKU
      items:
        type: object
        properties:
          id:
            $ref: '#/components/schemas/productId'
          sku:
            $ref: '#/components/schemas/sku'
    bundleSKUAndIDProducts:
      type: array
      description: Bundles with ID and SKU
      items:
        type: object
        properties:
          id:
            $ref: '#/components/schemas/productId'
          sku:
            $ref: '#/components/schemas/sku'
          quantity:
            type: integer
            format: int32
            example: 2
            description: Number of products or variants in bundle
    categoryIdResponse:
      type: string
      example: 6h7329dfd5288b001133231d
      description: 24-character system-generated category ID of product
    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
  examples:
    productSKUExample:
      value:
        id: 717329dfd5288b0011332317
        sku: QWEFFVVV
        type: ITEM
        isActive: true
        hasDraft: true
        hasLive: true
        status: LIVE
        attributes:
          - id: 7b17329dfd5288b0011332314
            name: Color
            type: string
            isDeleted: false
            value: blue
            isInherited: true
        localizedProperties:
          en-US:
            attributes:
              - id: 8b7329dfd5288b0011332317
                name: Color
                type: string
                isDeleted: false
                value: blue
                isInherited: true
          en-IN:
            attributes:
              - id: 9e7329dfd5288b0011332388
                name: Colour
                type: string
                isDeleted: false
                value: blue
                isInherited: true
        variants:
          - id: 5b7329dfd5288b0011332322
            sku: AA334V2
        categoryId: 7b7329dfd5288b0011332389
        createdAt: '2021-09-14T22:10:30.618Z'
        updatedAt: '2021-09-14T22:10:30.618Z'
  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
    notFoundError:
      description: The entity requested for isn't found
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: NOT_FOUND
            message: Resource not found
    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)

````