Layout-API

Receipt

Number of receipts

Computes the number of receipts since a given date

get
https://api-qual.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-qual.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-qual.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

List receipts

Lists receipts and received Cumulus points for a specific Cumulus number between two dates. The returned data contains only summary data of the receipt and omits articles, payments and other variable size details.
If a record has hasDetail == 1 this record represents a real receipt and the transactionId can be used to retrieve the rendered receipts via the …/v1/details/… endpoint.
If a record has hasDetail == 0 this record represents only the credit entry of Cumulus-Points, typically from a Migros-Partner or Mitarbeiterpunkte. In this case you cannot access the receipts details as there are no details.

get
https://api-qual.migros.ch/migros/customers/receipts/v1/list/{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

tostring(date)

end date of list; if omited or empty the current date is used

sortstring

Sort list by date of purchase or total CHF.

Allowed values:datetotal

Default:date

Example:total

Path Parameters

cumulusintegerrequired

Cumulus Number

>= 2098000000000<= 2099999999999

Example:2099123456789

Response

200 application/json

list of transactions

ReceiptListResponse

cumulusPunktenumberrequired

Rewarded Cumulus points.

Example:319.7

hasDetailnumberrequired

0: This is a syntetic pseudo-transaction that just list Partner- or Mitarbeiter-Punkte. Trying to retrieve details will fail always in this case.

1: Actual receipt available via detail/{cumulus}/{transactionId}.

Example:1

storeidstringrequired

Filial-ID

Example:0090390

storenamestringrequired

Filialname

Example:M Wittenbach

totalnumberrequired

Total purchase value in CHF.

Example:159.85

transactionIdstringrequired

ID to retrieve actual receipt if hasDetail==1 If hasDetail = 0 this ID is just a dummy and cannot be used to retrieve the (non-existing) details.

Note: if hasDetail = 0 the transactionId might be empty (i.e. “”).

Example:20220611_092739_0090390_003_9

trxDatestringrequired

Date of purchase in the form YYYYMMDD.

Example:20220611

trxTimestringrequired

Time of purchase (local time of store) in the form hhmmss.

Example:092739

versionstringrequired

Kept for backwards compatibility. You are not supposed to use or interpret this field.

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