---
title: "Returns most relevant currently valid promotions."
url: "https://developer-qual.migros.ch/apis/unified-customer-item-recommender-api-2/versions/06e8ba18-fa54-477e-8cbf-510ade75454a/operations/m_recsys.service.recommendations_api.get_relevant_promotions"
---

> Full API specification: https://developer-qual.migros.ch/apis/unified-customer-item-recommender-api-2/versions/06e8ba18-fa54-477e-8cbf-510ade75454a.md

# Returns most relevant currently valid promotions.

`GET` `/migros/customers/v1/recommender/promotions/{domain_id}`

Operation ID: `m_recsys.service.recommendations_api.get_relevant_promotions`

Returns an ordered list of current promotions based on relevance for given customer. Relevance score is determined by purchase probabilities.

## Path parameters

- `domain_id` (string, required)

## Query parameters

- `customer_id` (string, optional)
- `limit` (integer, optional) - Number of most relevant promotions to return.

## Responses

- `200` - OK
- `401` - Unauthenticated
- `403` - Forbidden
- `404` - Unknown domain or unknown customer

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Unified Customer-Item Recommender API
  version: 2.0.0.dev0
servers:
  - description: URL of upstream
    url: https://qual-unified-recommender.service.migros.cloud
paths:
  /migros/customers/v1/recommender/promotions/{domain_id}:
    get:
      description: Returns an ordered list of current promotions based on relevance
        for given customer. Relevance score is determined by purchase
        probabilities.
      operationId: m_recsys.service.recommendations_api.get_relevant_promotions
      parameters:
        - in: path
          name: domain_id
          required: true
          schema:
            default: Cumulus
            type: string
        - in: query
          name: customer_id
          required: false
          schema:
            $ref: "#/components/schemas/CustomerPromotion"
        - description: Number of most relevant promotions to return.
          in: query
          name: limit
          required: false
          schema:
            default: 10
            maximum: 30
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PromotionScores"
          description: OK
        "401":
          description: Unauthenticated
        "403":
          description: Forbidden
        "404":
          description: Unknown domain or unknown customer
      security:
        - apiKeyAuth: []
      summary: Returns most relevant currently valid promotions.
      tags:
        - Online
security:
  - apiKeyAuth: []
components:
  schemas:
    CustomerPromotion:
      default: "0"
      description: e.g. CumulusID, PersonenID or pseudonymized version thereof
      example: 2099XXXXXXX
      pattern: ^[a-zA-Z0-9-]+$
      type: string
    PromotionScores:
      items:
        properties:
          promotion_id:
            $ref: "#/components/schemas/Promotion"
          score:
            $ref: "#/components/schemas/Score"
        type: object
      type: array
    Promotion:
      description: Migros AngebotID
      example: "2010900"
      pattern: ^[a-zA-Z0-9=]+$
      type: string
    Score:
      description: Depending on context, a score relates to a 7-day purchase
        probability or is just a ranking.
      format: float
      maximum: 1
      minimum: 0
      type: number
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey
      x-apikeyInfoFunc: m_recsys.service.key_auth.check_api_key
```
