---
title: "List product IDs matching a Coupon."
url: "https://developer.migros.ch/apis/coupons-3/versions/2b8e9e45-2e72-462e-b3cb-d5019d51e0e3/operations/getProductRefs"
---

> Full API specification: https://developer.migros.ch/apis/coupons-3/versions/2b8e9e45-2e72-462e-b3cb-d5019d51e0e3.md

# List product IDs matching a Coupon.

`GET` `/migros/customers/coupons/v3/coupons/{id}/products`

Operation ID: `getProductRefs`

This endpoint provides the list of IDs of those products affected by the given Rabatt-Coupon. The list has no special sorting and might be a day outdated. The list contains the IDs of actual, buyable products _and_ the ID of the relevant "Sammler"-product. Only Rabattcoupons and Bonuscoupons provide this article list, Partnercoupons will result in a 404 status code. As Bonuscoupons always apply to all products calling this endpoint with a Bonuscoupon is pointless, you just get back the 204 status described below. The list is caped to 2000 elements in case more products match this coupon. Some Coupons match the whole assortment. Instead of returning an arbitrarily caped list we return 204 and no body.

## Path parameters

- `id` (integer, required) - Coupon ID (the M-Promo ID, not the GTIN).

## Responses

- `200` - Array of up to 2000 article IDs.
- `204` - This Coupon matches the whole sortiment (Gesamtsortiment). No individual product IDs are returned.
- `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.migros.ch
paths:
  /migros/customers/coupons/v3/coupons/{id}/products:
    get:
      description: >-
        This endpoint provides the list of IDs of those products affected by the
        given Rabatt-Coupon. The list has no special sorting and might be a day
        outdated.


        The list contains the IDs of actual, buyable products _and_ the ID of
        the relevant "Sammler"-product.


        Only Rabattcoupons and Bonuscoupons provide this article list,
        Partnercoupons will result in a 404 status code. As Bonuscoupons always
        apply to all products calling this endpoint with a Bonuscoupon is
        pointless, you just get back the 204 status described below.


        The list is caped to 2000 elements in case more products match this
        coupon.


        Some Coupons match the whole assortment. Instead of returning an
        arbitrarily caped list we return 204 and no body.
      operationId: getProductRefs
      parameters:
        - $ref: "#/components/parameters/cpnid"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductList"
          description: Array of up to 2000 article IDs.
          headers:
            X-Product-Count:
              description: Size of list in response body.
              schema:
                type: integer
        "204":
          description: This Coupon matches the whole sortiment (Gesamtsortiment). No
            individual product IDs are returned.
        default:
          description: Standard HTTP semantics (see above), no machine-interpretable body.
      summary: List product IDs matching a Coupon.
      tags:
        - Coupon-Data
security:
  - Kong-Api-Key: []
  - Basic-Auth: []
components:
  parameters:
    cpnid:
      description: Coupon ID (the M-Promo ID, not the GTIN).
      example: 234531
      in: path
      name: id
      required: true
      schema:
        type: integer
  schemas:
    ProductList:
      description: List of product IDs matching a couopon.
      example:
        - "280134171000"
        - "121301900000"
      items:
        type: string
      type: array
  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
```
