---
title: "Get all relevant promotions for a set of products and a customer."
method: POST
path: "/promotions/lookup"
tags: ["Promotions"]
---

# Get all relevant promotions for a set of products and a customer.

`POST /promotions/lookup`

## Request

- Base URL: `https://api.c1st.com/api`
- URL: `https://api.c1st.com/api/promotions/lookup`
- Auth: HTTP bearer

Get all relevant promotions for a set of products and a customer.
Currently the customer is ignore and can be null.
This query can be seen as "given a cart, what promotions will match?"

If you have multiple of the same products in the query, they should be represented as a `CartArticle`,
i.e. specified by a `productno` and `quantity` (see example). Otherwise, you can simply use productno strings.

## Request body

- PromotionLookup: The object used to query for relevant promotions based on products and customers.
  - `products` union[]: List of productnos.
    - union
      - string
      - CartArticle
        - `productno` string, nullable: The product number of the product that the article represents.
        - `quantity` number, nullable: The amount that is present of that product.
  - `allowDeleted` boolean, nullable: Whether or not the lookup should find promotions which are deleted.
  - `customer` integer, nullable: The id of the customer. Can be null, if returned promotions should be relevant for all customers.

## Response `200`

Ok

- PromotionLookupResponse
  - `content` Promotion[]
    - `id` integer, nullable: A unique ID. Use this to handle this subscription.
    - `name` string: Short name for the promotion
    - `description` string, nullable: Description of the promotion. This is only displayed in the controlpanel, not for the customers.
    - `deleted` 0 | 1, nullable: Whether or not the promotion is deleted. Disabled promotions do not trigger even when inside the date range.
    - `startdate` string, nullable: Specifies when the promotion starts. Null if the promotion has no startdate and thus is always in effect (except if deleted).
    - `enddate` string, nullable: Specifies when the promotion ends. Null if the promotion has no enddate.
    - `minproducts` integer, nullable: Minimum number of prodcts before the promotion is in effect
    - `applyall` boolean, nullable: Whether or not to apply promotion to all
    - `productfilters` PromotionProductFilter[], nullable
      - `attribute` 'product_productno' | 'product_tag' | 'product_brand' | 'product_styleno': What attribute to filter the promotion on.
      - `value` union
        - string, nullable: The value that the attribute needs to have to match.
        - string[], nullable: A list of possible values. The attribute needs to match at least one of the values for the rule to apply.
    - `customerfilters` PromotionCustomerFilter[], nullable
      - `attribute` 'customer_tag': What attribute to filter the promotion on.
      - `value` union
        - string[]: A list of possible values. The attribute needs to match at least one of the values for the rule to apply.
        - string: The value that the attribute needs to have to match.
    - `loyalty_members_only` boolean, nullable
    - `serviceplanfilters` PromotionServicePlanFilter[], nullable
      - `attribute` 'serviceplan_handle': What attribute to filter the promotion on.
      - `value` union
        - string[]: A list of possible values. The attribute needs to match at least one of the values for the rule to apply.
        - string: The value that the attribute needs to have to match.
    - `articles` CartArticle[], nullable: A list of products from the cart that match the promotion. This will only be set in the case of the lookup endpoint.
      - `productno` string, nullable: The product number of the product that the article represents.
      - `quantity` number, nullable: The amount that is present of that product.
    - `storeid` integer, nullable
    - `productno_counts` object[]
      - `productno` string, nullable
      - `count` number, nullable
    - `count` integer, nullable: The number of times this promotion matches things in the cart. This will only be set in the case of the lookup endpoint.
    - `action` PromotionAction: The action / effect the promotion has on checkout.
      - `type` 'percentage' | 'adjustPriceBy' | 'percentageByCostprice' | 'totalPriceUnit': The type of the action.
      - `amount` number, double: The amount to be deducted, depending on the `type`.
  - `count` number, nullable: Count of returned entries
  - `hasMore` boolean: True if there are more promotions to receive than the current pagination allowed.

---

[API](https://skmtc.dev/c1st/apis/customers-1st-api.md) - [All operations](https://skmtc.dev/c1st/apis/customers-1st-api/llms.txt) - [OpenAPI document](https://skmtc.dev/c1st/apis/customers-1st-api/revisions/4250bb326f2a?raw)
