---
title: "Returns the purchase probability of an item for a specific customer."
url: "https://developer.migros.ch/apis/unified-customer-item-recommender-api-2/versions/99fa4982-90d2-410c-a30b-b658b93762a4/operations/m_recsys.service.recommendations_api.get_customer_item_prediction"
---

> Full API specification: https://developer.migros.ch/apis/unified-customer-item-recommender-api-2/versions/99fa4982-90d2-410c-a30b-b658b93762a4.md

# Returns the purchase probability of an item for a specific customer.

`GET` `/migros/customers/v1/recommender/customeritemprediction/{domain_id}/{customer_id}/{item_id}`

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

Returns score (purchase probability) for the next seven days from the instant the query is executed. Optionally returns the input features that the model used.

## Path parameters

- `domain_id` (string, required)
- `customer_id` (string, required)
- `item_id` (string, required)

## Query parameters

- `return_features` (boolean, optional) - Return features used as input in recommender model.

## Responses

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

## 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://prod-unified-recommender.service.migros.cloud
paths:
  /migros/customers/v1/recommender/customeritemprediction/{domain_id}/{customer_id}/{item_id}:
    get:
      description: Returns score (purchase probability) for the next seven days from
        the instant the query is executed. Optionally returns the input features
        that the model used.
      operationId: m_recsys.service.recommendations_api.get_customer_item_prediction
      parameters:
        - in: path
          name: domain_id
          required: true
          schema:
            default: Cumulus
            type: string
        - in: path
          name: customer_id
          required: true
          schema:
            $ref: "#/components/schemas/Customer"
        - in: path
          name: item_id
          required: true
          schema:
            $ref: "#/components/schemas/Item"
        - description: Return features used as input in recommender model.
          in: query
          name: return_features
          schema:
            default: false
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SingleScore"
          description: OK
        "401":
          description: Unauthenticated
        "403":
          description: Forbidden
        "404":
          description: Unknown domain, customer, or item
      security:
        - apiKeyAuth: []
      summary: Returns the purchase probability of an item for a specific customer.
      tags:
        - Online
security:
  - apiKeyAuth: []
components:
  schemas:
    Customer:
      description: e.g. CumulusID, PersonenID or pseudonymized version thereof
      example: 2099XXXXXXX
      pattern: ^[a-zA-Z0-9-]+$
      type: string
    Item:
      description: Migros ArtikelID
      example: "110136400000"
      pattern: ^[a-zA-Z0-9=]+$
      type: string
    SingleScore:
      example:
        score: 0.42
      type: object
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey
      x-apikeyInfoFunc: m_recsys.service.key_auth.check_api_key
```
