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

> Retrieves paginated list of price details based on priceListId and priceId or itemSku or itemId.



## OpenAPI

````yaml offers_v2_combined get /api-offers/price/{priceId}/priceList/{priceListId}
openapi: 3.0.0
info:
  title: Offers v2
  description: >-
    fabric's Offers APIs let you set up and manage stock keeping unit (SKU)
    prices. Its wide range of coupon and promotion features let you design
    discounts ranging from single-use, customer-specific coupons to site-wide
    promotions applicable for all SKUs.
  version: 2.0.0
  contact:
    email: support@fabric.inc
  license:
    url: https://fabric.inc/api-license
    name: fabric API license
servers:
  - url: https://live.copilot.fabric.inc
    description: Production
security:
  - AuthorizationToken: []
tags:
  - name: Price List
    description: >-
      Price list is a collection of items and their assigned prices. An item can
      exist in multiple price lists. This gives you the ability to assign
      different prices to the same item. Price lists let you set currency and
      duration of the prices. For example, if the price list expires, prices of
      items within the price list will also expire. You can configure the
      pricing API to include your default price. <br />When requesting pricelist
      of items or evaluating promotions, you should mention the price list ID
      that you want to use.
  - name: Pricing
    description: >-
      Pricing endpoints let you create and manage price details for one or many
      items. You can configure the pricing API to include your default price
      list in all requests.
  - name: Price Guard
    description: >-
      Price Guard allows you to create and manage more diversified price-kinds
      for the item, such as manufacturer recommended retail price (MSRP),
      minimum advertised price (MAP), floor price, ceiling price, clearance
      price,  and so on.  Price guard works as a protection mechanism against
      any further creation of prices for the item. These endpoints let you
      create and manage such price-kinds.
  - name: Price Kind
    description: >-
      Unlike price guard, price kind endpoint lets you get the fundamental price
      kinds (for example, base price and sale price) that are created while
      setting up the item information.
  - name: Promotion
    description: >-
      Promotion is a discount on an item, cart or shipping method based on set
      conditions. As promotions can be linked to specific price lists, it is
      important to submit the correct price list ID. Promotion endpoints let you
      create and manage discounts that will be applied to all customers' carts
      that meet the required conditions.
  - name: Coupon
    description: >-
      Coupon endpoints let you create and manage coupon codes that customers can
      enter at checkout to receive a discount.
  - name: Dynamic Pricing Engine
    description: >-
      fabric's Dynamic Pricing Engine APIs evaluate promotions and calculate
      prices instantly for the cart items using real-time price calculation
      method, that incorporates the latest information, to provide personalized
      and competitive prices for specific customers. It supports formula based
      custom SKU dynamic pricing, and shows discount breakdown details for
      separate items having separate promotions. It uses the cache information,
      instead of fetching offer details of items from database, to evaluate
      promotions and calculate prices instantly. It is fast, scalable to
      millions of pricing requests per day, and supports complex promotional
      strategies.
  - name: Global exclusion
    description: >-
      Global exclusions let you exclude SKUs from being discounted by active
      promotions. These endpoints let you manage those sku-lists.
  - name: Redemption
    description: Redemption endpoints let you manage the records of coupon redemptions.
  - name: Segment
    description: >-
      Segment endpoints let you target promotions at specific groups of
      customers by linking the promotion to a segment identifier. A customer
      segment is a group of customers that have been given a unique reference to
      easily identify them. They may be grouped in a number of ways such as
      demographics, locations, device type, and so on. fabric Offers supports
      the assignment of a customer segment to a promotion so that the promotion
      is applied only to a specific group of customers. You must enter your
      customer segment identifiers in the *Settings* of the Copilot application.
  - name: Upload price CSV
    description: This endpoint lets you bulk upload price details using a CSV file.
  - name: Product
    description: >-
      Product endpoint lets you get product and price information based on sku.
      Product information is retrieved from Product Catalog and price details
      are retrieved from Offers service.
  - name: Item
    description: >-
      Item endpoints let you get products and prices information based on
      itemId. Product information of an item is retrieved from Product Catalog
      and price details are retrieved from Offers service.
  - name: Attributes
    description: >-
      Attributes refer to a collection of attributes names and their values.
      Using attributes, you can group entities, such as products or shoppers,
      that share similar characteristics, such as dimension, age group,
      location, device type, and more. For example, the shopper segmentation can
      be used to tailor promotions to a specific customer segment by linking the
      promotion to the segment identifier.
  - name: Exports
    description: >-
      fabric Export endpoints let you export data to CSV files based on the
      provided filters.
