Skip to main content

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 offer
  • pending - the member has made another purchase eligible for a particular offer
  • completed - the member has completed a particular offer
  • refunded - a benefit has been issued for this reward

Payload fields​

FieldTypeDescription
eventStringThe name of the webhook event.
shoppingHubIdStringProgramme id (Spaycial).
shoppingHubExternalIdStringProgramme id in your system.
customerObjectThe member concerned.
customer.idStringSpaycial's member id.
customer.externalIdStringYour member id.
rewardObjectThe reward that made progress.
reward.idStringThe reward identifier.
reward.statusStringThe status of the reward: started, pending, completed or refunded.
reward.offerIdStringThe identifier of the offer associated with this reward.
offerObjectThe offer associated with this reward.
offer.idStringThe offer identifier.
offer.statusStringThe status of the offer: created or updated.
offer.startDateDateThe offer's start date-time (RFC 3339 full-date format).
offer.endDateDateThe offer's end date-time (RFC 3339 full-date format).
offer.nameStringThe offer's name.
offer.teaserStringThe offer's teaser.
offer.rewardTypeStringThe type of benefit unlocked by this offer: LTRY (lottery), RFND (refund in cashback), GIFT_CARD (gift card).
offer.offerTypeStringThe kind of purchase trigger the offer looks for: welcome, frequency, referral, average.
offer.rewardLabelStringThe offer's reward description.
offer.rewardValueStringThe offer's reward value.
offer.conditionLabelStringThe condition to complete the offer, as a label.
offer.conditionValueStringThe 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"
}
}