Skip to content

PR01 - List promotions

Request

Call Frequency
Maximum usage: At each display of a promotions list page or on-promo offer detail page.
Pagination

This resource supports offset pagination (see documentation)

Sort fields

sort field can have the following values:

  • startDate (Default) - Sort by promotion activity start date (Newest first) (desc by default)
  • endDate - Sort by promotion activity end date (Newest first) (desc by default)
  • dateCreated - Sort by promotion creation date (Newest first) (desc by default)

Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_PROMOTION_READ)
Query
idsstring

A comma separated list of identifiers for a promotion

typesstring

A comma separated list of types for a promotion [AMOUNT_OFF|FREE_ITEMS|PERCENTAGE_OFF|REDUCED_UNIT_PRICE]

statesstring

A comma separated list of states for a promotion [PENDING|ACTIVE|EXPIRED|PENDING_APPROVAL|REJECTED|ALL]

Default:"ACTIVE"
ending_afterstring, (date-time)

Returns promotions which ended or will end after this date

starting_beforestring, (date-time)

Returns promotions which started or will start before this date

date_created_fromstring, (date-time)

Filter promotion creation date lower limit

date_created_tostring, (date-time)

Filter promotion creation date upper limit

last_request_datestring, (date-time)

Last request date and time. We recommend using the differential mode along with the states parameter.

localestring

The locale to filter the medias and the public descriptions with. If not specified, medias and public descriptions of all locales are returned.If specified, only the media and the public description matching the locale will be returned, or, if not exist, the one matching the platform default locale.

trigger_offer_idsstring

Promotion-triggering offer ids, separated by commas

reward_offer_idsstring

Promotion reward offer ids, separated by commas

channel_codesstring

Channel codes on which promotions apply, separated by commas

shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

curl -i -X GET \
  'https://your-instance.mirakl.net/api/promotions?ids=string&types=string&states=ACTIVE&ending_after=2019-08-24T14%3A15%3A22Z&starting_before=2019-08-24T14%3A15%3A22Z&date_created_from=2019-08-24T14%3A15%3A22Z&date_created_to=2019-08-24T14%3A15%3A22Z&last_request_date=2019-08-24T14%3A15%3A22Z&locale=string&trigger_offer_ids=string&reward_offer_ids=string&channel_codes=string&shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
promotionsArray of objectsrequired

List of promotions

total_countinteger, (int32)required
Response
{ "promotions": [ { … } ], "total_count": 1 }