younifyd
Menu

Validate Stacked Discounts

Validate Stackable Discounts

POST/v1/validations

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the Validate Stacked Discounts action (under Validations).
  3. Fill in the fields below, then reference the result from later steps as {{validateStackedDiscounts.response.data}}.

Fields

baseUrlstring

The API host this action calls. Override to point at a different environment.

Default "https://{cluster}.voucherify.io"

bodystring

The request body content (for POST, PUT, PATCH requests).

forwardAllHeadersboolean

If enabled, all headers from the incoming request will be forwarded. Additional headers below will override forwarded ones.

Default false

headerskeyvalue

Extra HTTP headers to include, beyond what this action already declares. These override forwarded or declared headers with the same name.

queryParamskeyvalue

Extra URL query parameters to include, beyond what this action already declares. These override declared query parameters with the same name.

Response

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

idstring

Unique identifier of the validation, assigned by Voucherify.

validboolean

The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable.

redeemablesarray<oneOf>

Lists validation results of each redeemable. If `redeemables_application_mode` is `PARTIAL` in the `stacking_rules` object, all redeemables here will be `APPLICABLE`. Read more in [the Stacking rules article]/orchestrate/stacking-rules.

skipped_redeemablesarray<any>

Lists validation results of each skipped redeemable.

inapplicable_redeemablesarray<any>

Lists validation results of each inapplicable redeemable.

orderany
tracking_idstring

Hashed customer source ID.

sessionobject
keystring

The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.

typestring

This parameter is required to establish a new session.

One ofLOCKDefault "LOCK"

ttlnumber

Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter.

ttl_unitstring

Defines the type of unit in which the session time is counted.

One ofDAYSHOURSMICROSECONDSMILLISECONDSMINUTESNANOSECONDSSECONDS

stacking_rulesany

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

json
{
  "stacking_rules": null,
  "id": "valid_101740aa2869354c6d",
  "valid": false,
  "redeemables": [
    null
  ],
  "skipped_redeemables": [
    null
  ],
  "inapplicable_redeemables": [
    null
  ],
  "order": null,
  "tracking_id": "track_VAVo1/z+G2GI2LPw==",
  "session": {
    "key": "string",
    "type": "LOCK",
    "ttl": 0,
    "ttl_unit": "DAYS"
  }
}

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