---
title: "Customer Validation"
method: POST
path: "/v1/promocodes/{promocodeId}/validateCustomers"
tags: ["PromoCodeQuery"]
---

# Customer Validation

`POST /v1/promocodes/{promocodeId}/validateCustomers`

Validates each customer against the promotion's conditions and returns the results. The response includes the promocodeId and a list of customers with reward allocations for each customer. The effect will indicate which promotion tier was chosen for the customer, and what reward should be given.

## Path parameters

- `promocodeId` string, required

## Query parameters

- `includeCustomerProperties` boolean
- `includeRejectedEffects` boolean
- `dryRun` boolean
- `idempotencyKey` string

## Request body

- QueryserviceValidateCustomers
  - `contexts` PromocodecontextContext[]
    - `customer` PromocodecontextCustomer
      - `customerId` string
      - `properties` object
      - `sessionProperties` object
  - `campaignData` DataCampaignData
    - `campaignSeriesId` string
    - `actionId` string
    - `campaignOccurenceId` string

## Response `200`

A successful response.

- ServiceValidateCustomersResponse
  - `promocodeId` string
  - `promotionId` string
  - `contextsWithEffects` PromocodecontextContextWithEffects[]
    - `customer` PromocodecontextCustomer
      - `customerId` string
      - `properties` object
      - `sessionProperties` object
    - `effects` PromocodecontextEffect[]
      - `promotionTier` integer
      - `effectNotification` 'NO_EFFECT_NOTIFICATION' | 'CONSTRAINED_BY_PROMOTION_MAX_REWARD' | 'CONSTRAINED_BY_PROMOTION_MIN_REWARD' | 'CONSTRAINED_BY_TENANT_MAX_REWARD' | 'CONSTRAINED_BY_TENANT_MIN_REWARD' | 'REWARD_CALCULATION_FAILED' | 'PROMOTION_INACTIVE' | 'FAILED_CONDITIONS' | 'FAILED_TIERS' | 'CAP_LIMIT' | 'UNIT_COUNT_LIMIT' | 'AMOUNT_CENTS_LIMIT' | 'EFFECT_TYPE_NOT_SUPPORTED'
      - `unit` PromocodecontextItemsUnitEffect
        - `unitCount` integer
        - `unitRewardTypeId` string
      - `amount` PromocodecontextItemsAmountEffect
        - `amountCents` integer
        - `amountRewardTypeId` string
    - `rejectedEffects` PromocodecontextEffect[]
      - `promotionTier` integer
      - `effectNotification` 'NO_EFFECT_NOTIFICATION' | 'CONSTRAINED_BY_PROMOTION_MAX_REWARD' | 'CONSTRAINED_BY_PROMOTION_MIN_REWARD' | 'CONSTRAINED_BY_TENANT_MAX_REWARD' | 'CONSTRAINED_BY_TENANT_MIN_REWARD' | 'REWARD_CALCULATION_FAILED' | 'PROMOTION_INACTIVE' | 'FAILED_CONDITIONS' | 'FAILED_TIERS' | 'CAP_LIMIT' | 'UNIT_COUNT_LIMIT' | 'AMOUNT_CENTS_LIMIT' | 'EFFECT_TYPE_NOT_SUPPORTED'
      - `unit` PromocodecontextItemsUnitEffect
        - `unitCount` integer
        - `unitRewardTypeId` string
      - `amount` PromocodecontextItemsAmountEffect
        - `amountCents` integer
        - `amountRewardTypeId` string
    - `uniqueCode` string
  - `validateNotification` 'NO_JOB_NOTIFICATION' | 'PROMOTION_NOT_ASSIGNED' | 'PROMOTION_PAUSED'
  - `validateStatus` 'SUCCESS' | 'FAILURE'

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/optimove/apis/optimove-api.md) · [All operations](https://skmtc.net/optimove/apis/optimove-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/optimove/optimove-api/versions/fc55c5b1bec5/schema)
