younifyd
Menu

Check Eligibility Client Side

Check Eligibility (client-side)

POST/client/v1/qualifications

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the Check Eligibility Client Side action (under Client-side).
  3. Fill in the fields below, then reference the result from later steps as {{checkEligibilityClientSide.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

customerany

Customer's information.

orderany

Order information.

tracking_idstring

Is correspondent to Customer's source_id

scenariostring

Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer's cart based on the vouchers assigned to the customer's profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s).

One ofALLCUSTOMER_WALLETAUDIENCE_ONLYPRODUCTSPRODUCTS_DISCOUNTPROMOTION_STACKSPRODUCTS_BY_CUSTOMERPRODUCTS_DISCOUNT_BY_CUSTOMER

optionsany
sessionobject

Parameter to return details about `locked_credits` on a gift card which has locked credits under a validation session.

typestring

Parameter required to return the details about the `locked_credits`.

One ofLOCK

metadataobject

A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or with the [Validation Rule Builder](/personalize/create-validation-rules) in the the Dashboard.

json
{
  "customer": null,
  "order": null,
  "tracking_id": "string",
  "scenario": "ALL",
  "options": null,
  "session": {
    "type": "LOCK"
  },
  "metadata": {}
}

Response

Returns 200 with an object. Read it in later steps with {{checkEligibilityClientSide.response.data.<field>}}.

redeemablesobject

List of redeemables for examine qualification.

objectstring

The type of the object represented by JSON. Default is `list`.

One oflistDefault "list"

data_refstring

Identifies the name of the attribute that contains the array of qualified redeemables.

One ofdataDefault "data"

dataarray<any>

Array of qualified redeemables.

totalinteger

The number of redeemables returned in the API request.

has_moreboolean

As results are always limited, the `has_more` flag indicates if there are more records for given parameters. This lets you know if you can run another request (with different options) to get more records returned in the results.

more_starting_afterstring (date-time)

Timestamp representing the date and time to use in `starting_after` cursor to get more redeemables.

tracking_idstring

This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID.

orderobject
stacking_rulesobject

Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](/orchestrate/stacking-rules).

redeemables_limitinteger

Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.

Default 30

applicable_redeemables_limitinteger

Defines how many redeemables can be applied in one request. The number must be less than or equal to `redeemables_limit`. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be `SKIPPED` according to the `redeemables_sorting_rule`.

Default 5

applicable_redeemables_per_category_limitinteger

Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to `applicable_redeemables_limit`. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.

Default 1

applicable_redeemables_category_limitsobject

Lists categories by category IDs (keys) and defines their limits (values) of applicable redeemables that belong to campaigns with that category.

applicable_exclusive_redeemables_limitinteger

Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.

Default 1

applicable_exclusive_redeemables_per_category_limitinteger

Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.

Default 1

exclusive_categoriesarray<string>

Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.

joint_categoriesarray<string>

Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.

redeemables_application_modestring

Defines the application mode for redeemables. `"ALL"` means that all redeemables must be validated for the redemption to be successful. `"PARTIAL"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.

One ofALLPARTIAL

redeemables_sorting_rulestring

Defines redeemables sorting rule. `CATEGORY_HIERARCHY` means that redeemables are applied oaccording to the category priority. `REQUESTED_ORDER` means that redeemables are applied in the sequence provided in the request.

One ofCATEGORY_HIERARCHYREQUESTED_ORDERDefault "REQUESTED_ORDER"

redeemables_products_application_modestring

Defines redeemables products application mode. `STACK` means that multiple discounts can be applied to a product. `ONCE` means that only one discount can be applied to the same product.

One ofSTACKONCE

redeemables_no_effect_rulestring

Defines redeemables no effect rule. `REDEEM_ANYWAY` means that the redeemable will be redeemed regardless of any restrictions or conditions in place. `SKIP` means that the redeemable will be processed only when an applicable effect is calculated.

One ofREDEEM_ANYWAYSKIP

no_effect_skip_categoriesarray<string>

Lists category IDs. Redeemables with a given category are skipped even if the `redeemables_no_effect_rule` is set to `REDEEM_ANYWAY`. Category IDs can't overlap with the IDs in `no_effect_redeem_anyway_categories`.

no_effect_redeem_anyway_categoriesarray<string>

Lists category IDs. Redeemables with a given category are redeemed anyway even if the `redeemables_no_effect_rule` is set to `SKIP`. Category IDs can't overlap with the IDs in `no_effect_skip_categories`.

redeemables_rollback_order_modestring

Defines the rollback mode for the order. `WITH_ORDER` is a default setting. The redemption is rolled back together with the data about the order, including related discount values. `WITHOUT_ORDER` allows rolling the redemption back without affecting order data, including the applied discount values.

One ofWITH_ORDERWITHOUT_ORDER

json
{
  "redeemables": {
    "object": "list",
    "data_ref": "data",
    "data": [
      null
    ],
    "total": 5,
    "has_more": false,
    "more_starting_after": "2023-10-31T12:13:16.374Z"
  },
  "tracking_id": "string",
  "order": {},
  "stacking_rules": {
    "redeemables_limit": 30,
    "applicable_redeemables_limit": 5,
    "applicable_redeemables_per_category_limit": 1,
    "applicable_redeemables_category_limits": {},
    "applicable_exclusive_redeemables_limit": 1,
    "applicable_exclusive_redeemables_per_category_limit": 1,
    "exclusive_categories": [
      "string"
    ],
    "joint_categories": [
      "string"
    ],
    "redeemables_application_mode": "ALL",
    "redeemables_sorting_rule": "REQUESTED_ORDER",
    "redeemables_products_application_mode": "STACK",
    "redeemables_no_effect_rule": "REDEEM_ANYWAY"
  }
}

Need more? See the Voucherify guide for connection setup and behaviour shared by every action.