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

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

# Purchases made

`GET` `/migros/customers/receipts/v1/purchases/{cumulus}`

Operation ID: `receiptAllPurchases`

Retrieve all purchases made in the given time period for a given Cumulus number. Only 'real' products are returned.

## Path parameters

- `cumulus` (integer, required) - Cumulus Number

## Query parameters

- `from` (string, date, optional) - start date If omited it defaults to "yesterday one year ago", i.e. one whole year of data is returned or analyzed.
- `to` (string, date, optional) - end date of list; if omited or empty the current date is used
- `containing` (integer, optional) - Option product ID selecting only those purchases that contain this product.

## Responses

- `200` - JSON with list of purchases.

## 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/purchases/{cumulus}:
    get:
      description: Retrieve all purchases made in the given time period for a given
        Cumulus number. Only 'real' products are returned.
      operationId: receiptAllPurchases
      parameters:
        - $ref: "#/components/parameters/cumulus"
        - $ref: "#/components/parameters/from"
        - $ref: "#/components/parameters/to"
        - description: Option product ID selecting only those purchases that contain this
            product.
          in: query
          name: containing
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PurchaseResponse"
          description: JSON with list of purchases.
      summary: Purchases made
      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
    from:
      description: >-
        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
      in: query
      name: from
      required: false
      schema:
        format: date
        type: string
    to:
      description: end date of list; if omited or empty the current date is used
      in: query
      name: to
      required: false
      schema:
        format: date
        type: string
  schemas:
    PurchaseResponse:
      items:
        properties:
          items:
            items:
              properties:
                code:
                  description: The "intcode" i.e. Product-ID of item.
                  example: "661417800000"
                  type: string
                descr:
                  description: Description as printed on the receipt
                  example: MC  Aceton
                  type: string
                price:
                  description: Price in CHF. This is the actual price paid for the whole position.
                    Its quantity * regularPrice - reduction. In this example a
                    single bottle of Aceton has a regular price of CHF 17. A
                    Aktion "12 statt 17 CHF" is in place. So 2 bottles cost 24
                    CHF.
                  example: 24
                  type: number
                qty:
                  description: Quantity. Whole number for piece goods. Can be a fraction for
                    articles sole by weight, length or area.
                  example: 2
                  type: number
                reduction:
                  description: Optional price reduction in CHF for the while position. Each bottle
                    is 5 CHF reduced, so total reduction for 2 bottles is 10
                    CHF.
                  example: 10
                  type: number
                unit:
                  description: Unit of qty. 0 piece, 1 kg, 3, meter, 4 m^2, 6 liter, 7 kWh
                  example: 3
                  type: number
                warranties:
                  description: IDs of the warranties for these items. If three TVs are bought,
                    three separate warranties will be emitted.
                  items:
                    description: Warranty ID
                    example: 20220113_154144_0065245_042_151_0
                    type: string
                  type: array
              required:
                - code
                - descr
                - price
                - qty
              type: object
            type: array
          points:
            description: Cumulus points obtained for this purchase.
            example: 48
            type: number
          storeID:
            description: ID of the store. Filial-ID
            example: "0036713"
            type: string
          storeName:
            description: Name of the store
            example: D + G Wynecenter
            type: string
          timestamp:
            description: Human readable time stamp of purchase in local time zone
            example: 30.03.2013 10:15:48
            type: string
          totalCHF:
            description: Total amount of the receipt in CHF (might be different from the sum
              of items.)
            example: 24
            type: number
          trxID:
            description: Transaction ID of receipt
            example: 20220124_174650_0045160_046_203
            type: string
        type: object
      type: array
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
```