externalDocs:
  description: Learn more about Offers
  url: https://developer.fabric.inc/docs/offers-overview
paths:
  /api-offers/price/{priceId}/priceList/{priceListId}:
    get:
      tags:
        - Pricing
      summary: Get price by priceId
      description: >-
        Retrieves paginated list of price details based on priceListId and
        priceId or itemSku or itemId.
      parameters:
        - $ref: '#/components/parameters/xSiteContent'
        - name: priceId
          in: path
          required: true
          description: >-
            Value for this field can be database ID (_id) of the price or
            itemSku or itemId based on the type mentioned in the `type` query
            parameter.<br /> If a type is not specified in the `type` query
            parameter, you must provide itemSku in this priceId field.
          schema:
            type: string
            example: SKU123456
        - name: priceListId
          in: path
          required: true
          description: ID of the priceList to search the price for.
          schema:
            type: number
            example: 100000
        - name: type
          in: query
          description: >-
            The `priceId` path parameter will be treated as itemSku, itemId or
            _id based on the value of this field. The default search will be
            done by `itemSku`.
          required: false
          schema:
            type: string
            enum:
              - itemSku
              - itemId
              - _id
            example: itemId
        - name: limit
          in: query
          description: >-
            The maximum number of records per page. If the `isActive` flag is
            sent, the `limit` will be ignored.
          required: false
          schema:
            type: number
            example: 10
            default: 10
        - name: page
          in: query
          description: >-
            Number of pages you wish to retrieve when selecting records in the
            price offers array. Default is `1`. If the `isActive` flag is true,
            `page` will be ignored.
          required: false
          schema:
            type: number
            example: 1
        - name: isActive
          in: query
          description: >-
            If isActive is `false`, offers array response based on limit and
            page parameters.<br /> If isActive is `true`, only the offer object
            whose price is active will be returned in the offers array.<br />
            Default value is `false`.
          required: false
          schema:
            type: boolean
            example: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getByIdPriceResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceEntryNotFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  schemas:
    getByIdPriceResponse:
      type: object
      required:
        - _id
        - itemId
        - priceListId
        - offers
        - createdAt
        - updatedAt
      properties:
        _id:
          type: string
          description: fabric internal ID
          example: 62583d6e2d4b944f747127a5
        isSoftDeleted:
          type: boolean
          description: 'true: record is deleted<br /> false: record is not deleted'
          example: false
        itemId:
          type: number
          description: Item ID
          example: 1000000051
        itemSku:
          type: string
          example: SKU123456
          description: SKU of the item
        priceListId:
          type: number
          description: ID of the priceList related to the SKU or item
          example: 100000
        offers:
          type: array
          maxItems: 10
          minItems: 1
          description: Prices of the SKU/priceListId.
          items:
            type: object
            required:
              - channel
              - startDate
              - endDate
              - price
            properties:
              kind:
                description: >-
                  Pricekind ID. This ID helps to identify if the price is base
                  price or clearance price or any other additional price.
                type: number
                example: 12
              channel:
                description: Channel ID
                type: number
                example: 12
              startDate:
                description: Start date of the price
                type: string
                format: date-time
              endDate:
                description: End date of the price
                type: string
                format: date-time
              price:
                type: object
                description: Price data
                required:
                  - base
                  - currency
                properties:
                  base:
                    description: Minimum fixed price of item.
                    type: number
                    example: 299
                  sale:
                    description: Price at which product is offered for sale
                    type: number
                    example: 199
                  cost:
                    type: number
                    example: 149
                    description: Cost price of the item if any.
                  currency:
                    type: string
                    example: USD
                    description: Currency code of the price.
              range:
                type: array
                description: Range of prices if any.
                minItems: 1
                items:
                  type: object
                  properties:
                    minQuantity:
                      type: number
                      description: Minimum quantity to get a specific offer price.
                      example: 3
                    maxQuantity:
                      oneOf:
                        - type: string
                        - type: number
                      example: Infinity
                      description: Maximum quantity to get a specific price.
                    price:
                      description: >-
                        Price for the specific range. This price only exists if
                        width is not provided. That is, when the price method
                        types are `Range-Base` and
                        `SurfaceArea_Square_Increment`.
                      type: number
                      example: 299
                    width:
                      description: >-
                        Only for 2 dimensional price calculations, meaning when
                        price-method-type is
                        `SurfaceArea_Square_Increment_2Dim`. It exists if the
                        above `price` is not sent.
                      type: array
                      items:
                        type: object
                        properties:
                          minQuantity:
                            type: number
                            description: Minimum quantity to get a specific offer price.
                            example: 3
                          maxQuantity:
                            description: Maximum quantity to get a specific offer price.
                            oneOf:
                              - type: string
                              - type: number
                            example: Infinity
                          price:
                            description: Price for the width range.
                            type: number
                            example: 299
              priceMethodType:
                description: >-
                  Type of method for calculating the price. <br />
                  **Range-Base:** Uses the quantity of sold items to determine
                  which price to use. Base price (minimum fixed price) is
                  ignored in this method.<br />
                  **SurfaceArea_Square_Increment:** Adds an incremental amount
                  depending on the area of the item. The final price is
                  calculated by adding the area multiplied by the price set for
                  quantity, to the base price. For example, if we sell a rug
                  that is 10x2, final price will be the base price (50, for
                  example), plus an increment of the area (20) times the price
                  range set for min quantity.<br />
                  **SurfaceArea_Square_Increment_2Dim:** Adds extra price to the
                  base price, determined by the area. The difference with this
                  Square Area method is that in this case the overprice is not
                  calculated, but instead it is looked-up in a table-like
                  structure that is already created, by checking for the range
                  of values provided in `width`.
                type: string
                enum:
                  - Range-Base
                  - SurfaceArea_Square_Increment
                  - SurfaceArea_Square_Increment_2Dim
                example: Range-Base
              priceAttributes:
                type: array
                description: Price attributes/add-ons for the item
                items:
                  type: object
                  properties:
                    blindMotor:
                      type: number
                      example: 30
                      description: Price of the attribute/addon
              additionalAttributes:
                type: array
                description: A placeholder for additional attributes, in key-value pairs.
                items:
                  type: object
                  properties:
                    customSkuTitle:
                      type: string
                      example: HOUSE TREE
                    customCategory:
                      type: string
                      example: HOME
        createdAt:
          type: string
          format: date-time
          example: '2020-02-02T17:22:48.570Z'
          description: Date of creation of the price.
        updatedAt:
          type: string
          format: date-time
          example: '2020-02-02T17:22:48.570Z'
          description: Last updated date of the price.
        job:
          type: boolean
          description: >-
            true: Job is running<br /> false: Job operation is either completed
            or not running for some reason
          example: false
        offerId:
          type: number
          example: 1074
          description: ID of the created offer for the itemId or itemSku
        query:
          type: object
          description: >-
            Pagination details of Offers array. This field will only exist if
            the `isActive` flag is false.
          required:
            - count
            - page
            - limit
          properties:
            count:
              description: The total number of records.
              example: 15
              type: number
            page:
              description: Page number to return. Always paired with `limit`
              example: 1
              type: number
            limit:
              description: The maximum number of records per page.
              type: number
              example: 10
              default: 10
    priceEntryNotFound:
      type: object
      properties:
        code:
          description: The error code.
          type: string
          example: PRICE_NOT_FOUND
        message:
          description: The error message corresponding to the `code`.
          type: string
          example: No price entry found.
    error500:
      type: object
      properties:
        code:
          description: The error code.
          type: string
          example: INTERNAL_SERVER_ERROR
        message:
          description: An error message coressponding to the `code`.
          type: string
          example: Internal server error.
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````