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

> Retrieves a paginated list of all promotions.



## OpenAPI

````yaml offers_v2_combined post /api-offers/promo/list
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/promo/list:
    post:
      tags:
        - Promotion
      summary: Get all promotions
      description: Retrieves a paginated list of all promotions.
      parameters:
        - $ref: '#/components/parameters/xSiteContent'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/getPromoList'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promoListResponse'
        '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:
  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:
    getPromoList:
      type: object
      properties:
        offset:
          type: number
          minimum: 0
          description: >-
            The number of records to skip before returning records. For example,
            when offset is 20 and limit is 10, this endpoint returns records
            from 21 to 30.
          example: 0
        limit:
          type: number
          default: 10
          minimum: 1
          maximum: 100
          description: The maximum number of records per page.
          example: 10
        keyword:
          type: string
          description: >-
            Keyword to filter the matched promotion titles or promotional codes
            or coupon codes
          example: PROMO
        sortBy:
          type: string
          description: Field by which you want to sort the records
          default: updatedAt
          enum:
            - updatedAt
            - title
            - startDate
            - endDate
          example: updatedAt
        sortOrder:
          type: string
          description: >-
            Sorting order of the records<br />**desc:** Descending order<br
            />**asc:** Ascending order
          default: desc
          enum:
            - desc
            - asc
          example: desc
    promoListResponse:
      type: object
      properties:
        query:
          type: object
          properties:
            limit:
              description: The maximum number of records per page.
              type: number
              example: 10
              default: 10
            offset:
              description: >-
                The number of records to skip before returning records. For
                example, when offset is 20 and limit is 10, this endpoint
                returns records from 21 to 30.
              type: number
              example: 0
              default: 0
            count:
              type: number
              description: The total number of records.
              example: 50
        promos:
          type: array
          items:
            $ref: '#/components/schemas/promoListObject'
    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.
    promoListObject:
      type: object
      description: >-
        Represents the conditions based on which the promotions apply.  For
        example, consider the `type` is `USER_SEGMENT` with multiple values. To
        target all the specified segments, use the `AND` operator and to target
        any one of the segments, use the `OR` operator.
      properties:
        _id:
          type: string
          description: A 24-character system-generated promotion ID.
          example: abcdefg1ee7ce20123456789
        promoId:
          type: number
          description: A unique identifier of the promotion, for external use.
          example: 100013
        promoCodes:
          type: array
          description: >-
            A list of coupon codes that are applicable only for coupons. For
            coupons, the response includes promo codes associated with the
            coupon. For promotions, the response includes an empty array.
          example:
            - SUMMER100
            - SUMMER20
          items:
            type: string
        promoCount:
          type: number
          description: >-
            The number of coupon codes associated with a coupon. This value is
            always `0` for promotions.
          example: 0
        state:
          type: string
          description: >-
            The status of the promotion. <br />1. `ACTIVE` indicates the
            promotion is live and available. <br />2. `SCHEDULED` indicates the
            promotion is set up and is scheduled to be active in a future date.
            <br />3. `DISABLED` indicates the promotion is turned off and can be
            re-enabled at a later time if required. <br />4. `EXPIRED` indicates
            the promotion is no longer valid.
          enum:
            - ACTIVE
            - SCHEDULED
            - DISABLED
            - EXPIRED
          example: SCHEDULED
        isImplicit:
          type: boolean
          description: >-
            A flag indicating whether an offer is applied automatically. Set it
            to `true` for promotions, which should be applied automatically and
            `false` for coupons, which must be applied explicitly.
          example: true
        title:
          type: string
          description: The name of the promotion.
          example: CREATE PROMO
        startDate:
          type: string
          format: date-time
          description: The start time of the promotion, in UTC format.
          example: '2019-08-24T14:15:22Z'
        endDate:
          type: string
          format: date-time
          description: The end time of the promotion, in UTC format.
          example: '2019-08-25T14:15:22Z'
        isExclusive:
          type: boolean
          description: >-
            A flag indicating whether a coupon can be stacked with an existing
            promotion. Set it to `true` to prevent the coupon from being applied
            to items that already have promotions and `false` to allow coupon to
            be applied with existing promotions.
          example: true
        eligiblePriceList:
          type: array
          description: The price lists to be considered for the given promotion.
          items:
            type: number
            example: 10000056
        level:
          type: integer
          format: int32
          description: >-
            The promotion execution order. Promotion types are assigned default
            execution orders. Initial evaluation begins with level 1 promotions.
            The result of level 1 is used as the base price for level 2.
            Similarly, the result of level 2 becomes the base price for level 3,
            and so on.
          example: 1
        stackingType:
          type: string
          description: >-
            Defines the rules for how a promotion can be combined with other
            promotions.  This field determines whether a specific promotion can
            be applied in conjunction  with other active promotions during a
            transaction or if it must be used exclusively. Possible values: -
            `STACKABLE`: This promotion can be combined with other stackable
            promotions, allowing multiple 
              discounts to be applied together. The order in which stackable promotions are applied 
              is determined by the `level` field, with promotions having a higher priority (lower numeric value)
              being applied before those with a lower priority.
            - `EXCLUSIVE`: This promotion cannot be combined with any other
            promotions. The `level` field is
              used to determine which exclusive promotion will be evaluated and applied first. Once an exclusive
              promotion is applied, no other promotions can be used in the same transaction.
            - `TYPE_EXCLUSIVE`: This promotion cannot be combined with other
            promotions of the same type.
              The `level` field is used to determine which promotion within the same type will be evaluated and
              applied first.
            - `UNIVERSAL`: This promotion can be combined with any other
            promotions without restrictions.
              Universal promotions will be evaluated last.
          enum:
            - STACKABLE
            - EXCLUSIVE
            - TYPE_EXCLUSIVE
            - UNIVERSAL
          example: STACKABLE
        updatedAt:
          type: string
          format: date-time
          description: The time when the promotion was last updated, in UTC format.
          example: '2019-08-20T14:15:22Z'
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````