v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Campaigns

Examine Campaign Qualification

❗️ Deprecated

This endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new Qualifications API introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.

The method can be used for sending a request to display all campaigns qualified to the given customer and context (e.g., order).

The maximum number of returned campaigns is 50.

What campaign types are included in the response?

  • DISCOUNT_COUPONS
  • GIFT_VOUCHERS
  • REFERRAL_PROGRAM

What's excluded?

A checking logic will be run only among campaigns and will ignore generic (standalone) vouchers. For generic (standalone) vouchers, you should run a dedicated endpoint for searching and identifing vouchers.

Subsequent Steps

As a recommended subsequent step after selecting a qualified campaign is to publish a voucher code from that campaign. The API method for publishing will return a unique code which will belong to a given customer.

Sample use case

As a sample use case, you can imagine a requirement of displaying coupons (grouped in campaigns) that a customer is eligible to use. The customer should get assigned to the particular voucher from the campaign and then may redeem that particular code when he/she places an order.

Read about Qualification API limits before you start.

post/v1/campaigns/qualification

Query parameters

audienceRulesOnlyboolean

This parameter set to true will ask only for verifying vouchers' validation rules only against conditions applied to audiences' attributes (belonging into segment and Customer metadata)

limitinteger

The number of campaigns to be qualified. The maximum number is 50.

order'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'type' | '-type' | 'code' | '-code' | 'category' | '-category' | 'campaign' | '-campaign'

Sorts the results using one of the filtering options, where the dash - means sorting in a descending order.

Request body

Example request

{
  "customer": {
    "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
  },
  "order": {
    "created_at": "2021-12-22T10:13:06.487Z",
    "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
  }
}

Response

This operation returns the list of valid and active campaigns based on the qualification of a given context (e.g., customer profile, redemptions metadata, order).

Read about Qualification API limits before you start.

objectstring

The type of the object represented by JSON. This object stores information about campaigns in a dictionary.

data_refstring

Identifies the name of the attribute that contains the array of campaign objects.

totalinteger

Total valid and active campaigns matching the qualification criteria in given context.

idstring

Unique qualification ID.

created_atstring date-time

Timestamp representing the date and time when the qualification was created. The value is shown in the ISO 8601 format.

tracking_idstring

Hashed customer source ID.

Example response

{
  "data": [
    {
      "id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
      "voucher": {
        "discount": {
          "amount_off": 100
        }
      },
      "validity_timeframe": {
        "duration": "PT1H",
        "interval": "P2D"
      },
      "validity_hours": {
        "daily": [
          {
            "start_time": "12:00",
            "expiration_time": "14:00"
          }
        ]
      },
      "start_date": "2022-09-20T00:00:00.000Z",
      "expiration_date": "2022-09-30T00:00:00.000Z",
      "created_at": "2021-12-01T08:00:50.038Z",
      "updated_at": "2022-09-20T09:18:19.623Z",
      "validation_rules_assignments": {
        "data": [
          {
            "id": "asgm_N7t39epaQR2SkQcW",
            "rule_id": "val_ssbxf1L9aKri",
            "related_object_id": "camp_AaP9MC1Y0GpBII84UTIuasvb",
            "related_object_type": "campaign",
            "created_at": "2022-02-14T15:12:06.817Z"
          }
        ]
      },
      "category_id": "cat_0b688929a2476386a7",
      "categories": {
        "created_at": "2022-07-14T10:45:13.156Z",
        "updated_at": "2022-08-16T10:52:08.094Z"
      },
      "referral_program": {
        "custom_event": {
          "id": "ms_fi47Dcu5T0m3v3nT5ch3ma"
        }
      }
    }
  ],
  "id": "qfl_dNZ3gWfKVNa8Zw15hn30uqdU",
  "created_at": "2023-04-04T13:13:03.119Z"
}