Skip to main content

Streaming API Endpoints

This endpoint catalog is based on the current Streaming API documentation snapshot and normalized to public terminology. Product docs use cart as the canonical transaction name.

Customers​

MethodEndpointDescription
POST/customersCreate or enroll a Customer.
GET/customersList Customers by IDs or phones.
POST/customers/searchSearch Customers by any field.
GET/customers/{value}Get a Customer.
PATCH/customers/{value}Update a Customer.
DELETE/customers/{value}Delete or anonymize a Customer.
GET/customers/{id}/attributesRetrieve calculated attributes for a Customer.
GET/customers/{id}/tiersRetrieve loyalty tiers for a Customer.
GET/customers/{id}/audience_validationCheck if a Customer belongs to a specific Audience.
GET/customers/{id}/audiencesRetrieve all Audiences for a Customer.
POST/associationsCreate a Customer association.
PATCH/associationsUpdate a Customer association.
DELETE/associationsDelete a Customer association.
GET/customers/{id}/associatesGet associated Customers.
POST/customers/{id}/cardsCreate a new card associated to a Customer.
POST/customers/transferMerge one Customer into another.
POST/customers/{associate_id}/unmergeUnmerge one Customer from another.
POST/customers/transfer-newMerge by creating a new Customer with the data of the other Customer.

Customer Events​

Carts​

MethodEndpointDescription
POST/carts/realtimeCreate a new cart in real time.
POST/carts/simulateSimulate cart creation in real time.
GET/carts/{id}Get a cart.
GET/cartsGet a list of carts.
POST/carts/cancellationCancel a full cart by creating a new cart with negative amounts.

Custom Events​

MethodEndpointDescription
POST/custom_eventsCreate a new Custom Event.
GET/custom_eventsGet a list of Custom Events.
GET/custom_events/{id}Get a Custom Event.

Triggers​

MethodEndpointDescription
POST/triggerProcess a trigger for a specific Customer.

Loyalty and Gamification Campaigns​

Discounts​

MethodEndpointDescription
POST/discountsCreate a new discount campaign.
GET/discountsGet available discount campaigns.
PATCH/discounts/{value}Update a discount campaign.
GET/discounts/{value}Get a discount campaign by ID.
POST/discounts/redeemRedeem a discount.
GET/discounts/transactionsShow a Customer's redeemed-discount history.
POST/discounts/triggerTrigger a coupon with a discount for a Customer.

Games​

MethodEndpointDescription
GET/gamesGet available game campaigns.
GET/games/{id}Get a game campaign by ID.
POST/games/{id}/playPlay a game.

Instant Win​

MethodEndpointDescription
GET/instant_winsGet the list of Instant Win campaigns, optionally for a Customer.
GET/instant_wins/{id}Get one Instant Win campaign.

Instant Win is evaluated automatically when the configured event is received (POST /carts/realtime, POST /trigger, or POST /custom_events). No call is needed to play: use these endpoints to show the available Instant Win campaigns in the app, and read the result of each draw from the event response (see How to know if the customer won an Instant Win).

Building the request​

ParameterEndpointDescription
id (path)DetailIdentifier of the Instant Win, interpreted according to search_by.
search_byDetailWhat id refers to: loyalty_rule_id (default), loyalty_rule_history_id, campaign_history_id, or static_code.
customer_id / customer_codeList, detailIdentifies the Customer. Adds remaining_participations to each Instant Win and includes the Customer's targeted Instant Win campaigns.
campaign_audienceListFilters by audience: loyalty or targeted.
location_id / location_code / countriesList, detailFilters by the store (location_id / location_code) or the countries where the Instant Win applies.
tier_idListFilters the Instant Win campaigns available to a tier.
per_page / starting_afterListPagination: page size, and the next_token_starts_after value returned by the previous page.

Response fields​

FieldDescription
idInstant Win ID (loyalty rule ID). It is the rule_id of the instant_win effect in event responses.
name / descriptionName and description of the Instant Win campaign
activeWhether the Instant Win is active
available_from / available_toAvailability dates
recurrence_type / recurrence_daysRecurrence (e.g., weekly) and the days of the week when the Instant Win is available
select_customersAudience: loyalty (all loyalty members) or targeted
loyalty_rule_history_idTargeted only: the Targeted Delivery assignment of the Instant Win to the Customer
once / once_limitPer-customer participation limit: period and maximum number of participations
remaining_participationsOnly when customer_id / customer_code is sent: participations the Customer has left
instant_win.instant_win_prizes[]Prizes of the Instant Win (see below)
next_token_starts_afterList only: token to request the next page as starting_after

