Public API
Modifiers
Plate customization — sizes, extras, removals — validated and priced on the server.
Model
Each product may include modifierGroups. Groups define min/max selections and optional allowDuplicates. Options have priceCentimes (0 = free) and optional isDefault.
| Scenario | How |
|---|---|
| Required choice (size) | minSelections = maxSelections = 1 |
| Required multi (2 sides) | min = max = 2 |
| Optional free removal | min = 0, option price = 0 |
| Paid extra | option priceCentimes > 0 |
| Double cheese | allowDuplicates + option quantity |
What to send
On POST /orders, send only groupId, optionId, and optional quantity. Never send option prices — the server looks them up.
json
"selectedOptions": [
{ "groupId": "taille", "optionId": "double", "quantity": 1 },
{ "groupId": "extras", "optionId": "fromage", "quantity": 2 }
]