Promotions

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

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.

post/promotions/lookup

Request

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

Request body

allowDeletedboolean nullable

Whether or not the lookup should find promotions which are deleted.

customerinteger nullable

The id of the customer. Can be null, if returned promotions should be relevant for all customers.

Example request

{
  "products": [
    "123"
  ],
  "customer": 42
}

Response

Ok

countnumber nullable

Count of returned entries

hasMoreboolean

True if there are more promotions to receive than the current pagination allowed.

Example response

{
  "content": [
    {
      "id": 123,
      "name": "Summer discount",
      "description": "10% on all bikes in the summer.",
      "deleted": 1,
      "startdate": "2019-01-01 12:00:00",
      "enddate": "2019-02-01 12:00:00",
      "minproducts": 1,
      "productfilters": [
        {
          "attribute": "tag",
          "value": "Bike"
        }
      ],
      "customerfilters": [
        {
          "attribute": "tag",
          "value": [
            "1",
            "2",
            "3"
          ]
        }
      ],
      "serviceplanfilters": [
        {
          "attribute": "tag",
          "value": [
            "1",
            "2",
            "3"
          ]
        }
      ],
      "articles": [
        {
          "productno": "456",
          "quantity": 5
        }
      ],
      "action": {
        "type": "percentage",
        "amount": 10
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.