Skip to main content
POST
/
v1
/
promotions
/
validation
Validate Promotions
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/promotions/validation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '
{
  "customer": {
    "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
  },
  "order": {
    "id": "<string>"
  },
  "metadata": {},
  "options": {
    "expand": [
      "category"
    ]
  }
}
'
{
  "valid": true,
  "tracking_id": "<string>",
  "promotions": [
    {
      "valid": "<string>",
      "applicable_to": {
        "data": [
          {
            "object": "products_collection",
            "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "effect": "APPLY_TO_EVERY"
          }
        ],
        "total": 123,
        "data_ref": "data",
        "object": "list"
      },
      "inapplicable_to": {
        "data": [
          {
            "object": "products_collection",
            "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "effect": "APPLY_TO_EVERY"
          }
        ],
        "total": 123,
        "data_ref": "data",
        "object": "list"
      },
      "tracking_id": "<string>",
      "order": {
        "id": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
        "source_id": "<string>",
        "created_at": "2022-10-06T11:40:48.705Z",
        "updated_at": "2022-10-06T11:47:20.760Z",
        "status": "CREATED",
        "amount": 123,
        "discount_amount": 123,
        "total_discount_amount": 123,
        "total_amount": 123,
        "applied_discount_amount": 123,
        "total_applied_discount_amount": 123,
        "items": [
          {
            "object": "order_item",
            "product_id": "prod_5h0wc453_1",
            "sku_id": "sku_prod_5h0wc453_1_1",
            "quantity": 123,
            "amount": 123,
            "price": 123,
            "subtotal_amount": 123,
            "product": {
              "id": "prod_5h0wc453_1",
              "source_id": "illy-arabica",
              "name": "Brewing System",
              "price": 123
            },
            "sku": {
              "id": "sku_prod_5h0wc453_1_1",
              "source_id": "illy-arabica-250g",
              "sku": "<string>",
              "price": 123
            }
          }
        ],
        "metadata": {},
        "customer": {
          "id": "cust_7iUa6ICKyU6gH40dBU25kQU1",
          "object": "customer"
        },
        "referrer": {
          "id": "cust_7iUa6ICKyU6gH40dBU25kQU1",
          "object": "customer"
        },
        "customer_id": "cust_7iUa6ICKyU6gH40dBU25kQU1",
        "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
        "object": "order"
      },
      "id": "promo_4TqHr24boFISDrcOHSlfAxwm",
      "name": "<string>",
      "banner": "Get 45% off items",
      "discount": {
        "type": "AMOUNT",
        "effect": "APPLY_TO_ORDER",
        "amount_off": 123
      },
      "start_date": "2022-11-02T00:00:00.000Z",
      "expiration_date": "2022-11-04T00:00:00.000Z",
      "campaign": {
        "id": "camp_h8RyP6FV94F3Ev2odP24j5p1",
        "start_date": "2022-11-01T00:00:00.000Z",
        "expiration_date": "2022-11-30T00:00:00.000Z",
        "active": true,
        "categories": {
          "id": "<string>",
          "name": "<string>",
          "hierarchy": 1,
          "object": "category",
          "created_at": "2022-07-14T10:45:13.156Z",
          "updated_at": "2022-08-16T10:52:08.094Z"
        },
        "object": "campaign"
      },
      "hierarchy": 123,
      "discount_amount": 123,
      "applied_discount_amount": 123,
      "metadata": {},
      "object": "promotion_tier",
      "category_id": "cat_0c9da30e7116ba6bba",
      "categories": {
        "id": "<string>",
        "name": "<string>",
        "hierarchy": 1,
        "object": "category",
        "created_at": "2022-07-14T10:45:13.156Z",
        "updated_at": "2022-08-16T10:52:08.094Z"
      }
    }
  ]
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

audienceRulesOnly
string

If you add a query param AudienceRulesOnly=true, the request will be validated against customer-related rules only, the rest of attached limits and rules will be ignored.

filters
Promotion filters · object

Filter conditions. Promotion filter conditions.

Body

application/json

Provide the customer and order context.

Request schema model for validating a promotion using POST v1/promotions/validation.

customer
Customer ID · object

Customer's information.

order
Order ID · object

Order information.

metadata
object

A set of key/value pairs that you can send in the request body to check against vouchers requiring redemption metadata validation rules to be satisfied. The validation runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the Advanced Rule BuilderAdvancedRedemption metadata satisfy or Basic BuilderAttributes matchREDEMPTION METADATA. Read more.

options
object

Configure parameters returned in the response.

Response

200 - application/json

Returns a list of valid promotions for a given context (customer and order). You can then choose which promotion to apply, i.e. the highest discount amount.

Response schema model for validating a promotion using POST v1/promotions/validation.

valid
boolean

Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters.

tracking_id
string

Hashed customer source ID.

promotions
Validate Promotion · object[]

Contains an array of promotion tier objects.

Last modified on December 11, 2025