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

# Get Product by ID

> With this endpoint, you can get details of a product (item, bundle, or variant) by ID. The response includes the product's attributes and its variants. You can optionally specify `locales` to get products for specific regions. **Note**: If you don't have product ID, use the corresponding SKU-based endpoint - `GET /products/sku/{sku}`



## OpenAPI

````yaml product.openapi get /products/{id}
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/{id}:
    get:
      tags:
        - Product Operations by ID
      summary: Get Product by ID
      description: >-
        With this endpoint, you can get details of a product (item, bundle, or
        variant) by ID. The response includes the product's attributes and its
        variants. You can optionally specify `locales` to get products for
        specific regions. **Note**: If you don't have product ID, use the
        corresponding SKU-based endpoint - `GET /products/sku/{sku}`
      operationId: getProductById
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          example: 64184766610c0e32a86d8758
          description: 24-character system-generated product ID
        - $ref: '#/components/parameters/locales'
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - $ref: '#/components/parameters/statusesQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getProductByIdResponse'
              examples:
                Product:
                  $ref: '#/components/examples/productExample'
                Variant:
                  $ref: '#/components/examples/variantExample'
                Bundle:
                  $ref: '#/components/examples/bundleExample'
          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'
        '413':
          $ref: '#/components/responses/payloadLimitExceededError'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    locales:
      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
    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:
    getProductByIdResponse:
      $ref: '#/components/schemas/idBasedProduct'
    idBasedProduct:
      type: object
      description: Details of Item by ID
      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 of product
          items:
            $ref: '#/components/schemas/productAttributeValue'
        localizedProperties:
          $ref: '#/components/schemas/productProperties'
        parentProduct:
          $ref: '#/components/schemas/parentProductId'
        variants:
          $ref: '#/components/schemas/variantProducts'
        categoryId:
          $ref: '#/components/schemas/categoryIdResponse'
        bundleProducts:
          $ref: '#/components/schemas/bundleProducts'
        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)
    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
    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'
    variantProducts:
      type: array
      description: Product variants by ID
      items:
        type: object
        required:
          - id
        properties:
          id:
            $ref: '#/components/schemas/productId'
    categoryIdResponse:
      type: string
      example: 6h7329dfd5288b001133231d
      description: 24-character system-generated category ID of product
    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
    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'
  examples:
    productExample:
      value:
        id: 5g7329dfd5288b00113323p7
        sku: QWERTTY56DDFFVVV
        type: ITEM
        isActive: true
        hasDraft: true
        hasLive: true
        status: LIVE
        attributes:
          - id: 227329dfd5288b0011332315
            name: Color
            type: string
            isDeleted: false
            value: blue
            isInherited: true
        localizedProperties:
          en-US:
            attributes:
              - id: 637329dfd5288b0011332354
                name: Color
                type: string
                isDeleted: false
                value: blue
                isInherited: true
          en-IN:
            attributes:
              - id: 8f7329dfd5288b0011332334
                name: Colour
                type: string
                isDeleted: false
                value: blue
                isInherited: true
        variants:
          - id: 967329dfd5288b0011332356
        categoryId: 7f7329dfd5288b0011332378
        createdAt: '2021-09-14T22:10:30.618Z'
        updatedAt: '2021-09-14T22:10:30.618Z'
    variantExample:
      value:
        id: 717329dfd5288b0011332317
        sku: QWDDFFVVV
        type: VARIANT
        isActive: true
        hasDraft: false
        hasLive: true
        status: LIVE
        attributes:
          - id: 9e7329dfd5288b00113323b7
            name: Color
            type: string
            isDeleted: false
            value: blue,
            isInherited: true
        localizedProperties:
          en-US:
            attributes:
              - id: 4e7329dfd5288b00113323b6
                name: Color
                type: string
                isDeleted: false
                value: blue
                isInherited: true
          en-IN:
            attributes:
              - id: 7b7329dfd5288b0011332317
                name: Colour
                type: string
                isDeleted: false
                value: blue
                isInherited: true
        parentProduct:
          id: 7e7329dfd5288b0011332355
        categoryId: 717329dfd5288b0011332317
        createdAt: '2021-09-14T22:10:30.618Z'
        updatedAt: '2021-09-14T22:10:30.618Z'
    bundleExample:
      value:
        id: 8b7329dfd5288b0011332322
        sku: QWEDFFVVV
        type: BUNDLE
        isActive: false
        hasLive: true
        hasDraft: true
        status: DRAFT
        attributes:
          - id: 9b7329dfd5288b0011332344
            name: Color
            type: string
            isDeleted: false
            value: blue
            isInherited: true
        localizedProperties:
          en-US:
            attributes:
              - id: 9a7329dfd5288b0011332344
                name: Color
                type: string
                isDeleted: false
                value: blue
                isInherited: true
          en-IN:
            attributes:
              - id: 712329dfd5288b0011332366
                name: Colour
                type: string
                isDeleted: false
                value: blue
                isInherited: true
        bundleProducts:
          - id: 567329dfd5288b0011332311
            quantity: 2
          - id: 717329dfd5288b0011332355
            quantity: 2
        categoryId: 5b7329dfd5288b0011332366
        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
    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)

````