Each item of instant_win.instant_win_prizes[]:

FieldDescription
id / namePrize ID and name
outcome.promotion_typePrize type: points (Points & Wallet), reward, or game (game participation). Empty for No Prize.
outcome.promotion_idID of the prize's promotion: the points campaign, the reward, or the game rule
weightProbability of the prize as a fraction of 1 (e.g., 0.25 = 25%). The weights of all prizes add up to 1.
stockRemaining stock of the prize; -1 means unlimited
stock_management_strategyBehavior when the prize runs out of stock (e.g., remove_prize: the prize is no longer awarded and its probability goes to No Prize)

How to know if the customer won an Instant Win​

This section is for integrators (POS, WL App, external apps) that need to show the Instant Win result to the Customer after sending a cart, trigger, or custom event.

One effect per evaluated Instant Win. Every Instant Win whose victory conditions are met β€” and whose targeting and limits allow the Customer to take part β€” returns one effect with type: "instant_win" in the effects array. The effect is returned both when the Customer wins and when the draw returns No Prize.

FieldDescription
typeAlways instant_win
rule_id / rule_nameID and name of the Instant Win campaign
select_customersAudience of the Instant Win: loyalty (all loyalty members) or targeted
campaign_history_idTargeted only: the Targeted Delivery send that assigned the Instant Win
coupon_infoTargeted only: the Customer's Targeted Delivery Voucher (voucher_id, voucher_code, coupon_id, coupon_name, static_code)
prize_nameOnly when the Customer wins: name of the prize won
prize_descriptionOnly when the Customer wins: description of the prize won
prize_rule_idOnly when the Customer wins: ID of the prize's promotion β€” the points campaign, the reward, or the game rule
winned_prize_indexInternal identifier of the selected prize, kept for backwards compatibility. Do not use it alone to know whether the Customer won
effect_type, distribution_type, valueEmpty / 0: an Instant Win does not change cart line values

The prize fields (prize_name, prize_description, prize_rule_id) are returned for the three prize types: Points & Wallet, Reward, and Game participation.

How to interpret the response:

ResponseMeaning
instant_win effect with prize_name / prize_rule_idThe Customer won that prize. It is delivered automatically.
instant_win effect without prize dataThe Customer took part but did not win: the draw returned No Prize, or the drawn prize had no stock left and its end-of-stock strategy is "Remove prize, leave probabilities unchanged".
No instant_win effect for that campaignThe Customer did not take part: victory conditions not met, outside the availability dates or recurrence, limits reached, or β€” for a Targeted Instant Win β€” the Voucher was not sent in coupons_desired (["all"] or the Voucher code).

No victory or defeat messages. Unlike Games, Instant Win has no victory or defeat messages. Any text shown to the Customer ("You won…" / "Better luck next time") is up to the app, built from the prize data in the effect.

Prize delivery. The prize is delivered automatically and asynchronously. The response tells the result of the draw; the prize (points in the wallet, the Reward, or the game participation) appears in the Customer's profile shortly after.

Examples

Won a game participation (Loyalty):

{
"rule_id": 323,
"line": 1,
"rule_name": "Gasta mΓ‘s de 3€",
"type": "instant_win",
"effect_type": "",
"distribution_type": "",
"value": 0,
"select_customers": "loyalty",
"winned_prize_index": 14,
"prize_name": "Ruleta navidad",
"prize_description": "Game de premio para Instant Win",
"prize_rule_id": 319
}

No Prize (Loyalty) β€” the effect has no prize data:

{
"rule_id": 324,
"line": 1,
"rule_name": "gasta mΓ‘s de 2€ menos probabilidad",
"type": "instant_win",
"effect_type": "",
"distribution_type": "",
"value": 0,
"select_customers": "loyalty",
"winned_prize_index": 16
}

Won (Targeted) β€” includes the Targeted Delivery send and Voucher:

{
"rule_id": 329,
"campaign_history_id": 173,
"line": 1,
"rule_name": "1 - IW targeted",
"type": "instant_win",
"effect_type": "",
"distribution_type": "",
"value": 0,
"select_customers": "targeted",
"coupon_info": {
"voucher_id": 4546215,
"voucher_code": "4546215",
"coupon_id": 8643904,
"coupon_name": "1 - IW targeted",
"static_code": ""
},
"winned_prize_index": 21,
"prize_name": "game prize",
"prize_description": "2 - Game IW prize",
"prize_rule_id": 328
}

Points & Wallet​

