Skip to main content

Get Rule Promotions

GET 

https://useast.api.elasticpath.com/v2/rule-promotions

Retrieves a list of rule-based promotions, including information such as discount type, eligibility criteria, and configuration details. This endpoint supports filtering to refine results based on specific promotion attributes.

Use query parameters to filter promotions by:

  • Code – Retrieve a specific promotion by its code.
  • Promotion name – Search for promotions by name.
  • Activation status – Filter by whether a promotion is active or not.
  • Stackability – Identify promotions that can or cannot be combined with others.
  • Start and end dates – Retrieve promotions based on their validity periods.

Request

Query Parameters

    filter string

    This parameter accepts a filtering expression that uses specific operators and attributes.

    The following operators and attributes are available when filtering on this endpoint. See Supported Filtering Characters.

    AttributeTypeOperatorExample
    codestring, numbereqeq(code,summer2024)
    namestringlike,ilikeilike(name, 'Summer *')
    enabledbooleaneqeq(enabled, true)
    stackablebooleaneqeq(stackable, true)
    override_stackingbooleaneqeq(override_stacking, true)
    startdatelt, le, eq, gt, gegt(start, 2025-01-01T00:00:00.000Z)
    enddatelt, le, eq, gt, gelt(end, 2025-01-01T00:00:00.000Z)

    Please note: promotion codes are case-insensitive. You can search for codes using only numbers or codes containing both string and numbers.

Header Parameters

    Authorization Bearerrequired

    The Bearer token required to get access to the API.

Responses

OK

Schema
  • Array [
  • data object
    typestring

    Possible values: [rule_promotion]

    idstring
    store_idstring
    namestring
    descriptionstring
    priorityinteger
    enabledboolean
    automaticboolean
    stackableboolean
    override_stackingboolean
    rule_set object
    catalog_idsstring[]
    currenciesstring[]
    rules object
    strategystring
    operatorstring
    argsstring[]
    children object[]
  • Array [
  • strategystring
    operatorstring
    argsstring[]
  • ]
  • actions object[]
  • Array [
  • strategystring
    argsstring[]
    condition object
    strategystring
    children object[]
  • Array [
  • strategystring
    operatorstring
    argsstring[]
  • ]
  • limitations object
    max_discountinteger
    max_quantityinteger
    items object
    max_itemsinteger
    price_strategystring

    Possible values: [cheapest, expensive]

  • ]
  • startdate-time
    enddate-time
    meta object
    timestamps object
    created_atdate-time
    updated_atdate-time
  • ]

Authorization: http

name: BearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/rule-promotions");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— headerrequired
— query
ResponseClear

Click the Send API Request button above and see the response here!