Coupons

Statistics about available/activated Coupons and UCBs.

This endpoint returns aggregate summary data of a users Coupons and UCBs.

Note that a single ‘Coupons’ can be attributed to a customer several times in which case the Quantity field is larger than 1. The dirac… fields in the response honour Quantity and count such Coupons multiple times while the coupons… field(s) count Coupon types ignoring their Quantity.

get
https://api.migros.ch/migros/customers/coupons/v3/users/{cumulus}/stats

Path Parameters

cumulusstringrequired

Cumulus number.

Match pattern:^\d{13}$

>= 13 characters<= 13 characters

Example:2099123456789

Response

application/json

Summary data.

Stats

Aggregate statistics about Coupons and UCBs of a user.

couponsActivatedintegerrequired

Number of activated Coupons (ignoring Quantity).

Example:3

diracActiveCountintegerrequired

Total number of activated Coupons (counting Quantity).

Example:4

diracAvailableCountintegerrequired

Number of non-redeem Coupons (ignoring Quantity)

Example:7

ucbActiveSumintegerrequired

Sum of all activated UCBs in CHF

Example:30

ucbAvailableSumintegerrequired

Sum of all non-redeemed UCBs in CHF.

Example:75

get/migros/customers/coupons/v3/users/{cumulus}/stats
 
application/json

List of all UCBs attributed to a customer

This endpoint returns the set of all UCBs (aka “Blaue Bons” aka “Cumulus Bons”) attributed to a certain customer, identified by the Cumulus number.

get
https://api.migros.ch/migros/customers/coupons/v3/users/{cumulus}/ucbs

Path Parameters

cumulusstringrequired

Cumulus number.

Match pattern:^\d{13}$

>= 13 characters<= 13 characters

Example:2099123456789

Response

application/json

Lists of UCBs attributed to the customer.

Personalized UCB information of a user based on ReTi.

balanceintegerrequired

Value of this UCB in CHF.

Allowed values:51020

Example:5

expirystring

Valid until (including) this date.

Example:2025-09-30+02:00

idstringrequired

The actual UCB-ID that identifies the individual UCB. This ID is the number/barcode printed on the UCB.

Example:778400003621541383

publishedstring

Valid from (including) this date.

Example:2023-07-18+02:00

redeemedstring

Date and time of redemption.

Example:2015-05-27T08:27:27+02:00

statusintegerrequired

1 = available, 2 = activated, 3 = redeemed.

Allowed values:123

ucbobject

Static data of an UCB (Blauer Bon/Coupon Bon).

Show Child Parameters
get/migros/customers/coupons/v3/users/{cumulus}/ucbs
 
application/json

Activate or deactivate an UCB

Only non-redeem UCBs can be activated or deactivated. It’s okay to activate an already active UCB as it is okay to deactivate an already inactive UCB.

Note that no more than 50 UCBss can be in state ‘activated’ for a single Cumulus number. Trying to activate more results in a 409 error.

Note: The parameters can be sent as query parameters in the URL or as application/x-www-form-urlencoded in the request body (or any combination, it just doesn’t matter.)

post
https://api.migros.ch/migros/customers/coupons/v3/users/{cumulus}/ucbs/{ucbid}:{state}

Path Parameters

cumulusstringrequired

Cumulus number.

Match pattern:^\d{13}$

>= 13 characters<= 13 characters

Example:2099123456789

ucbidstringrequired

ID (barcode) of a UCB. Its a string as it is often longer than what integers can represent (especially in toy languages).

Match pattern:^\d+$

statestringrequired

The action to perform.

Allowed values:activatedeactivate

Example:activate

Response

Successful activated/deactivated

post/migros/customers/coupons/v3/users/{cumulus}/ucbs/{ucbid}:{state}
 

Audit

List of all Coupons

An overview of all[^1] Coupons for human inspection and audit.

You must not parse and must not process this HTML page.

[^1] Upcomming, currently valid and recently expired coupons. Coupons expired 10 days ago are no longer displayed.

get
https://api.migros.ch/migros/customers/coupons/v3/audit/

Response

200 text/html

HTML page

get/migros/customers/coupons/v3/audit/
 
200 text/html