---
title: "Statistics about available/activated Coupons and UCBs."
url: "https://developer-qual.migros.ch/apis/coupons-3/versions/b27797a2-ad08-41e0-8429-0f1aeab8826f/operations/stats"
---

> Full API specification: https://developer-qual.migros.ch/apis/coupons-3/versions/b27797a2-ad08-41e0-8429-0f1aeab8826f.md

# Statistics about available/activated Coupons and UCBs.

`GET` `/migros/customers/coupons/v3/users/{cumulus}/stats`

Operation ID: `stats`

This endpoint returns aggregate summary data of a users Coupons and UCBs. Note that a single 'Coupons' can be attributed to a customer several times in which case the Quantity field is larger than 1. The dirac... fields in the response honour Quantity and count such Coupons multiple times while the coupons... field(s) count Coupon types ignoring their Quantity.

## Path parameters

- `cumulus` (string, required) - Cumulus number.

## Responses

- `200` - Summary data.
- `default` - Standard HTTP semantics (see above), no machine-interpretable body.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Coupons
  version: 3.4.0
servers:
  - description: URL of upstream
    url: https://api-qual.migros.ch
paths:
  /migros/customers/coupons/v3/users/{cumulus}/stats:
    get:
      description: >-
        This endpoint returns aggregate summary data of a users Coupons and
        UCBs.


        Note that a single 'Coupons' can be attributed to a customer several
        times in which case the Quantity field is larger than 1. The dirac...
        fields in the response honour Quantity and count such Coupons multiple
        times while the coupons... field(s) count Coupon types ignoring their
        Quantity.
      operationId: stats
      parameters:
        - $ref: "#/components/parameters/cumulus"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Stats"
          description: Summary data.
        default:
          description: Standard HTTP semantics (see above), no machine-interpretable body.
      summary: Statistics about available/activated Coupons and UCBs.
      tags:
        - Customer-Data
security:
  - Kong-Api-Key: []
  - Basic-Auth: []
components:
  parameters:
    cumulus:
      description: Cumulus number.
      example: "2099123456789"
      in: path
      name: cumulus
      required: true
      schema:
        maxLength: 13
        minLength: 13
        pattern: ^\d{13}$
        type: string
  schemas:
    Stats:
      description: Aggregate statistics about Coupons and UCBs of a user.
      properties:
        couponsActivated:
          description: Number of activated Coupons (ignoring Quantity).
          example: 3
          type: integer
        diracActiveCount:
          description: Total number of activated Coupons (counting Quantity).
          example: 4
          type: integer
        diracAvailableCount:
          description: Number of non-redeem Coupons (ignoring Quantity)
          example: 7
          type: integer
        ucbActiveSum:
          description: Sum of all activated UCBs in CHF
          example: 30
          type: integer
        ucbAvailableSum:
          description: Sum of all non-redeemed UCBs in CHF.
          example: 75
          type: integer
      required:
        - diracActiveCount
        - diracAvailableCount
        - couponsActivated
        - ucbActiveSum
        - ucbAvailableSum
      type: object
  securitySchemes:
    Kong-Api-Key:
      description: Kong key-auth authentication
      in: header
      name: X-Api-Key
      type: apiKey
    Basic-Auth:
      description: Kong basic-auth authentication
      scheme: basic
      type: http
```
