---
title: "Formated Receipt"
url: "https://developer-qual.migros.ch/apis/layout-api-1/versions/fcc71337-b27c-4bc7-8aea-a50107bf562d/operations/receiptDetail"
---

> Full API specification: https://developer-qual.migros.ch/apis/layout-api-1/versions/fcc71337-b27c-4bc7-8aea-a50107bf562d.md

# Formated Receipt

`GET` `/migros/customers/receipts/v1/detail/{cumulus}/{transaction}`

Operation ID: `receiptDetail`

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.

## Path parameters

- `cumulus` (integer, required) - Cumulus Number
- `transaction` (string, required) - 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.

## Query parameters

- `fallbackLang` (string, optional) - 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.
- `format` (string, optional) - 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.

## Responses

- `200` - Receipt as HTML, PDF or JSON

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Layout-API
  version: 1.3.0
servers:
  - description: URL of upstream
    url: https://api-qual.migros.ch
paths:
  /migros/customers/receipts/v1/detail/{cumulus}/{transaction}:
    get:
      description: >-
        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.
      operationId: receiptDetail
      parameters:
        - $ref: "#/components/parameters/cumulus"
        - $ref: "#/components/parameters/transaction"
        - $ref: "#/components/parameters/fallbackLang"
        - description: |-
            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.
          in: query
          name: format
          schema:
            default: html
            enum:
              - html
              - pdf
            type: string
      responses:
        "200":
          content:
            application/pdf:
              schema:
                type: string
            text/html:
              schema:
                type: string
          description: Receipt as HTML, PDF or JSON
      summary: Formated Receipt
      tags:
        - Receipt
security:
  - Kong-Api-Key: []
components:
  parameters:
    cumulus:
      description: Cumulus Number
      example: 2099123456789
      in: path
      name: cumulus
      required: true
      schema:
        maximum: 2099999999999
        minimum: 2098000000000
        type: integer
    transaction:
      description: >-
        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
      in: path
      name: transaction
      required: true
      schema:
        type: string
    fallbackLang:
      description: >-
        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.
      in: query
      name: fallbackLang
      schema:
        default: de
        enum:
          - de
          - fr
          - it
        type: string
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
```
