Layout-API

Summary data of a Cumulus Kontoauszug

Provide summary data of a certain account statement (Cumulus Kontoauszug).

get
https://api.migros.ch/migros/customers/account-statements/v1/summary/{cumulus}/{period}

Path Parameters

cumulusintegerrequired

Cumulus Number

>= 2098000000000<= 2099999999999

Example:2099123456789

periodintegerrequired

Collection period/Sammlungsperiode (eg. 20246 for 01.08.2024 to 30.09.2024)

Example:20246

Response

200 application/json

JSON with selected summary data

SummaryResponse

balancePointsnumber

Example:138

payoutCumulusBonsCHFnumber

Example:10

totalAmountCHFnumber

Example:349.26

totalPointsnumber

Example:963

get/migros/customers/account-statements/v1/summary/{cumulus}/{period}
 
200 application/json

Receipt

Number of receipts

Computes the number of receipts since a given date

get
https://api.migros.ch/migros/customers/receipts/v1/count/{cumulus}

Query Parameters

fromstring(date)

start date
If omited it defaults to “yesterday one year ago”, i.e. one whole year of data is returned or analyzed.

Example:2021-03-17

Path Parameters

cumulusintegerrequired

Cumulus Number

>= 2098000000000<= 2099999999999

Example:2099123456789

Response

200 application/json

The number of receipts

integer
get/migros/customers/receipts/v1/count/{cumulus}
 
200 application/json

Formated Receipt

Render a receipt (Kassenbon) as HTML, PDF or JSON. All information is formated as on the real physical receipt (as close as possible).

You must not call this endpoint with a transactionId that has no detail data, i.e. if the list-endpoint returns hasDetail = 0.

get
https://api.migros.ch/migros/customers/receipts/v1/detail/{cumulus}/{transaction}

Query Parameters

fallbackLangstring

Each receipt or warranty is rendered in the language of the store it was issued in. But if we do not know the store language (e.g. if it was an Online-Store) the given fallbackLang is used.

Note that this parameter is ignored if the language is know and if not ignored it changes only static texts, not e.g. product names.

Allowed values:defrit

Default:de

formatstring

Type of generated output HTML, PDF
Note that the Accept HTTP header of the request is ignored and
the format must be selected via this query parameter.

Allowed values:htmlpdf

Default:html

Path Parameters

cumulusintegerrequired

Cumulus Number

>= 2098000000000<= 2099999999999

Example:2099123456789

transactionstringrequired

Transaction ID of the receipt: Either as returned from a call to one of the receipt/warranty list routes or of the form trxDate_trxTime_storeID_workstationNumber_sequenceNumber. If you have to use the second form: Consult with a human.

If the list endpoint declares hasDetail = 0 then this transaction has no attached detail data. Trying to retrieve detail data for a transaction that has no detail data results in an error (400 or 404) so don’t even try: It’ll never work.

Example:2024-12-31

Response

200

Receipt as HTML, PDF or JSON

string
get/migros/customers/receipts/v1/detail/{cumulus}/{transaction}
 
200

Export several receipts

Export several receipts as CSV, detailed CSV or PDF.
The simple CSV export contains one row per receipt while the detailed CSV contains one row per product bought and additional columns.

post
https://api.migros.ch/migros/customers/receipts/v1/export/{cumulus}/{format}

Query Parameters

fallbackLangstring

Each receipt or warranty is rendered in the language of the store it was issued in. But if we do not know the store language (e.g. if it was an Online-Store) the given fallbackLang is used.

Note that this parameter is ignored if the language is know and if not ignored it changes only static texts, not e.g. product names.

Allowed values:defrit

Default:de

Path Parameters

cumulusintegerrequired

Cumulus Number

>= 2098000000000<= 2099999999999

Example:2099123456789

formatstringrequired

format to export

Allowed values:csvdetailed-csvpdf

Body

application/json

JSON object with an array of transaction IDs which shall be exported.

The receipts are exported in the order given by the transaction IDs. For CSV this doesn’t matter as you can sort the CSV afterwards anyway but for the PDF export you might want to sort the transaction IDs to have a cronological export.

TransactionIdsModel

transactionIdsarray[string]required

Response

200

Exported data

string
post/migros/customers/receipts/v1/export/{cumulus}/{format}

Body

{ "transactionIds": [] }
 
200