Issue Voucher Action

Issue a voucher for a member or contact.

This action 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
AdditionalNotes
Type
string
Description
Additional details related to the action, such as the reason for issuing the voucher.
AccountId
Type
string
Description
The ID of the account that's used to issue the voucher. ProvideAccountId only when you issue vouchers to a Business Account. If both AccountId and ContactId are provided, then an error is displayed.
BenefitId
Type
ID
Description
The benefit associated with the voucher.
ContactId
Type
ID
Description
The contact associated with the member. Provide ContactId only when you issue vouchers to a Person Account. If both AccountId and ContactId are provided, then an error is displayed.
DiscountPercent
Type
percent
Description
The discount percentage provided by the voucher. Specify a value to override the discount percentage specified in the associated voucher definition. Specify this when the associated voucher definition is of the type Discount Percentage. This field is available in API version 53.0 and later.
FaceValue
Type
double
Description
The amount of discount provided by the voucher. Specify a value to override the face value specified in the associated voucher definition. Specify this when the associated voucher definition is of the type Fixed Value. This field is available in API version 53.0 and later.
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.
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

Sample request to issue vouchers to a Person Account.

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      “DiscountPercent”:”20”
15   }]
16}

Sample request to issue vouchers to a Business Account.

1{
2  "inputs":[ 
3        { 
4            "LoyaltyProgramMemberId":"0lMxx00000002HxEAI",
5            "AccountId":"001xx000003H3NnAAK",
6            "VoucherDefinitionName":"Voucher1",
7            "VoucherCode":"Voucher123",
8            "ProgramName": "Sip & Save Rewards"
9        }
10    ]
11}

Sample Response

Sample request for the Issue Voucher action.

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