Skip to main content
POST
/
v1
/
redemptions
/
{redemptionId}
/
rollback
Rollback Redemption
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/redemptions/{redemptionId}/rollback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '{
  "customer": {
    "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
    "name": "Annie Lemons",
    "email": "annie@lemon.com",
    "phone": "+1 933 222 3334",
    "birthday": "1900-12-02",
    "birthdate": "1900-12-01",
    "address": {
      "city": "New York",
      "state": "NY",
      "line_1": "123 Main St.",
      "line_2": "APT 3 BLG 5",
      "country": "United States",
      "postal_code": "100012"
    },
    "metadata": {
      "age": 23
    }
  },
  "order": {
    "source_id": "test_rollback_8"
  },
  "metadata": {
    "location_id": [
      "L2"
    ]
  }
}'
{
"id": "rr_0c5eba630bc4979e70",
"object": "redemption_rollback",
"date": "2023-01-27T16:05:23.631Z",
"customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
"metadata": null,
"amount": -2,
"redemption": "r_0c5bf3323008a35032",
"reason": "A UI rollback to check for result in API response to listing.",
"result": "SUCCESS",
"order": {
"id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
"source_id": null,
"created_at": "2023-01-25T12:18:09.203Z",
"updated_at": "2023-01-27T16:05:23.687Z",
"status": "CANCELED",
"amount": 2100,
"total_amount": 2100,
"items": [
{
"object": "order_item",
"product_id": "prod_0bc3bd8a4e072c5275",
"quantity": 3,
"amount": 2100,
"price": 700,
"subtotal_amount": 2100,
"product": {
"name": "Bouquet - Romantic Roses",
"price": 700
}
}
],
"metadata": {},
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"object": "customer"
},
"customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"referrer_id": null,
"object": "order",
"redemptions": {
"r_0c5bf3323008a35032": {
"date": "2023-01-25T12:18:09.216Z",
"rollback_id": "rr_0c5eba630bc4979e70",
"rollback_date": "2023-01-27T16:05:23.631Z",
"related_object_type": "voucher",
"related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
}
}
},
"channel": {
"channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
"channel_type": "USER"
},
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"name": "Bob Jones",
"email": "bob.jones@email.com",
"source_id": "36_bob",
"metadata": {
"age": 26,
"favorite_brands": [
"Nike",
"Adidas",
"Reebok"
],
"accepts_marketing": false,
"acquisition_channel": "Facebook"
},
"object": "customer"
},
"related_object_type": "voucher",
"related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"voucher": {
"id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
"code": "AnsvocvP",
"campaign": "Loyalty Campaign - Test Points",
"campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
"category": null,
"categories": [],
"discount": null,
"gift": null,
"loyalty_card": null,
"start_date": null,
"expiration_date": null,
"validity_timeframe": null,
"validity_day_of_week": null,
"additional_info": null,
"assets": {
"qr": {},
"barcode": {}
},
"updated_at": null,
"object": "voucher"
},
"reward": {
"customer": {
"id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"name": "Bob Jones",
"email": "bob.jones@email.com",
"source_id": "36_bob",
"metadata": {
"age": 26,
"favorite_brands": [
"Nike",
"Adidas",
"Reebok"
],
"accepts_marketing": false,
"acquisition_channel": "Facebook"
},
"object": "customer"
},
"assignment_id": "rewa_0ZwLAHgeU9IrI2V1ofYRmW7g",
"voucher": {
"id": "v_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
"code": "HAPPY-ORDER5My",
"campaign": "$20 off the entire order",
"campaign_id": "camp_5h0wc453_4",
"category": null,
"category_id": "cat_0b688929a2476386a6",
"categories": [],
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 2000,
"effect": "APPLY_TO_ORDER"
},
"gift": null,
"loyalty_card": null,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"validity_timeframe": null,
"validity_day_of_week": null,
"active": true,
"additional_info": null,
"metadata": {},
"assets": {
"qr": {
"id": "21ceb848-4869-4dac-ba41-f854bda3a101",
"url": "{{internalVoucherifyURL}}"
},
"barcode": {
"id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
"url": "{{internalVoucherifyURL}}"
}
},
"is_referral_code": false,
"created_at": "2023-01-25T12:18:09.256Z",
"updated_at": null,
"holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
"redemption": {
"quantity": null,
"redeemed_quantity": 0,
"object": "list",
"url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
},
"publish": {
"object": "list",
"count": 1,
"url": "/v1/vouchers/HAPPY-ORDER5My/publications?page=1&limit=10"
},
"object": "voucher"
},
"id": "rew_MF4hKh1IKYgJkPjbcFbH94Ho",
"object": "reward",
"name": "Digital Present",
"created_at": "2023-01-25T12:16:44.557Z",
"updated_at": null,
"parameters": {
"campaign": {
"id": "camp_5h0wc453_4",
"type": "DISCOUNT_COUPONS"
}
},
"type": "CAMPAIGN"
},
"loyalty_card": {
"points": -2
}
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

Path Parameters

redemptionId
string
required
Example:

Query Parameters

reason
string
tracking_id
string

Body

application/json
reason
string
tracking_id
string
customer
object
order
object
metadata
object

Response

id
string
required
Example:
object
enum<string>
default:redemption_rollback
required
Available options:
redemption_rollback
date
string<date-time>
required
Example:
customer_id
string | null
required
Example:
tracking_id
string | null
required
metadata
object | null
required
redemption
string | null
required
Example:
result
enum<string>
required
Available options:
SUCCESS,
FAILURE
status
enum<string>
required
Available options:
SUCCEEDED,
FAILED
order
object
required
channel
object
required
customer
object
required
Available options:
voucher,
promotion_tier,
redemption
amount
integer
Example:
reason
string
failure_code
string
Example:
failure_message
string
voucher
object
promotion_tier
object
reward
object
gift
object
loyalty_card
object