---
title: "Redeem (Einlösen) a Coupon"
url: "https://developer-qual.migros.ch/apis/coupons-3/versions/b27797a2-ad08-41e0-8429-0f1aeab8826f/operations/redeemCoupon"
---

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

# Redeem (Einlösen) a Coupon

`POST` `/migros/customers/coupons/v3/users/{cumulus}/coupons/{gtin}:redeem`

Operation ID: `redeemCoupon`

Redeem a Coupon i.e. use it in a purchase. **Note**: The parameters can be sent as query parameters in the URL or as application/x-www-form-urlencoded in the request body (or any combination, it just doesn't matter.)

## Path parameters

- `cumulus` (string, required) - Cumulus number.
- `gtin` (string, required) - GTIN (EAN) of Coupon. Its a string as GTINs often are longer than what integers can represent.

## Query parameters

- `costcenter` (integer, optional) - The Migros internal costcenter number (Kostenstelle) to be billed. This is necessary especially for charge and reddeem.
- `timestamp` (string, optional) - You probably should _not_ send this value at all unless this is some kind of offline request for some internal transaction that happened in the past. It's whole purpose is for logging and correlating different transactions but this is better done via transaction_id. Format is Y-m-d\TH:i:s; Default is the time this call arrives at Reti.
- `terminal_id` (integer, optional) - Only 'Kassen' must use this field and send the Kassen-Nr/Terminal. All other clients **must** leave this fields blank.
- `transaction_id` (string, optional) - Transaktions-Nummer; gruppiert z.B. mehrere ReTi-Calls für denselben Kunden.
- `unique_request_id` (string, required) - Die Unique Request-Id muss innerhalb einer konfigurierten Zeitspanne (aktuell 300s) einmalig für das aktuelle Ereignis sein (z.B. Kauftransaktion X für Kunde Y und Coupon Z). Anhand dieser ID beurteilt ReTi, ob ein Charge bereits erfolgt ist (Offline-Buchungen, Mehrfach-Aufrufe usw.).
- `channel` (integer, required) - Channel of the coupon; 1 = paper, 2 = digital, 3 = both (e.g. Bonus-Coupon). Usually when making a charge through the M-API you'll want to use 2.
- `check_code` (integer, optional) - Coupon type; 1 = transferable, 2 = personal/not transferable, 3 = Earlybird. Bonus coupons are personal. Falls der Checkcode fehlt, wird bei Bonus-Coupons (8888*) check_code==2 angenommen; bei allen anderen werden die vorhandenen Stammdaten berücksichtigt.
- `quantity` (integer, optional) - Quantity of coupons to assign. By default 1. More than one is not really a use-case.

## Responses

- `204` - Charge successful
- `default` - Standard HTTP semantics, 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}/coupons/{gtin}:redeem:
    post:
      description: >-
        Redeem a Coupon i.e. use it in a purchase.


        **Note**: The parameters can be sent as query parameters in the URL or
        as application/x-www-form-urlencoded in the request body (or any
        combination, it just doesn't matter.)
      operationId: redeemCoupon
      parameters:
        - $ref: "#/components/parameters/cumulus"
        - $ref: "#/components/parameters/gtin"
        - $ref: "#/components/parameters/costcenter"
        - $ref: "#/components/parameters/timestamp"
        - $ref: "#/components/parameters/terminal_id"
        - $ref: "#/components/parameters/transaction_id"
        - $ref: "#/components/parameters/unique_request_id"
        - $ref: "#/components/parameters/channel"
        - $ref: "#/components/parameters/check_code"
        - $ref: "#/components/parameters/quantity"
      responses:
        "204":
          description: Charge successful
        default:
          description: Standard HTTP semantics, no machine-interpretable body.
      summary: Redeem (Einlösen) a Coupon
      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
    gtin:
      description: GTIN (EAN) of Coupon. Its a string as GTINs often are longer than
        what integers can represent.
      in: path
      name: gtin
      required: true
      schema:
        pattern: ^\d+$
        type: string
    costcenter:
      description: The Migros internal costcenter number (Kostenstelle) to be billed.
        This is necessary especially for charge and reddeem.
      in: query
      name: costcenter
      schema:
        maximum: 9999999
        minimum: 1000000
        type: integer
    timestamp:
      description: >-
        You probably should _not_ send this value at all unless this is some
        kind of offline request for some internal transaction that happened in
        the past. It's whole purpose is for logging and correlating different
        transactions but this is better done via transaction_id.


        Format is Y-m-d\TH:i:s; Default is the time this call arrives at Reti.
      example: 2023-08-17T14:03:05
      in: query
      name: timestamp
      schema:
        pattern: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}
        type: string
    terminal_id:
      description: |-
        Only 'Kassen' must use this field and send the Kassen-Nr/Terminal.
        All other clients **must** leave this fields blank.
      example: 78
      in: query
      name: terminal_id
      schema:
        maximum: 999
        type: integer
    transaction_id:
      description: Transaktions-Nummer; gruppiert z.B. mehrere ReTi-Calls für
        denselben Kunden.
      example: jdfjhamnasdl239msnsds34
      in: query
      name: transaction_id
      schema:
        maxLength: 32
        minLength: 3
        type: string
    unique_request_id:
      description: Die Unique Request-Id muss innerhalb einer konfigurierten
        Zeitspanne (aktuell 300s) einmalig für das aktuelle Ereignis sein (z.B.
        Kauftransaktion X für Kunde Y und Coupon Z). Anhand dieser ID beurteilt
        ReTi, ob ein Charge bereits erfolgt ist (Offline-Buchungen,
        Mehrfach-Aufrufe usw.).
      example: lksdfji3dmcns834la
      in: query
      name: unique_request_id
      required: true
      schema:
        maxLength: 32
        minLength: 3
        type: string
    channel:
      description: Channel of the coupon; 1 = paper, 2 = digital, 3 = both (e.g.
        Bonus-Coupon). Usually when making a charge through the M-API you'll
        want to use 2.
      example: 2
      in: query
      name: channel
      required: true
      schema:
        enum:
          - 1
          - 2
          - 3
        type: integer
    check_code:
      description: Coupon type; 1 = transferable, 2 = personal/not transferable, 3 =
        Earlybird. Bonus coupons are personal. Falls der Checkcode fehlt, wird
        bei Bonus-Coupons (8888*) check_code==2 angenommen; bei allen anderen
        werden die vorhandenen Stammdaten berücksichtigt.
      in: query
      name: check_code
      schema:
        enum:
          - 1
          - 2
          - 3
        type: integer
    quantity:
      description: Quantity of coupons to assign. By default 1. More than one is not
        really a use-case.
      in: query
      name: quantity
      schema:
        maximum: 99
        minimum: 1
        type: integer
  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
```