MethodEndpointDescription
POST/pointsCreate a new points campaign.
GET/pointsGet available points/wallet campaigns.
PATCH/points/{value}Update a points/wallet campaign.
GET/points/{value}Get a points campaign by ID.
GET/points/transactionsGet points transactions for a Customer.
GET/customers/{value}/pointsRetrieve total points/wallet balance.
GET/customers/{value}/points_expiringRetrieve points about to expire.
POST/points/redeemRedeem points from balance.
POST/points/redeem_cartRedeem points from balance for a specific cart.
POST/points/transferTransfer points from one Customer to another.
GET/cashbacksGet cashback conversion by location.
GET/cashback_thresholdsRetrieve cashback thresholds.

Rewards​

MethodEndpointDescription
GET/rewardsGet a list of Rewards.
GET/rewards/{id}Get a Reward.
POST/rewards/{id}/redeemRedeem a Reward.
GET/rewards/transactionsGet reward transactions.
POST/rewards/transactions/{id}/rollbackRevert a reward redemption.

Challenges​

MethodEndpointDescription
GET/challengesGet a list of Challenges.
GET/challenges/{id}Get a Challenge.
GET/customers/{value}/challengesGet challenges for a Customer.
GET/customers/{value}/challenges/{id}Get one Challenge for a Customer.
POST/challenges/{id}/enrollEnroll in a Challenge.

Campaign Coupons​

MethodEndpointDescription
POST/couponsCreate a new Coupon.
PATCH/coupons/{id}Update a Coupon.
DELETE/coupons/{id}Delete a Coupon.

Campaign Vouchers​

MethodEndpointDescription
GET/vouchersGet a list of Vouchers.
GET/customers/{id}/vouchers/selectedGet selected Vouchers for a Customer.
GET/vouchers/{code}Get or validate a Voucher.
POST/vouchers/redeemRedeem a list of Vouchers.
POST/vouchers/rollbackRoll back a list of Vouchers.
POST/vouchers/printPrint a list of Vouchers.
PUT/vouchers/printPrint a specified list of Vouchers.
POST/vouchers/{code}/selectSelect a Voucher.
POST/vouchers/{code}/deselectDeselect a Voucher.
PUT/vouchers/selectSelect a list of Vouchers.
PUT/vouchers/deselectDeselect a list of Vouchers.
POST/vouchers/{code}/freezeFreeze a Voucher.
POST/vouchers/{code}/unfreezeUnfreeze a Voucher.
GET/vouchers/excluded_productsGet excluded products and product categories.

Promotions Calculation​

MethodEndpointDescription
POST/carts/simulateSimulate cart creation in real time.
POST/carts/realtimeCreate a cart in real time.
POST/custom_eventsCreate a Custom Event.
POST/triggerProcess a trigger for a Customer.

Company Data​

Products​

MethodEndpointDescription
POST/productsCreate a new Product.
GET/products/{id}Get a Product.
PATCH/products/{id}Update a Product.
DELETE/products/{id}Delete a Product.

Product Taxonomies​

MethodEndpointDescription
POST/taxonomiesCreate a product taxonomy.
PATCH/taxonomies/{slug}Update a product taxonomy.
DELETE/taxonomies/{slug}Delete a product taxonomy.

Product Features​

MethodEndpointDescription
POST/taxonomies/{taxonomy_slug}/featuresCreate a product feature.
PATCH/taxonomies/{taxonomy_slug}/features/{id}Update a product feature.
DELETE/taxonomies/{taxonomy_slug}/features/{id}Delete a product feature.

Locations​

MethodEndpointDescription
POST/locationsCreate a new Location.
GET/locations/{value}Get a Location.
PATCH/locations/{value}Update a Location.
DELETE/locations/{value}Delete a Location.

Location Taxonomies​

MethodEndpointDescription
POST/locations/taxonomiesCreate a Location Taxonomy.
PATCH/locations/taxonomies/{slug}Update a Location Taxonomy.
DELETE/locations/taxonomies/{slug}Delete a Location Taxonomy.

Location Features​

MethodEndpointDescription
POST/locations/taxonomies/{taxonomy_slug}/featuresCreate a Location Feature.
PATCH/locations/taxonomies/{taxonomy_slug}/features/{id}Update a Location Feature.
DELETE/locations/taxonomies/{taxonomy_slug}/features/{id}Delete a Location Feature.

Promotions​

MethodEndpointDescription
POST/promotionsCreate a legacy Promotion.
PATCH/promotions/{id}Update a legacy Promotion.
DELETE/promotions/{id}Delete a legacy Promotion.

Utilities​

MethodEndpointDescription
GET/checkCheck API availability.
POST/messages/printPrint a list of messages.