> ## 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 all prices

> Gets a paginated list of all prices.



## OpenAPI

````yaml offers_v2_combined get /api-offers/price
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:
    get:
      tags:
        - Pricing
      summary: Get all prices
      description: Gets a paginated list of all prices.
      parameters:
        - 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"}
        - name: limit
          in: query
          description: The maximum number of records per page.
          required: false
          schema:
            type: number
            minimum: 1
            default: 10
            maximum: 100
        - name: page
          in: query
          description: Page number you want to get the record for.
          required: false
          schema:
            type: number
            default: 1
            minimum: 1
        - name: priceListId
          in: query
          description: ID of the price list for which you want to get the price details
          required: false
          schema:
            type: number
        - name: sortBy
          in: query
          description: Field by which you want to sort the records
          required: false
          schema:
            type: string
            default: updatedAt
            enum:
              - itemId
              - priceListId
              - updatedAt
        - name: sortOrder
          in: query
          description: Sorting order the records- ascending or descending
          required: false
          schema:
            type: string
            default: desc
            enum:
              - asc
              - desc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getPriceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
components:
  schemas:
    getPriceResponse:
      type: object
      properties:
        query:
          description: >-
            Object containing the size, count and number of pages in the
            response.
          type: object
          example:
            limit: 10
            count: 8
            page: 1
        prices:
          description: An array containing all the prices in service
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/priceWoOffers'
              - type: object
                properties:
                  offers:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/offer'
                        - type: object
                          properties:
                            priceMethodType:
                              type: string
                              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`.
                              example: Range-Base
                            range:
                              type: array
                              items:
                                allOf:
                                  - $ref: '#/components/schemas/range'
                                  - type: object
                                    properties:
                                      maxQuantity:
                                        oneOf:
                                          - type: string
                                            example: Infinity
                                            description: >-
                                              The maximum quantity of items that can
                                              be sold to apply the price range.
                                          - type: number
                                            example: 90
                                            description: >-
                                              Set the maximum quantity to get offer
                                              price.
                                        description: Maximum quantity to get offer price.
                                      width:
                                        type: array
                                        description: >-
                                          Only for 2 dimensional price
                                          calculations, meaning when
                                          price-method-type is
                                          `SurfaceArea_Square_Increment_2Dim`.
                                        items:
                                          type: object
                                          required:
                                            - minQuantity
                                            - maxQuantity
                                            - price
                                          properties:
                                            minQuantity:
                                              type: number
                                              example: 1
                                              description: Minimum quantity to get offer price.
                                            maxQuantity:
                                              oneOf:
                                                - type: string
                                                  example: Infinity
                                                  description: The maximum quantity value `Infinity`.
                                                - type: number
                                                  example: 5
                                                  description: >-
                                                    Set the maximum quantity to get offer
                                                    price
                                              description: Maximum quantity to get offer price
                                            price:
                                              type: number
                                              example: 20.75
                                              description: Unit price for the width range
    error400:
      type: object
      properties:
        code:
          description: The error code.
          type: string
          example: BAD_REQUEST
        message:
          description: An error message coressponding to the `code`.
          type: string
          example: Bad Request
    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.
    priceWoOffers:
      type: object
      properties:
        _id:
          description: fabric internal unique ID
          type: string
          example: 616e011037a3810012345678
        isSoftDeleted:
          description: 'true: Price is deleted<br /> false: Price is not deleted'
          type: boolean
          example: false
        itemId:
          type: number
          description: Item ID
          example: 1000000051
        itemSku:
          type: string
          description: Item SKU
          example: SKU123456
        offerId:
          type: number
          description: ID of the created offer for the itemId or itemSku
          example: 2386
        createdAt:
          type: string
          description: Creation date of the record
          format: date-time
          example: '2020-02-02T17:22:48.570Z'
        updatedAt:
          type: string
          description: Last update date of the record
          format: date-time
          example: '2020-02-02T17:22:48.570Z'
        job:
          type: boolean
          example: false
          description: >-
            true: Job is running either to create, update, or delete the
            record<br /> false: Job is either completed or not running for some
            reason
        priceListId:
          type: number
          description: Price list ID that contains the updated or created price
          example: 100000
    offer:
      type: object
      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: Sales channel ID
          type: number
          example: 12
        startDate:
          description: Start date of the price if any
          type: string
          format: date-time
          example: '2020-02-03T17:22:48.570Z'
        endDate:
          description: End date of the price if any
          type: string
          format: date-time
          example: '2020-02-05T17:22:48.570Z'
        price:
          $ref: '#/components/schemas/price'
        offerCode:
          type: number
          description: Unique code associated with the created offer price
          example: 130283400
        range:
          description: >-
            Price range, based on quantity of items sold. If price range of an
            item is setup using the *Price Range* APIs, this array should not be
            empty.
          type: array
          items:
            $ref: '#/components/schemas/range'
        priceAttributes:
          type: array
          items:
            type: object
            example:
              _id: 614dc5b0af8ee70008698202
              id: 614dc5b0af8ee70008698202
    range:
      type: object
      properties:
        minQuantity:
          description: Minimum quantity to be sold for the range price to be applied
          type: number
          example: 3
        price:
          description: >-
            Range price of item to be applied for each item if quantity meets
            the minQuantity requirement
          type: number
          example: 299
    price:
      type: object
      properties:
        base:
          description: Base price (Minimum fixed price) of item
          type: number
          example: 299
        sale:
          description: Price at which the product is offered for sale
          type: number
          example: 199
        cost:
          description: Cost of the item
          type: number
          example: 149
        currency:
          description: The 3 letter currency code as defined by ISO-4217
          type: string
          example: USD
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````