Skip to content

Get the currently-active gift rules​

GET
/rest/v1/promotion/gift/active

Returns the gift rules a shopper can earn right now. "Active" is the full legacy definition: inside its date window (a NULL bound is open-ended), active = 1, stock remaining, AND at least one gift choice in stock — except rule type 13 (cheapest-free), whose pool is computed from the cart and is therefore exempt from the stock check. It ALSO requires at least one gift choice the caller may SEE (see the third divergence below); rule type 13 is exempt from that too. Every active rule type is returned; there is no type exclusion. Order is priority DESC, then date_start DESC. The response carries exactly twenty fields per rule and no others — everything the legacy slider renders — with the per-language caption fields, the gift-side fields and the requirement-side fields flattened onto each rule. internalName, active, remaining, priority, dateStart, dateEnd, the requirement POOL and the raw requirement option_type_id are withheld, and none of them is filterable or sortable here. THREE DIVERGENCES FROM THE LEGACY HOMEPAGE WORTH KNOWING. (1) The requirement fields come from the rule's LOWEST-ID requirement, where legacy collapses a join and renders an arbitrary one that can change between page loads. (2) pagination.total counts the rules passing the date/flag window before both post-filters, so a page may carry fewer items than per_page. (3) THE LARGEST: a guest sees strictly LESS of the catalogue here than the legacy homepage renders. Gift choices whose product is inactive or soft-deleted are omitted from choices; giftImage, giftName and giftSlug are withheld for such a product; and a rule left with no visible gift choice at all is dropped from the response entirely rather than returned as an offer it cannot name. Legacy applies no product-visibility predicate anywhere on these chains and still renders all of them. Vendor choices (optionType 2) are unaffected. A backend (admin-token) caller receives UNSCOPED choices, while giftImage, giftName, giftSlug and the dropping of a rule stay scoped. This removes ROWS and never KEYS: the twenty-field contract is unchanged.

Parameters​

Query Parameters

filter[product]

Restrict to rules whose requirement pool includes this product id. Omit for the flat list.

Type
integer
Format
"int64"
filter[isPromo]

Restrict to one bucket of the legacy promo/normal split. The homepage slider renders 0. Omit for both.

Type
integer
Valid values
01
page

Page number

Type
integer
limit

Pagination limit

Type
integer
with

With relations. choices is the only one available; the key is present either way. It is empty when not requested, and can also be empty when requested — every choice whose product is inactive or soft-deleted is omitted. A rule left with NO visible product choice is dropped from the response altogether, so on a returned rule the requested choices is empty only for rule type 13 (cheapest-free), whose pool comes from the cart. A backend (admin-token) caller gets unscoped choices, hidden-product rows included.

Type
string

Responses​

Successful operation

application/json
JSON
"string"

Playground​

Variables
Key
Value

Samples​

Powered by VitePress OpenAPI