> ## 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 price by itemId

> Get a paginated list of price details for the given `itemId` and `priceListId`. If `priceListId` isn't specified, prices are retrieved for the `itemId` that belongs to the default price list.



## OpenAPI

````yaml prices.openapi get /prices/{itemId}
openapi: 3.0.0
info:
  title: Offers - Prices
  description: >-
    fabric Pricing endpoints let you create and manage price details for one or
    more items. You can configure the prices endpoints to include your default
    price list in all requests.
  version: 3.0.0
  x-audience: external-public
  termsOfService: https://fabric.inc/terms-of-use
  contact:
    name: Offers support
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
servers:
  - url: https://api.fabric.inc/v3
    description: Production environment
security: []
externalDocs:
  description: Find out more about Offers
  url: https://developer.fabric.inc/docs/offers-overview
paths:
  /prices/{itemId}:
    get:
      tags:
        - Prices
      summary: Get price by itemId
      description: >-
        Get a paginated list of price details for the given `itemId` and
        `priceListId`. If `priceListId` isn't specified, prices are retrieved
        for the `itemId` that belongs to the default price list.
      operationId: getPricesByItemId
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/queryParameterSize'
        - $ref: '#/components/parameters/queryParameterOffset'
        - $ref: '#/components/parameters/queryParameterPriceListId'
        - name: itemId
          in: path
          required: true
          description: The item ID from which prices are retrieved.
          schema:
            type: number
        - name: status
          in: query
          description: >
            The status used to filter prices. The following statuses are
            available:

            - `ACTIVE`: Displays current prices or regular prices. These are the
            prices that are actively displayed and applied to products on an
            ongoing basis.

            - `SCHEDULED`: Displays prices that will be applied to products in
            the future. Retailers often use scheduled prices for marketing
            campaigns to attract customers, generate sales, clear inventory, or
            create a sense of urgency.

            - `ALL`: Displays both `ACTIVE` and `SCHEDULED` prices.
          required: false
          schema:
            type: string
            default: ALL
            enum:
              - ACTIVE
              - SCHEDULED
              - ALL
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getPriceResponse'
              examples:
                getPrice:
                  $ref: '#/components/examples/getPriceById'
                getPriceRangeWithQuantity:
                  $ref: '#/components/examples/getPriceRangeById'
                getPriceRangeWithArea:
                  $ref: '#/components/examples/getPriceRangeWithAreaById'
                getPriceRangeWithWidth:
                  $ref: '#/components/examples/getPriceRangeWithWidthById'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '404':
          description: Not Found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/itemIdNotFound'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
      security:
        - AuthorizationToken: []
