Promotions

Search for promotions and open a scroll for bulk extraction of large result sets.

Returns the first batch of promotions together with a scrollId. Pass the scrollId to GET /api/Promotions/Scroll/{id} to fetch each subsequent batch, and keep scrolling until the response no longer contains a scrollId. ScrollSize controls the batch size (default 500, range 100-1000). Scrolling is not intended for real time user requests, but rather for processing large amounts of data.

POST /api/Promotions/Search/Scroll
{
    {
      "marketIds": ["NOR"],
      "scrollSize": 500
    }
}
post/api/Promotions/Search/Scroll

Request

  • Base URL: https://api.omnium.no (the document declares no server; this is the origin it was published from)
  • URL: https://api.omnium.no/api/Promotions/Search/Scroll
  • Auth: API key in header Authorization

Request body

scrollSizeinteger nullable

Number of items per scroll batch. Default applied when null: 500. Allowed range: 100–1000.

activatedBeforeDatestring date-time nullable

Promotions that have started before this date. Only promotions where {Promotion.ActiveFrom <= activatedBeforeDate} will be included.

endedAfterDatestring date-time nullable

Promotions that will end after this date. Only promotions where {Promotion.ActiveTo >= endedAfterDate} will be included.

activeFromstring date-time nullable

Promotions that will become active after this date. Only promotions where {Promotion.ActiveFrom >= activeFrom} will be included.

activeTostring date-time nullable

Promotions that will end before this date. Only promotions where {Promotion.ActiveTo <= activeTo} will be included.

modifiedFromstring date-time nullable

Only return promotions modified on or after this date. Useful for delta queries / polling for changes.

modifiedTostring date-time nullable

Only return promotions modified on or before this date.

createdFromstring date-time nullable

Only return promotions created on or after this date. Useful for delta queries / polling for newly created promotions.

createdTostring date-time nullable

Only return promotions created on or before this date.

marketIdsstring[] nullable

List of marketids to filter on

promotionTypesstring[] nullable

List of promotion types to filter on. Valid types: ShippingPromotion, CategoryOrBrandPromotion, ProductSearchPromotion, PriceListPromotion, MultibuyPromotion, OrderAmountPromotion, KitPromotion

promotionIdsstring[] nullable

Only return promotions with one of these ids. Use this to fetch a known set of promotions in one call, e.g. the ids found in {promotionIds} on products or in promotion events, instead of calling GET /api/Promotions/{id} once per promotion. Combines with the other filters. Maximum 250 ids per request.

Response

Success

totalHitsinteger

Total number of hits

scrollIdstring nullable

The Scroll ID is used when fetching large amounts of data. Whenever the search results yields a ContinuationToken, the Scroll endpoints should be used to continue fetching documents

isValidboolean

Deprecated

Changes

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