POST

Bulk Create Rewards


Creates multiple rewards.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Loyalty
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/loyalty-rewards/v1/bulk/rewards/create

Body Params
rewardsArray <Reward>RequiredminItems 1maxItems 10

Rewards to create.

Response Object
resultsArray <BulkRewardResult>

Created rewards.


bulkActionMetadataBulkActionMetadata

Total successes and failures of the bulk create rewards action.

Bulk create rewards
Request
cURL
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 } ] } } } ] }'
Response
JSON
{ "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 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?