Must haveThe outcome of a claim can only reach the member through your app: for programmes that use the API, Spaycial rarely has the member's email.
claim_update
When it fires
This event is triggered when the status of a claim has changed. The claim is either rejected, pending or validated.
Payload fields
| Field | Type | Description |
|---|---|---|
event | String | The name of the webhook event. |
eventType | String | The type of event: pending, validated or rejected. |
customer | Object | The member who filed the claim. |
customer.id | String | Spaycial's member id. |
customer.externalId | String | Your member id. |
claim | Object | The claim that was updated. |
claim.id | String | The claim identifier. |
claim.amount | String | The amount of the claim. |
claim.store | String | The name of the store. |
claim.storeId | String | The store id in the Spaycial repository. |
claim.storeExternalId | String | The store id in your repository. |
claim.date | String | The date the claim was posted (ISO 8601 format). |
claim.rejectionReason | String | The rejection reason of the claim, if rejected. |
claim.code | String | The code identifying the rejection reason. Possible values: TRANSACTION_ALREADY_ASSOCIATED, TRANSACTION_NOT_FOUND, AUTO_REJECTED, DUPLICATED, STORE_OUT_OF_PROGRAM, BEFORE_REGISTRATION, RECEIPT_INCOMPLETE. |
claim.status | String | The status of the claim: rejected, pending or validated. |
claim.transactionDate | Date | The date of the transaction, declared by the member (YYYY/MM/DD). |
claim.transactionId | String | The id of the transaction, provided only for validated claims. |
Example
{
"event": "claim_update",
"eventType": "rejected",
"customer": {
"id": "398f0b39-c205-4fb2-a225-70e042df3fdb",
"externalId": "4564564564654"
},
"claim": {
"id": "b73dbe2b-b1d6-46f0-8e0c-3ff122de3c62",
"amount": "-12.00",
"store": "ARMAND THIERY",
"storeId": "85536c27-ba78-4c00-ab66-f7c4a7d04faf",
"storeExternalId": "29894111110",
"status": "rejected",
"rejectionReason": "The store is out of program",
"code": "STORE_OUT_OF_PROGRAM",
"date": "2021-10-08T06:50:40.479Z",
"transactionId": null,
"transactionDate": "2021-10-01"
}
}