younifyd
Menu

Redeem Stacked Discounts

Redeem Stackable Discounts

POST/v1/redemptions

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the Redeem Stacked Discounts action (under Redemptions).
  3. Fill in the fields below, then reference the result from later steps as {{redeemStackedDiscounts.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 {{redeemStackedDiscounts.response.data.<field>}}.

redemptionsarray<object>
parent_redemptionobject

This is an object representing a redemption for **POST** `v1/redemptions` and **POST** `/client/v1/redemptions`.

orderany

Contains the order details associated with the redemption.

inapplicable_redeemablesarray<object>

Lists validation results of each inapplicable redeemable.

statusstring

Indicates whether the redeemable can be applied or not applied based on the validation rules.

One ofINAPPLICABLEDefault "INAPPLICABLE"

idstring

Redeemable ID, i.e. the voucher code.

objectstring

Redeemable's object type.

One ofvoucherpromotion_tier

resultobject3 fields

Includes the error object with details about the reason why the redeemable is inapplicable

metadataobject

The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.

categoriesarray<object>
campaign_namestring

Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.

campaign_idstring

Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.

namestring

Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.

skipped_redeemablesarray<object>

Lists validation results of each redeemable. If a redeemable can be applied, the API returns `"status": "APPLICABLE"`.

statusstring

Indicates whether the redeemable can be applied or not applied based on the validation rules.

One ofSKIPPEDDefault "SKIPPED"

idstring

Redeemable ID, i.e. the voucher code.

objectstring

Redeemable's object type.

One ofvoucherpromotion_tier

resultobject1 fields

Provides details about the reason why the redeemable is skipped.

metadataobject

The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.

categoriesarray<object>
campaign_namestring

Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.

campaign_idstring

Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.

namestring

Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.

json
{
  "redemptions": [
    {}
  ],
  "parent_redemption": {},
  "order": null,
  "inapplicable_redeemables": [
    {
      "status": "INAPPLICABLE",
      "id": "string",
      "object": "voucher",
      "result": {
        "error": {
          "code": {},
          "key": {},
          "message": {},
          "details": {},
          "request_id": {},
          "resource_id": {},
          "resource_type": {},
          "error": {}
        },
        "details": {
          "message": "string",
          "key": "string"
        },
        "bundle": {
          "quantity": 0,
          "limit": 0,
          "identified": [
            {
              "type": null,
              "description": null
            }
          ],
          "missing": [
            {
              "type": null,
              "description": null
            }
          ]
        }
      },
      "metadata": {},
      "categories": [
        {}
      ],
      "campaign_name": "string",
      "campaign_id": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3",
      "name": "string"
    }
  ],
  "skipped_redeemables": [
    {
      "status": "SKIPPED",
      "id": "string",
      "object": "voucher",
      "result": {
        "details": null
      },
      "metadata": {},
      "categories": [
        {}
      ],
      "campaign_name": "string",
      "campaign_id": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3",
      "name": "string"
    }
  ]
}

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