The redemption rollback object

Data model description

There is a possibility to withdraw a voucher redemption. We call such operation a redemption rollback.

AttributesDescriptionExample
id
string
ID of a redemption rollback (starts with rr_).rr_Panu3W5OBfZo2djeEh2yqLFB
object
string
Value is redemption_rollback.
date
string, ISO 8601 date format
Occurrence date.2016-11-16T14:14:31Z
customer_id
string
An identifier of a customer stored in Voucherify that is linked to the rolled back redemption. In rollback operation customer can be overwritten.cust_PqojQVpYAmwtcddM3oGfRh05
tracking_id
string
A tracking identifier of a user that redeemed a voucher. Identifier generated during voucher validation. In rollback operation it can be overwritten.track_122jQVpYAmwtcddM3oHhHh05
redemption
string
ID of the redemptions that was rolled back.
gift.amount
integer
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."gift": { "amount": -10000 }
voucher
object
Object presenting redeemed voucher."voucher": { "code": "Testing7fjWdr", "campaign": null, "category": "test", "type": "DISCOUNT_VOUCHER", "discount": { "type": "AMOUNT", "amount_off": 1000 }, "gift": null, "start_date": null, "expiration_date": null, "publish": {}, "redemption": {}, "active": true, "additional_info": null, "metadata": {}, "assets": null }
customer
object
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."customer": { "object": "customer", "id": "cust_PqojQVpYAmwtcddM3oGfRh05", "source_id": "[email protected]", "name": "Joe Doa" }
reason
string
Reason for the rollback.
result
string
The status of the redemption is either SUCCESS or FAILURE.
failure_codeError code explaining reason for operation failure if available (see the errors section for a list of keys).
{
  "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"
      }
    }
  }
}