Cancel a Voucher
Change the status of a voucher to canceled.
Example URL
https://yourInstance.salesforce.com/services/data/v64.0/connect/loyalty/programs/DemoProgram/program-processes/cancel Voucher
The request and response parameters vary depending on the input and output parameters configured for the CancelVoucher process type in a Salesforce org.
Sample JSON Requests
Here's a sample request with a member ID and voucher ID
{
"processParameters":[
{
"MemberId":"0lMxx00000000BJEAY",
"VoucherId":"0kdxx000000000B245"
}
]
}
Here's a sample request with a membership number and voucher code
{
"processParameters":[
{
"MembershipNumber":"003",
"VoucherCode":"15OFF"
}
]
}
Sample JSON Response
{
"message":null,
"outputParameters":{
"outputParameters":{
"results":[
{
"VoucherId":"0kDRM0000004Ct22AE"
}
]
}
},
"simulationDetails":{
},
"status":true
}