New Engine Coupon Server
Use this model when the external system must keep final price calculation, but Loyal Guru remains the source of truth for campaign eligibility, coupon/voucher validation, customer assignment, limits, and redemption state.
Responsibilitiesβ
The split here is the opposite of Promo Engine's, and it is what makes this model heavier to build: Loyal Guru still owns eligibility and redemption state, but the arithmetic moves to your side:
| System | Responsibility |
|---|---|
| Loyal Guru | Exposes active campaign rules through GET /discounts, validates coupon/voucher ownership and status, records redemption or rollback. |
| POS / e-commerce | Reads campaign fields, maps them to local pricing logic, calculates the final amount, and sends confirmed usage back to Loyal Guru. |
What this model coversβ
Coupon Server is a coupon and voucher integration. That is its scope at the till, and it is the main trade-off to weigh against Promo Engine.
What the POS calculates, and what it does not. Because your POS owns the calculation, it can only apply what it is able to compute: discounts driven by coupons and vouchers. Points, cashback, games and challenges are not calculated at the till in this model β the POS has no rules to evaluate them with.
That does not mean the customer loses them. Points still accrue when the confirmed cart is sent to POST /carts/realtime afterwards β Loyal Guru evaluates the loyalty mechanics on the persisted cart, so earning works normally in this model. The difference is when: the customer does not see those effects on the receipt at the moment of payment.
What the POS cannot do is let the customer spend those points. Redeeming points as a cashback discount changes the amount payable, so it has to happen inside the price calculation β which in this model your POS owns, and it has no access to the customer's balance or to the distribution rules. A project that needs points redeemed as cashback, or a cashback balance shown on the receipt, requires Promo Engine.
Campaigns come in three audiences, and in this model your POS has to handle them differently:
| Audience | API value | How the POS gets it |
|---|---|---|
| MASS | all_customers | Read from GET /discounts and applied to any cart that qualifies |
| CLUB | loyalty | Read from GET /discounts once the customer is identified as a member |
| TARGETED | targeted | Assigned to one customer as a voucher; read from the customer's voucher list or validated by code |
End-to-end flowβ
The diagram below places the two sides next to each other: what Loyal Guru exposes and records, and what the POS reads, calculates and confirms. Follow the arrows crossing the boundary β each one is an integration point you have to build:
The POS owns the promotional mechanics: it reads active campaign and voucher data, calculates the discount locally, prints or validates the voucher when needed, and confirms usage back to Loyal Guru. Loyal Guru remains the source of truth for Customer identity, campaign eligibility, voucher assignment, limits, and redemption state.
Two activation pathsβ
The endpoints are the same for every customer. What changes is how the voucher reaches the transaction β and in this model that changes which call the POS makes to obtain it. The two paths differ in when the customer activated the voucher and whether the checkout has to name the code, not in where the customer is shopping.
Digital pre-activation β the customer chose their vouchers before checkoutβ
The customer activated their offers in the app or the website before the transaction. The POS identifies the customer and asks Loyal Guru what is active for them in this store β no code is presented. This works the same at a till as in e-commerce.
GET /discounts?customer_id={id}&location_id={loc}&selected=true is the load-bearing call on this path, not an optional display step: it is how the POS learns which vouchers to attempt, and it returns the rule JSON the POS needs to calculate them. See Vouchers Pre-Activation for the parameters and the app-side flow that produces the selection.
Individual activation β one code at a time at the checkoutβ
Nothing was activated beforehand. The customer presents a code β printed on a receipt or a mailing, or shown on their screen β and the POS validates each one before applying it.
Here validation is mandatory, not a courtesy: the POS is about to apply a discount on the strength of a code, and Loyal Guru is the only system that knows whether that code belongs to this customer, is still valid, and has redemptions left.
Most retailers run both paths at once, and the POS decides per transaction which one applies: a code was presented, or it was not. The confirmation half β redeem, then persist the cart β is identical either way.
Supporting data syncβ
Before the POS can calculate promotions locally, Loyal Guru needs the data used by campaign rules and audience eligibility:
| Data area | Integration role |
|---|---|
| Customers | Keep Customer identity and profile fields aligned so vouchers and audiences can be resolved. Legacy integrations that still read/write custom1βcustom11 / custom1fβcustom8f should migrate to the attributes object β see Custom fields β Attributes. |
| Products | Keep product IDs, codes, and taxonomy fields aligned with the catalog used by POS pricing logic. |
| Locations | Keep store/location identifiers aligned with the stores where discounts can apply. |
| Cart events and lines | Send historical and ongoing cart data so Customer behavior, audiences, and usage reporting stay consistent. |
These sync flows can use files or APIs depending on project scope. Endpoint-level schemas belong in the API Reference.
Runtime endpointsβ
These are the calls a Coupon Server integration makes at runtime, from identifying the customer through to confirming what was applied:
| Endpoint | Use it for |
|---|---|
GET /customers/{value} / POST /customers/search | Resolve the Customer used to request available campaigns or validate vouchers. |
GET /discounts | The main read call on both activation paths. Campaign catalog, customer-specific campaigns, campaign rule fields, coupon metadata and targeted voucher details. Add customer_id + location_id + selected=true for digital pre-activation; use customer_id + location_id and locate the presented code in the response for individual activation. See Vouchers Pre-Activation. |
GET /discounts/{value} | Campaign detail; use search_by=campaign_history_id when the same targeted campaign was sent more than once. |
PUT /vouchers/select / POST /vouchers/{code}/select | Mark vouchers as selected for the next purchase. This is normally the customer's action in the app β see Vouchers Pre-Activation. Call it from the POS only when the till itself offers a selection step. |
PUT /vouchers/deselect / POST /vouchers/{code}/deselect | Undo a selection. |
POST /vouchers/{code}/freeze / POST /vouchers/{code}/unfreeze | Put an operational hold on a voucher. A frozen voucher is neither printed nor redeemable until unfrozen. |
POST /carts/realtime | Persist the confirmed cart and usage with apply_discounts: false. This is also where points and cashback accrue for the transaction. |
POST /discounts/redeem | Confirm campaign usage when the POS calculated the amount. Send the applied amount in cents. Preferred confirmation call for New Engine Coupon Server. |
POST /vouchers/redeem / POST /vouchers/rollback | Explicit voucher lifecycle mark-as-used or rollback. Prefer POST /discounts/redeem for New Engine campaign amount confirmation β see Vouchers redeem vs Discounts redeem. |
POST /vouchers/print | Get the batch of vouchers to print on the receipt, ordered by campaign priority, voucher priority, then soonest expiration. |
GET /discounts is paginated: follow next_token_starts_after with starting_after so a customer with many assignments is not silently truncated. When a voucher's product allocation points at an internal category, the POS receives the expanded product_ids by default; receiving the external category as well requires company configuration.
GET /customers/{id}/vouchers, GET /customers/{id}/vouchers/selected and GET /vouchers/{code} are deprecated on the current engine. Do not use them in a new integration.
Reading and interpreting GET endpointsβ
In Coupon Server mode the POS (or middleware) must read campaign and voucher data from Loyal Guru and interpret it before calculating the final price locally.
| Endpoint | What to interpret |
|---|---|
GET /discounts | Active campaigns, metadata, coupon/voucher info, and rule JSON (rule_conditions, rule_application, rule_effects) |
GET /discounts/{value} | Single campaign detail (use search_by=campaign_history_id when needed) |
GET /discounts with customer_id + location_id | Code ownership, status, redemptions and validity before apply β read from coupon_info and coupon_info.voucher_info |
| Customer lookup | Which Customer the campaigns/vouchers belong to |
The response of GET /discounts may include:
- Campaign metadata:
id,name,active,available_from,available_to,currency,category,priority. - Audience and code metadata:
select_customers,coupon_required,coupon_info. - Targeted voucher data:
coupon_info.voucher_infofor customer-specific assignments. - Rule JSON:
rule_conditions,rule_application,rule_effects. - POS helper arrays:
product_ids_rule_conditions,product_ids_rule_application,locations_ids,location_codes. The Company must havedefault_apply_discounts: false(coupon server). If that slug is missing ortrue, GET does not return these arrays. When the company is a coupon server, each campaign still decides whether to populate them (internal taxonomy vs direct IDs/codes). See POS helper fields.
Full field-by-field guide (nested under this Coupon Server section): Reading from GET β response shape, conditions, application, and effects.
Static coupons and vouchersβ
Both arrive in the same GET /discounts response, but they mean different things and carry different guarantees:
| Code type | How it behaves |
|---|---|
| Static coupon | Shared code configured on the campaign. It can be shown publicly or entered manually, subject to campaign limits and configuration. |
| Voucher | Customer-specific assignment with its own code, status, date window, redemptions, and customer ownership. |
Do not treat static coupons and vouchers as interchangeable. A voucher proves that a specific customer received a personalized campaign or benefit; a static coupon is the campaign-level code configuration.
Confirming usage after the POS calculates the priceβ
After the POS applies the discount locally, confirm usage in Loyal Guru:
- Prefer
POST /discounts/redeemfor New Engine Coupon Server so Loyal Guru records the applied amount for budget, limits, and discount history. - Do not also call
POST /vouchers/redeemfor the same confirmation βPOST /discounts/redeemmarks the related voucher as used when applicable. - For cart-linked reporting, send or create the cart first, then redeem with
cart_idorcart_code.
Full decision guide: Vouchers redeem vs Discounts redeem.
Implementation notesβ
- Cache
GET /discountsfor a short interval only; campaign availability, budget, limits, and targeted delivery history can change. - Always re-check customer-specific vouchers before final application if the checkout flow can last more than a few minutes.
- When POS helper arrays are empty, parse
rule_conditions,rule_application, andrule_effectsdirectly or use your local catalog mapping. - Send
apply_discounts: falsein cart confirmation when the POS has already calculated the final price. The company slugdefault_apply_discountsmust also befalsefor coupon-server mode (otherwise GET omits POS helper arrays and the engine may still try to calculate discounts). - Keep rollback behavior explicit for failed payments, order cancellations, and returns.
- For campaign amount confirmation on New Engine Coupon Server, use
POST /discounts/redeemrather than onlyPOST /vouchers/redeem. - Always send the store when reading selected vouchers. Voucher validity is location-scoped: the same activated voucher can be valid in one store and not in another.
- Send the cart even though you calculated the price yourself.
POST /carts/realtimewithapply_discounts: falseis what feeds audiences, tier calculation, reporting β and what accrues the customer's points and cashback for the transaction. - Call
POST /vouchers/printafter the cart is confirmed if the receipt should carry new vouchers. It marks them printed, so the next call returns a different batch.
Troubleshootingβ
| Symptom | What to check |
|---|---|
A campaign is missing from GET /discounts | active, date window, customer filter, campaign_audience, country/store filters, targeted voucher state, and pagination. |
| POS helper arrays are empty | Company default_apply_discounts must be false. If it is, this campaign may use direct IDs/external taxonomy that cannot be expanded β parse rule_*. |
| Voucher appears twice for the same campaign | The campaign may have been sent in multiple deliveries; use campaign_history_id to identify the intended delivery. |
| POS applies a discount but Loyal Guru rejects the code | Check voucher ownership, status, available redemptions, store scope, expiration, and whether the static coupon code is unique to the campaign. |
| Campaign budget / discount history missing after POS applied a discount | Confirm the integration calls POST /discounts/redeem with the applied amount in cents, not only POST /vouchers/redeem. |