This API allows to retrieve all existing Coupons and UCBs including their metadata like image URLs and marketing texts. It also provides special metadata for POS-Coupons to be used by the Avanta cash registers.
It doesn’t matter whether you send parameters as query parameter or as x-www-form-urlencoded in the body.
The response language is determined by the Accept-Language HTTP header or by a dedicated lang query parameter. If neither is given “de” is used. Coupons are available in German, French and Italian. There’s experimental support for English (excl. POSCoupons and UCBs). Note that English translations are generated by AI and may vary in quality and style and are thus not production ready!
Some background details on Coupons can be found here.
Images are available on the Migros CDN which is based on Rokka. Most image URLs are templates containing {stack} which you MUST replace with the Rokka stack you want to use. The stack original returns the image in its original dimensions. One more stack is 2017-custom/resize-height-{H}-width-{W} which allows to limit image dimensions to a maximum of W×H. The image format is determined by the filename extension (e.g. ‘.jpg’ or ‘.png’). The URLs have a suitable extension, but you are free to replace e.g. .png with .avif if needed.
Two audit routes serve human consumable HTML data for troubleshooting data problems. Generally no access is given to these routes.
HTTP status codes conform to RFC 7231 and are not documented on each route individually. The response body of all non-200 responses doesn’t contain information to be consumed (or even acted on) by machines. Machines should work on HTTP status codes and HTTP headers only.
In addition to the standard semantics the following codes are used:
-
404 Not found: If a Coupon or UCB is not charged (=issued, attributed)
to the given Cumulus number. -
409 Conflict: If the maximum number of Coupons or UCBs (currently 50)
has been activated already. -
410 Gone: If a Coupon or UCB has been redeemed already.
-
502 Bad Gateway: In case of unspecific ReTi errors (i.e. ReTi result
with id==99). -
503 Service Unavailable: If the circuit breaker guarding ReTi is open.
You may retry the request but it makes no sense to do it immediately
as the circuit breaker will still be open. Wait a few seconds at least.
Waiting longer helps even better. -
504 Gateway Timeout: If the request to ReTi timed out.
You may retry the request. Waiting a bit before doing it should
be obvious.
The breaking changes are documented here
- Server 1:https://api-qual.migros.ch
URL of upstream
Basic-Auth (http)
Kong basic-auth authentication
Kong-Api-Key (apiKey)
Kong key-auth authentication