Discount Events
A comprehensive list of events that can activate webhooks for discount changes, including creation, updates, and deletions.
Events
| Event | Description |
|---|---|
discount-created | Triggers whenever a new discount is created. |
discount-updated | Triggers whenever a discount is updated. |
discount-removed | Triggers whenever a discount is deleted. |
Webhook Payload Examples
discount-created
{
"event_id": "whev_8zpqdnwj5h4g3q9km",
"event_type": "discount-created",
"api_version": 2,
"object": "event",
"data": {
"discount": {
"id": "f23b029d-58dd-4bab-8cf1-a89d3ebb8f6d",
"label": "Black Friday Shipping Discount",
"currency": "EUR",
"percent_off": 0,
"amount_off": 0,
"shipping_percent_off": 0,
"shipping_amount_off": 10,
"active": false,
"type": "product_discount",
"object": "discount",
"payments": [
"all"
],
"created_at": "2022-11-22 20:30:55 +0000",
"expiry_date": null,
"block_affiliates": true,
"destinations": [
"worldwide"
],
"condition": "coupon",
"applies_to": "all_products",
"rule_amount": null,
"subscription_discount_duration": "once",
"number_of_months": null,
"domain": null,
"coupon": "BLACKFRIDAY",
"coupon_max_redemptions": 100,
"coupon_times_redeemed": 0
}
},
"endpoint_id": "5dcbcd22-c0e5-4003-8223-e367ce5eb8bf"
}discount-updated
{
"event_id": "whev_9mv3kp1wcyw84npp",
"event_type": "discount-updated",
"api_version": 2,
"object": "event",
"data": {
"discount": {
"id": "f23b029d-58dd-4bab-8cf1-a89d3ebb8f6d",
"label": "Black Friday Order Discount",
"currency": "EUR",
"percent_off": 0,
"amount_off": 30,
"shipping_percent_off": 0,
"shipping_amount_off": 0,
"active": false,
"type": "product_discount",
"object": "discount",
"payments": [
"all"
],
"created_at": "2022-11-22 20:30:55 +0000",
"expiry_date": null,
"block_affiliates": true,
"destinations": [
"worldwide"
],
"condition": "coupon",
"applies_to": "all_products",
"rule_amount": null,
"subscription_discount_duration": "once",
"number_of_months": null,
"domain": null,
"coupon": "BLACKFRIDAY",
"coupon_max_redemptions": 100,
"coupon_times_redeemed": 0
},
"changes": [
"label",
"amount_off",
"shipping_amount_off"
]
},
"endpoint_id": "5dcbcd22-c0e5-4003-8223-e367ce5eb8bf"
}discount-removed
{
"event_id": "whev_4ykvk85rh5ypwenv",
"event_type": "discount-removed",
"api_version": 2,
"object": "event",
"data": {
"discount": {
"id": "1babf08f-a207-45c9-98b0-56b13caae210"
}
},
"endpoint_id": "5dcbcd22-c0e5-4003-8223-e367ce5eb8bf"
}