Skip to main content

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/redeem over POST /vouchers/redeem β€” see Vouchers redeem vs Discounts redeem.
  • Customer custom fields (custom1–custom11, custom1f–custom8f) are replaced by the attributes object β€” a data model change, not a promo engine change.

Choose your target model​

Before mapping endpoints, confirm the target integration model with the client:

ModelWho calculates the final priceGuide
New Engine Promo EngineLoyal GuruNew Engine Promo Engine
New Engine Coupon ServerPOS / 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 endpointNew Engine Coupon ServerWhat 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 contextVoucher validation call is unchanged; campaign/eligibility detail now comes from GET /discounts, not flat coupon fields
GET /customers/{id}/vouchers/selectedGET /discounts?customer_id=&selected=trueDedicated endpoint replaced by a filter on the catalog endpoint
POST /vouchers/{code}/select / PUT /vouchers/selectSameNo change (shared voucher entity)
POST /vouchers/{code}/deselect / PUT /vouchers/deselectSameNo change
POST /vouchers/{code}/freeze / POST /vouchers/{code}/unfreezeSameNo change
POST /vouchers/redeemPrefer POST /discounts/redeem for New Engine Coupon Server amount confirmation; keep POST /vouchers/redeem only for Legacy Coupon Server voucher-lifecycle-only flowsSee Vouchers redeem vs Discounts redeem. Do not call both for the same confirmation
POST /vouchers/rollbackSameNo change
POST /vouchers/printSameNo change
custom1–custom11 / custom1f–custom8f on Customerattributes objectData 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 /discounts catalog reads, keeping GET /vouchers/{code} for final code validation.
  • Implement rule_conditions / rule_application / rule_effects parsing.
  • 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/redeem and stop calling POST /vouchers/redeem for the same confirmation β€” see Vouchers redeem vs Discounts redeem.
  • Migrate any customN / customNf reads or writes on Customer to attributes.
  • Re-test voucher print ordering and redemption/rollback error handling against the new catalog-based eligibility.

Troubleshooting​

SymptomWhat to check
A campaign that existed in legacy is missing from GET /discountsConfirm it was recreated as a discount campaign in LE 2025 β€” legacy coupons are not auto-migrated.
POS discount amount differs after migrationConfirm rule_effects interpretation matches the effect type (percentage, direct_value, ratio, strikethrough, combo_price, formula) and its distribution.
Custom field values missing after migrationConfirm the company's attributes JSON Schema is configured and that the property name and case match exactly.