components:
  parameters:
    xFabricTenantId:
      in: header
      name: x-fabric-tenant-id
      schema:
        type: string
        minLength: 24
        maxLength: 24
      required: true
      example: 5f328bf0b5f328bf0b5f328b
      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.
    xFabricChannelId:
      in: header
      name: x-fabric-channel-id
      schema:
        type: string
        example: '12'
      description: >-
        x-fabric-channel-id identifies the sales channel through which the API
        request is being made; primarily for multichannel use cases. It is a
        required field.
    xClientId:
      in: header
      name: x-client-id
      schema:
        type: string
      required: false
      example: copilot
      description: >-
        A unique identifier obtained from
        [Copilot](/v3/platform/settings/api-apps/getting-system-app-credentials)
        for the System app in the fabric ecosystem, essential for OpenID Connect
        authentication flows.
    xFabricRequestId:
      in: header
      name: x-fabric-request-id
      description: A unique request ID.
      required: false
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
    queryParameterSize:
      name: size
      in: query
      description: The maximum number of records per page.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 10
        maximum: 100
    queryParameterOffset:
      name: offset
      in: query
      description: >-
        The number of records to skip before returning records. For example,
        with an offset of 20 and limit of 10, you will get records from 21 to
        30.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
        example: 0
        default: 0
    queryParameterPriceListId:
      name: priceListId
      in: query
      description: >-
        The price list ID to which the item belongs. If not provided, the
        default price list is used.
      required: false
      schema:
        type: integer
        format: int32
        example: 100000
  headers:
    xFabricRequestIdResponse:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  schemas:
    getPriceResponse:
      type: object
      properties:
        query:
          $ref: '#/components/schemas/offsetQuery'
        priceMetadata:
          $ref: '#/components/schemas/priceMetadata'
        data:
          type: array
          items:
            $ref: '#/components/schemas/priceWithOffersMetaData'
    missingTenantHeader:
      type: object
      description: Tenant header is missing
      properties:
        type:
          description: The error code.
          type: string
          example: TENANT_HEADER_REQUIRED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: x-fabric-tenant-id header is required
    error400:
      type: object
      description: Bad request error
      properties:
        type:
          description: The error code.
          type: string
          example: BAD_REQUEST
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Bad request
    error401:
      type: object
      description: Unauthorized error
      properties:
        type:
          description: The error code.
          type: string
          example: UNAUTHORIZED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Invalid credentials
    itemIdNotFound:
      type: object
      description: Item not found error
      properties:
        type:
          description: The error code.
          type: string
          example: ITEMID_NOT_FOUND
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: The itemId you entered doesn't exist
    error500:
      type: object
      description: Internal server error
      properties:
        type:
          description: The error code.
          type: string
          example: INTERNAL_SERVER_ERROR
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Internal server error
    offsetQuery:
      type: object
      description: Provides pagination data.
      properties:
        size:
          type: integer
          format: int32
          example: 10
          minimum: 1
          maximum: 100
          default: 10
          description: The maximum number of records per page.
        offset:
          type: integer
          format: int32
          example: 10
          minimum: 0
          default: 0
          description: >-
            The number of records to skip before returning records. For example,
            with an offset of 20 and limit of 10, you will get records from 21
            to 30.
        count:
          type: integer
          format: int32
          example: 50
          description: The total number of available records.
    priceMetadata:
      type: object
      required:
        - priceListId
        - createdAt
        - updatedAt
      properties:
        isDeleted:
          $ref: '#/components/schemas/isDeleted'
        itemId:
          type: integer
          format: int32
          description: The assigned product item ID the price is retrieved for.
          example: 1000000051
        itemSku:
          type: string
          description: The assigned product SKU the price is retrieved for.
          example: SKU123456
        priceListId:
          type: integer
          format: int32
          description: >-
            The price list ID for retrieving prices for the specified `itemId`
            and `itemSku`.
          example: 100000
        channelId:
          description: Channel ID
          type: string
          example: '12'
        currency:
          description: The currency type set for the price list.
          type: string
          example: USD
        createdAt:
          $ref: '#/components/schemas/createdAt'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
    priceWithOffersMetaData:
      type: object
      description: Price details including offer price
      required:
        - startAt
        - endAt
        - price
      properties:
        startAt:
          type: string
          description: The timestamp of when the adjusted price starts.
          format: date-time
          example: '2020-02-02T17:22:48.570Z'
        endAt:
          type: string
          description: The timestamp of when the adjusted price ends.
          format: date-time
          example: '2020-02-02T17:22:48.570Z'
        price:
          type: object
          description: Price details
          required:
            - base
          properties:
            base:
              description: >-
                Item base price. It's the minimum fixed price of the item before
                any taxes or other charges added.
              type: number
              nullable: true
              format: double
              example: 2.99
            sale:
              description: >-
                Item sale price. It's the discounted price at which the item is
                sold to clear inventory.
              type: number
              nullable: true
              format: double
              example: 99.99
            cost:
              description: >-
                Cost of the item set by the manufacturer. It's the amount that
                costs the manufacturer to produce or acquire the product.
              type: number
              nullable: true
              format: double
              example: 149
    isDeleted:
      type: boolean
      description: |
        `true`: The price is deleted

        `false`: The price isn't deleted
      example: false
    createdAt:
      type: string
      format: date-time
      description: The timestamp when the price was created.
      example: '2019-08-20T14:15:22.000Z'
    updatedAt:
      type: string
      format: date-time
      description: The timestamp when the price was last updated.
      example: '2019-08-20T14:15:22.000Z'
  examples:
    getPriceById:
      value:
        query:
          size: 10
          offset: 0
        priceMetadata:
          priceListId: 100000
          itemId: 10000001
          itemSku: SKU0123456
          isDeleted: false
          channelId: '12'
          currency: USD
          createdAt: '2019-08-20T14:15:22.000Z'
          updatedAt: '2019-08-20T14:15:22.000Z'
        data:
          startAt: '2019-08-24T14:15:22.000Z'
          endAt: '2019-08-25T14:15:22.000Z'
          price:
            base: 299.99
            sale: 199.99
            cost: 148.99
    getPriceRangeById:
      value:
        query:
          size: 10
          offset: 0
        priceMetadata:
          priceListId: 100000
          itemId: 10000001
          itemSku: SKU0123456
          isDeleted: false
          channelId: '12'
          currency: USD
          createdAt: '2019-08-20T14:15:22.000Z'
          updatedAt: '2019-08-20T14:15:22.000Z'
        data:
          startAt: '2019-08-24T14:15:22.000Z'
          endAt: '2019-08-25T14:15:22.000Z'
          price:
            base: 299.99
            sale: 199.99
            cost: 148.99
          priceRange:
            priceMethodType: QUANTITY_PRICING
            ranges:
              - minQuantity: 1
                maxQuantity: 20
                price: 20.75
            priceAddons:
              - id: 61118
                name: BuildMotor
                price: 458.97
    getPriceRangeWithAreaById:
      value:
        query:
          size: 10
          offset: 0
        priceMetadata:
          priceListId: 100000
          itemId: 10000001
          itemSku: SKU0123456
          isDeleted: false
          channelId: '12'
          currency: USD
          createdAt: '2019-08-20T14:15:22.000Z'
          updatedAt: '2019-08-20T14:15:22.000Z'
        data:
          startAt: '2019-08-24T14:15:22.000Z'
          endAt: '2019-08-25T14:15:22.000Z'
          price:
            base: 299.99
            sale: 199.99
            cost: 148.99
          priceRange:
            priceMethodType: SQUARE_AREA_PRICING
            ranges:
              - minArea: 1
                price: 20.75
            priceAddons:
              - id: 61118
                name: BuildMotor
                price: 458.97
    getPriceRangeWithWidthById:
      value:
        query:
          size: 10
          offset: 0
        priceMetadata:
          priceListId: 100000
          itemId: 10000001
          itemSku: SKU0123456
          isDeleted: false
          channelId: '12'
          currency: USD
          createdAt: '2019-08-20T14:15:22.000Z'
          updatedAt: '2019-08-20T14:15:22.000Z'
        data:
          startAt: '2019-08-24T14:15:22.000Z'
          endAt: '2019-08-25T14:15:22.000Z'
          price:
            base: 299.99
            sale: 199.99
            cost: 148.99
          priceRange:
            priceMethodType: TABLE_PRICING_LENGTH_WIDTH
            ranges:
              - minLength: 1
                maxLength: 100
                widths:
                  - minWidth: 1
                    maxWidth: 200
                    price: 20.75
            priceAddons:
              - id: 1000000051
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````