- A location discount belongs to one restaurant.
- An organization discount is a template assigned to one or more locations.
Endpoints
Location discounts
Organization templates
Organization location mappings
discounts.write; reads require discounts.read. Organization API keys may act on child locations. A location-scoped key cannot act on organization routes.
Create a location discount
Use public product and bundle IDs from the location’s active Catalog API resource. Chataigne never accepts or returns private SKU or database IDs here.minimum_order.amount uses whole major currency units; fixed discount amounts support two decimals. PATCH uses merge semantics: omitted fields stay unchanged; explicit null clears nullable fields such as description, image_url, dates, and minimum_order.
The benefit type is immutable. To change from a percentage to a free product, create a new discount and deactivate the old one with PATCH { "enabled": false }.
Benefit types
required_items are eligibility conditions; they do not limit a percentage or fixed amount to those line items.
Organization mappings
Product IDs may differ between restaurant catalogs. Product-based organization discounts therefore carry reward and eligibility item mappings on each location assignment.PUT replaces both mapping arrays for that location. The response reports mapping_status:
ready: every required binding resolves against the active catalog;unresolved: at least one item is missing or belongs to another catalog;ambiguous: a stable reference matches more than one catalog item.
discount_target_currency_mismatch; per-location monetary overrides are not part of V1.
Deactivation and history
Public API V1 does not expose destructive discount deletion. Deactivate a location discount or organization template withPATCH { "enabled": false }; it remains available for history and can be re-enabled with PATCH { "enabled": true } unless an internal lifecycle operation has already retired it after completed-order use. Existing retired location mappings remain readable with status=retired.