Newer Version Available

This content describes an older version of this product. View Latest

Issue Voucher Action

Issue a voucher for a member or contact.

This object is available in API version 51.0 and later for users with Loyalty Management license.

Supported REST HTTP Methods

URI
/services/data/vXX.X/actions/standard/issueVoucher
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
BenefitId
Type
ID
Description
The benefit associated with the voucher.
ContactId
Type
ID
Description
The contact associated with the member.
EffectiveDate
Type
Date
Description
The date the voucher goes into effect.
ExpiryDate
Type
Date
Description
The date the voucher expires.
JournalId
Type
ID
Description
The transaction journal associated with the member voucher when the voucher results from accrual of points.
LoyaltyProgramMemberId
Type
ID
Description
ID of the loyalty program member to issue the voucher.
PromotionId
Type
ID
Description
The promotion associated with the voucher.
ProgramName
Type
string
Description
The name of the loyalty program associated with this voucher.
Reason
Type
string
Description
The reason why the voucher is issued.
VoucherCode
Type
string
Description
Required. The voucher identifier generated by an external system.
VoucherDefinitionName
Type
string
Description
Required. The name of the voucher definition associated with the voucher code.

Outputs

Output Details
VoucherId
Type
ID
Description
The ID of the voucher that’s generated after the request is successful.

Example

Sample Request

1{
2   "inputs":[{
3      "LoyaltyProgramMemberId":"0lMxx0000A000001EAA",
4      "ContactId":"0lMxx0000A000001EAA",
5      "ProgramName":"Program 1",
6      "VoucherDefinitionName":"Voucher1",
7      "JournalId":"0lVxx0000A000001EAA",
8      "VoucherCode":"Voucher123",
9      "PromotionId":"0lMxx0000A000001EAA",
10      "BenefitId":"0lMxx0000A000001EAA",
11      "Reason":"Bonus",
12      "EffectiveDate":"12-08-2021",
13      "ExpiryDate":"12-09-2021"
14   }]
15}

Sample Response

1{
2   "errors":null,
3   "isSuccess":true,
4   "outputValues":{ 
5        "VoucherId":"0lYxx0000A000001EAA"
6   }
7}