Data model description
There is a possibility to withdraw a voucher redemption. We call such operation a redemption rollback.
Attributes | Description | Example |
---|---|---|
id | ID of a redemption rollback (starts with |
|
object | Value is | |
date | Occurrence date. |
|
customer_id | An identifier of a customer stored in Voucherify that is linked to the rolled back redemption. In rollback operation customer can be overwritten. |
|
tracking_id | A tracking identifier of a user that redeemed a voucher. Identifier generated during voucher validation. In rollback operation it can be overwritten. |
|
redemption | ID of the redemptions that was rolled back. | |
gift.amount | A negative integer representing total value the gift voucher will be charged back. Property is visible only in case of gift vouchers. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 discount is written as 10000. |
|
voucher | Object presenting redeemed voucher. |
|
customer | Object of the customer this rollback redemption is for if one exists. If not given as parameter to rollback operation, it will be inherited from origin redemption. |
|
reason | Reason for the rollback. | |
result | The status of the redemption is either | |
failure_code | Error code explaining reason for operation failure if available (see the errors section for a list of |
{
"id": "rr_c4loD6wOSTK7elmq6yNfgkGc",
"object": "redemption_rollback",
"date": "2016-11-24T12:23:32Z",
"customer_id": "cust_g1OFNMgwqtISWZ9hjyKeb7ib",
"tracking_id": "track_9KevqqtmGcUcjy2eAzMDeQ==",
"redemption": "r_pTclIxpGU08dB4KWT0Kg7wnK",
"reason": "Mistake",
"result": "SUCCESS",
"voucher": {
"code": "PROMO-VMb4LyH",
"campaign": null,
"category": "docs_test",
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"percent_off": 10
},
"gift": null,
"start_date": null,
"expiration_date": null,
"publish": {
"count": 0,
"entries": []
},
"redemption": {
"quantity": null,
"redeemed_quantity": 0,
"redeemed_amount": 0,
"redemption_entries": []
},
"active": true,
"additional_info": null,
"metadata": {
"channel": "online-shop",
"locale": "de-en"
},
"assets": {
"qr": {
"id": "U2FsdGVkX1/MOrwVNRLth3m1Q+4uiam+pRhPZOTCEk0sJHJ2jvPCTeaWHr2aiIm9iNR+4pVyvOqVSUu8V+uw7T7gQBURI/RBBNez0759Cdmq2N4CRab1LRGy5ZpGi0mI/SFHjZiZDyS0PcU1sRFrzg==",
"url": "https://dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2FMOrwVNRLth3m1Q%2B4uiam%2BpRhPZOTCEk0sJHJ2jvPCTeaWHr2aiIm9iNR%2B4pVyvOqVSUu8V%2Buw7T7gQBURI%2FRBBNez0759Cdmq2N4CRab1LRGy5ZpGi0mI%2FSFHjZiZDyS0PcU1sRFrzg%3D%3D"
}
}
}
}