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

Some of the API request fields contain field names that are interchangeable. For information on the list of interchangeable field names, see Loyalty Management Connect API Interchangeable Request Fields.

Note

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

If the voucher code isn’t unique, provide either a voucher ID or a number.

Note

{
   "processParameters":[
      {
         "MembershipNumber":"003",
         "VoucherCode":"15OFF"
      }
   ]
}

Sample JSON Response

{
   "message":null,
   "outputParameters":{
      "outputParameters":{
         "results":[
            {
               "VoucherId":"0kDRM0000004Ct22AE"
            }
         ]
      }
   },
   "simulationDetails":{
      
   },
   "status":true
}