Migrating from Legacy Coupon Server
Why migrateβ
LE 2025 replaces the legacy coupon/voucher fields with a single rule engine that supports more discount types, real-time limits and stackability, and gamification on top of the same engine. Moving your integration unlocks these without changing your overall POS-led architecture if you stay on Coupon Server mode.
What changes for your teamβ
- One rule engine instead of flat coupon fields β more promotion types (BOGO, tiered quantity, combo price, strikethrough, bundles) become available without new integration work per type.
- A campaign catalog (
GET /discounts) replaces single-voucher validation as the main read call. - Interpreting
rule_conditions/rule_application/rule_effects(JSON) replaces reading flat coupon fields β this is the main development effort. - Voucher lifecycle actions (select, deselect, freeze, unfreeze, print, rollback) stay available. For New Engine Coupon Server amount confirmation, prefer
POST /discounts/redeemoverPOST /vouchers/redeemβ see Vouchers redeem vs Discounts redeem. - Customer custom fields (
custom1βcustom11,custom1fβcustom8f) are replaced by theattributesobject β a data model change, not a promo engine change.
Choose your target modelβ
Before mapping endpoints, confirm the target integration model with the client:
| Model | Who calculates the final price | Guide |
|---|---|---|
| New Engine Promo Engine | Loyal Guru | New Engine Promo Engine |
| New Engine Coupon Server | POS / external system (same responsibility split as legacy) | New Engine Coupon Server |
This guide assumes New Engine Coupon Server, since it keeps the same responsibility split as the legacy flow β the POS keeps calculating the final price.
Endpoint migration tableβ
| Legacy endpoint | New Engine Coupon Server | What changes |
|---|---|---|
| (no equivalent β legacy has no campaign catalog) | GET /discounts (+ customer_id/customer_code, location_id/location_code) | New: full campaign catalog with rule JSON, not a single voucher lookup |
GET /vouchers/{code} + customer_id + location_id (validate) | GET /vouchers/{code} (same call) + GET /discounts for campaign context | Voucher validation call is unchanged; campaign/eligibility detail now comes from GET /discounts, not flat coupon fields |
GET /customers/{id}/vouchers/selected | GET /discounts?customer_id=&selected=true | Dedicated endpoint replaced by a filter on the catalog endpoint |
POST /vouchers/{code}/select / PUT /vouchers/select | Same | No change (shared voucher entity) |
POST /vouchers/{code}/deselect / PUT /vouchers/deselect | Same | No change |
POST /vouchers/{code}/freeze / POST /vouchers/{code}/unfreeze | Same | No change |
POST /vouchers/redeem | Prefer POST /discounts/redeem for New Engine Coupon Server amount confirmation; keep POST /vouchers/redeem only for Legacy Coupon Server voucher-lifecycle-only flows | See Vouchers redeem vs Discounts redeem. Do not call both for the same confirmation |
POST /vouchers/rollback | Same | No change |
POST /vouchers/print | Same | No change |
custom1βcustom11 / custom1fβcustom8f on Customer | attributes object | Data model change, not an endpoint change β see Custom fields β Attributes |
Interpreting GET /discountsβ
This is the main development effort in the migration. See Reading and interpreting GET endpoints and the field-by-field reference in Reading from GET. rule_effects β with 6 effect types and 3 distribution modes β is typically the most complex part to replicate locally.
Implementation checklistβ
- Confirm target model (Promo Engine vs Coupon Server) with the client.
- Replace single-voucher validation reads with
GET /discountscatalog reads, keepingGET /vouchers/{code}for final code validation. - Implement
rule_conditions/rule_application/rule_effectsparsing. - Confirm select, deselect, freeze, unfreeze, rollback, and print calls in the client's codebase do not need changes.
- For New Engine Coupon Server amount confirmation, switch usage confirmation to
POST /discounts/redeemand stop callingPOST /vouchers/redeemfor the same confirmation β see Vouchers redeem vs Discounts redeem. - Migrate any
customN/customNfreads or writes on Customer toattributes. - Re-test voucher print ordering and redemption/rollback error handling against the new catalog-based eligibility.
Troubleshootingβ
| Symptom | What to check |
|---|---|
A campaign that existed in legacy is missing from GET /discounts | Confirm it was recreated as a discount campaign in LE 2025 β legacy coupons are not auto-migrated. |
| POS discount amount differs after migration | Confirm rule_effects interpretation matches the effect type (percentage, direct_value, ratio, strikethrough, combo_price, formula) and its distribution. |
| Custom field values missing after migration | Confirm the company's attributes JSON Schema is configured and that the property name and case match exactly. |