younifyd
Menu

Redeem Stacked Discounts Client Side

Redeem Stackable Discounts (client-side)

POST/client/v1/redemptions

Use it in a workflow

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

Request

Headers

originstring (hostname)required

Indicates the origin (scheme, hostname, and port).

Response

Returns 200 with an object. Read it in later steps with {{redeemStackedDiscountsClientSide.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.