---
title: "Export several receipts"
url: "https://developer-qual.migros.ch/apis/layout-api-1/versions/fcc71337-b27c-4bc7-8aea-a50107bf562d/operations/receiptExport"
---

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

# Export several receipts

`POST` `/migros/customers/receipts/v1/export/{cumulus}/{format}`

Operation ID: `receiptExport`

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.

## Path parameters

- `cumulus` (integer, required) - Cumulus Number
- `format` (string, required) - format to export

## 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.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Exported data

## 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/export/{cumulus}/{format}:
    post:
      description: >-
        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.
      operationId: receiptExport
      parameters:
        - $ref: "#/components/parameters/cumulus"
        - $ref: "#/components/parameters/fallbackLang"
        - description: format to export
          in: path
          name: format
          required: true
          schema:
            enum:
              - csv
              - detailed-csv
              - pdf
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TransactionIdsModel"
        description: >-
          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.
        required: true
      responses:
        "200":
          content:
            application/csv:
              schema:
                type: string
            application/pdf:
              schema:
                type: string
          description: Exported data
      summary: Export several receipts
      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
    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
  schemas:
    TransactionIdsModel:
      properties:
        transactionIds:
          items:
            title: trId
            type: string
          type: array
      required:
        - transactionIds
      type: object
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
```
