Insurance webhooks
This page documents webhook events related to insurance from the Inventory API (insurances resource) and other APIs.
Inventory API – insurances resource
Emitted when an insurance definition is deleted (DELETE /insurances/:insuranceId).
Events (Inventory API)
| Action | Event name | Endpoint |
|---|---|---|
| Delete an insurance definition | insurances.deleted |
DELETE /insurances/:insuranceId |
Payload example – deleted (Inventory API)
The data object for insurances.deleted contains only the id of the deleted insurance.
{
"attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created": 1623794000,
"data": {
"insuranceId": "60c92280d9e6c43f77b5a583"
},
"event": "insurances.deleted",
"id": "uuid",
"livemode": true
}
Field descriptions – data (deleted)
| Field | Type | Description |
|---|---|---|
| insuranceId | string | Id of the deleted insurance (24 hex characters). |
Other events (purchasing / cancelling)
| Action | Event name |
|---|---|
| purchasing an insurance | insurance.created |
| cancelling an insurance | insurance.updated |
Payload example
{
"attemptId": "string",
"created": "int",
"data": {
"pricesIncludeTaxes": "boolean",
"displayTotalTaxes": "int",
"displayTotal": "int",
"totalForTransaction": "int",
"agencyName": "string",
"shiftId": "string",
"total": "int",
"changeable": "boolean",
"createdAt": {
"offset": "int",
"value": "string"
},
"promos": [],
"trxId": "string",
"totalTaxes": "int",
"fees": [],
"_purchaseGroupId": "string",
"shiftLocation": {
"name": "string",
"stationId": "string"
},
"displayPrice": "int",
"createdByUserEmail": "string",
"cancellable": "boolean",
"displayTotalForTransaction": "int",
"price": "int",
"agencyId": "string",
"transactionId": "string",
"taxablePercentage": "int",
"_id": "string",
"taxExempted": "boolean",
"customerNumber": "string",
"createdBy": "string",
"displayId": "string",
"displayTaxableDiscounts": "int",
"deleted": "boolean",
"itemId": "string",
"agentId": "string",
"shiftNumber": "string",
"taxes": [
{
"calculated": "int",
"displayCalculated": "int",
"name": "string",
"province": "string",
"value": "int"
}
],
"accountId": "string",
"displayDiscounts": "int",
"discounts": "int",
"taxableDiscounts": "int",
"productFamily": "string",
"ssrs": [],
"displayTaxablePrice": "int",
"productType": "string",
"nonTaxablePrice": "int",
"taxablePrice": "int",
"displayNonTaxablePrice": "int"
},
"event": "string",
"id": "string",
"livemode": "boolean"
}