Must have
reward_updated
When it fires
This event is triggered when a member makes progress on a loyalty programme's offer, which will potentially lead to a reward. A reward can have different statuses:
started- the member has made a first purchase eligible for a particular offerpending- the member has made another purchase eligible for a particular offercompleted- the member has completed a particular offerrefunded- a benefit has been issued for this reward
Payload fields
| Field | Type | Description |
|---|---|---|
event | String | The name of the webhook event. |
shoppingHubId | String | Programme id (Spaycial). |
shoppingHubExternalId | String | Programme id in your system. |
customer | Object | The member concerned. |
customer.id | String | Spaycial's member id. |
customer.externalId | String | Your member id. |
reward | Object | The reward that made progress. |
reward.id | String | The reward identifier. |
reward.status | String | The status of the reward: started, pending, completed or refunded. |
reward.offerId | String | The identifier of the offer associated with this reward. |
offer | Object | The offer associated with this reward. |
offer.id | String | The offer identifier. |
offer.status | String | The status of the offer: created or updated. |
offer.startDate | Date | The offer's start date-time (RFC 3339 full-date format). |
offer.endDate | Date | The offer's end date-time (RFC 3339 full-date format). |
offer.name | String | The offer's name. |
offer.teaser | String | The offer's teaser. |
offer.rewardType | String | The type of benefit unlocked by this offer: LTRY (lottery), RFND (refund in cashback), GIFT_CARD (gift card). |
offer.offerType | String | The kind of purchase trigger the offer looks for: welcome, frequency, referral, average. |
offer.rewardLabel | String | The offer's reward description. |
offer.rewardValue | String | The offer's reward value. |
offer.conditionLabel | String | The condition to complete the offer, as a label. |
offer.conditionValue | String | The condition to complete the offer, as a value. |
Example
{
"event": "reward_updated",
"shoppingHubExternalId": "90890289082",
"shoppingHubId": "492f0b39-c205-4fb2-a225-70e042df3fdb",
"customer": {
"id": "41278549-d17e-49d2-be12-772bc5425892",
"externalId": "0f3ff415-bfc7-423b-9d5a-1caea428c920"
},
"reward": {
"id": "163284cd-af07-43ed-9178-257a44ae2474",
"status": "pending",
"offerId": "4f284506-f8e8-486a-994a-2fa0f62838e5"
},
"offer": {
"id": "4f284506-f8e8-486a-994a-2fa0f62838e5",
"status": "created",
"startDate": "2023-05-31T22:00:00.000Z",
"endDate": "2023-06-30T22:00:00.000Z",
"name": "June 2023 offer",
"teaser": "Offre du mois de juin",
"offerType": "frequency",
"rewardType": "RFND",
"rewardLabel": "10 €",
"rewardValue": "10.00",
"conditionLabel": "Recevez 10€ pour 80€ d'achats cumulés",
"conditionValue": "80.00"
}
}