customerRewardCreate
mutation
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Create a discount code customer reward and issue it to the specified customers. The customer reward will appear in the respective Rewards module in the Member component and the User center.
Arguments
The input fields for creating and issuing a customer reward.
Return
A list of errors that occurred during reward creation and issuance.
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Create and issue a discount code customer reward
Code
{
"input": {
"buyerIds": [
"4603752891"
],
"businessId": "********123456",
"rewardType": "PERCENTAGE_DISCOUNT",
"benefitsDetails": "50",
"rewardUsageInstructionType": "MIN_PURCHASE_AMOUNT",
"rewardUsageInstructionValue": "20",
"usageLimits": 1,
"autoStackLimit": "false",
"codeStackLimit": "false",
"rewardExpiryTime": "2027-07-06T16:06:18Z"
}
}
Response
{
"extensions": {
"cost": {
"actualQueryCost": 12,
"requestedQueryCost": 12,
"throttleStatus": {
"restoreRate": 50000,
"currentlyAvailable": 49988,
"maximumAvailable": 50000
}
}
},
"data": {
"customerRewardCreate": {
"userErrors": []
}
}
}
Was this article helpful to you?