---
title: "Match a set of product IDs against this Coupon"
url: "https://developer-qual.migros.ch/apis/coupons-3/versions/b27797a2-ad08-41e0-8429-0f1aeab8826f/operations/matchProductIDs"
---

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

# Match a set of product IDs against this Coupon

`POST` `/migros/customers/coupons/v3/coupons/{id}/matches`

Operation ID: `matchProductIDs`

This endpoint allows to test a list of product IDs whether the product would be matched by this coupon or not. Only Rabattcoupons and Bonuscoupons provide this functionality list, Partnercoupons will result in a 404 status code. Calling this endpoint on a Bonuscoupons is pointless as it matches the whole assortment (i.e. all products) by definition; but it's possible. Like in the .../products endpoint this endpoint operates with the IDs of actual, buyable products as well as the corresponding "Sammler" products. The response contains those queried IDs that qualifiy for the Coupon.

## Path parameters

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

## Request body (required)

Content types: `application/x-www-form-urlencoded`

## Responses

- `200` - Array of those IDs that this Coupon applies to.
- `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/coupons/{id}/matches:
    post:
      description: >-
        This endpoint allows to test a list of product IDs whether the product
        would be matched by this coupon or not.


        Only Rabattcoupons and Bonuscoupons provide this functionality list,
        Partnercoupons will result in a 404 status code. Calling this endpoint
        on a Bonuscoupons is pointless as it matches the whole assortment (i.e.
        all products) by definition; but it's possible.


        Like in the .../products endpoint this endpoint operates with the IDs of
        actual, buyable products as well as the corresponding "Sammler"
        products.


        The response contains those queried IDs that qualifiy for the Coupon.
      operationId: matchProductIDs
      parameters:
        - $ref: "#/components/parameters/cpnid"
      requestBody:
        content:
          application/x-www-form-urlencoded:
            encoding:
              id:
                explode: true
                style: form
            schema:
              properties:
                id:
                  items:
                    example: "166002100000"
                    type: string
                  type: array
              required:
                - id
              type: object
        description: Product IDs to check, provided as (multiple) id form parameter(s).
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductList"
          description: Array of those IDs that this Coupon applies to.
          headers:
            X-Product-Count:
              description: Size of list in response body.
              schema:
                type: integer
        default:
          description: Standard HTTP semantics (see above), no machine-interpretable body.
      summary: Match a set of product IDs against this 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
```
