younifyd
Menu

Rollback Stacked Redemptions

Rollback Stackable Redemptions

POST/v1/redemptions/{parentRedemptionId}/rollbacks

Use it in a workflow

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

Request

Path parameters

parentRedemptionIdstringrequired

Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`.

Query parameters

reasonstring

Reason for the rollback.

tracking_idstring

Customer's `source_id`.

Request body

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

reasonstring

Reason for the rollback.

tracking_idstring

Customer's `source_id`.

customerany
orderobject

Order information.

metadataobject

A set of key/value pairs that you can send in the request body to update **redemption** metadata.

json
{
  "reason": "string",
  "tracking_id": "string",
  "customer": null,
  "order": {},
  "metadata": {}
}

Response

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

rollbacksarray<object>

Contains the rollback redemption objects of the particular incentives.

idstring

Unique identifier of the redemption rollback.

objectstring

The type of the object represented by the JSON

One ofredemption_rollbackDefault "redemption_rollback"

datestring (date-time)

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

customer_idstring

Unique customer ID of the redeeming customer.

tracking_idstring

Hashed customer source ID.

metadataobject

The metadata object stores all custom attributes assigned to the redemption.

amountinteger

For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.

redemptionstring

Unique redemption ID of the parent redemption.

reasonstring

System generated cause for the redemption being invalid in the context of the provided parameters.

resultstring

Redemption result.

One ofSUCCESSFAILURE

statusstring

Redemption status.

One ofSUCCEEDEDFAILED

failure_codestring

If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.

failure_messagestring

If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.

orderany
channelobject2 fields

Defines the details of the channel through which the redemption was issued.

customerany
related_object_typestring

Defines the related object.

One ofvoucherpromotion_tierredemption

related_object_idstring

Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher.

voucherany

Defines the details of the voucher being originally redeemed.

promotion_tierany

Contains details of the promotion tier and the parent campaign.

rewardobject14 fields
giftobject1 fields

Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.

loyalty_cardobject1 fields

Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.

parent_rollbackobject

This is an object representing a redemption rollback.

idstring

Unique identifier of the redemption rollback.

objectstring

The type of the object represented by the JSON

One ofredemption_rollbackDefault "redemption_rollback"

datestring (date-time)

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

customer_idstring

Unique customer ID of the redeeming customer.

tracking_idstring

Hashed customer source ID.

metadataobject

The metadata object stores all custom attributes assigned to the redemption.

amountinteger

For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.

redemptionstring

Unique redemption ID of the parent redemption.

reasonstring

System generated cause for the redemption being invalid in the context of the provided parameters.

resultstring

Redemption result.

One ofSUCCESSFAILURE

statusstring

Redemption status.

One ofSUCCEEDEDFAILED

failure_codestring

If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.

failure_messagestring

If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.

orderany
channelobject2 fields

Defines the details of the channel through which the redemption was issued.

customerany
related_object_typestring

Defines the related object.

One ofvoucherpromotion_tierredemption

related_object_idstring

Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher.

voucherany

Defines the details of the voucher being originally redeemed.

promotion_tierany

Contains details of the promotion tier and the parent campaign.

rewardobject14 fields
giftobject1 fields

Contains the amount returned to the gift card in the redemption rollback. It is expressed as a negative integer.

loyalty_cardobject1 fields

Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.

orderany
json
{
  "rollbacks": [
    {
      "id": "rr_0efeb3dab05e62e599",
      "object": "redemption_rollback",
      "date": "2021-12-22T10:13:06.487Z",
      "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
      "tracking_id": "string",
      "metadata": {},
      "amount": -10000,
      "redemption": "r_0c656311b5878a2031",
      "reason": "string",
      "result": "SUCCESS",
      "status": "SUCCEEDED",
      "failure_code": "customer_rules_violated"
    }
  ],
  "parent_rollback": {
    "id": "rr_0efeb3dab05e62e599",
    "object": "redemption_rollback",
    "date": "2021-12-22T10:13:06.487Z",
    "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
    "tracking_id": "string",
    "metadata": {},
    "amount": -10000,
    "redemption": "r_0c656311b5878a2031",
    "reason": "string",
    "result": "SUCCESS",
    "status": "SUCCEEDED",
    "failure_code": "customer_rules_violated"
  },
  "order": null
}

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

Rollback Stacked Redemptions — Voucherify — Documentation