Creates multiple rewards.
You can only call this method when authenticated as a Wix app or Wix user identity.
Rewards to create.
Created rewards.
Total successes and failures of the bulk create rewards action.
curl -X POST \
'https://www.wixapis.com/loyalty-rewards/bulk/rewards/create' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-raw '{
"rewards": [
{
"active": true,
"name": "Free shipping",
"type": "COUPON_REWARD",
"couponReward": {
"freeShipping": {
"configsByTier": [
{
"tierId": null,
"costInPoints": 20
}
]
}
}
}
]
}'
{
"results": [
{
"item": {
"id": "46d7bbce-6bb4-4174-ae5a-7f44c19f95ce",
"name": "Free shipping",
"requiredPoints": 20,
"active": true,
"type": "COUPON_REWARD",
"couponReward": {
"freeShipping": {
"configsByTier": [
{
"costInPoints": 20
}
]
}
},
"revision": "1",
"createdDate": "2024-04-18T10:35:41.071Z",
"updatedDate": "2024-04-18T10:35:41.071Z"
},
"itemMetadata": {
"id": "46d7bbce-6bb4-4174-ae5a-7f44c19f95ce",
"originalIndex": 0,
"success": true,
"error": null
}
}
],
"bulkActionMetadata": {
"totalSuccesses": 1,
"totalFailures": 0,
"undetailedFailures": 0
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.