Webhook Events
Coupon
Overview
Coupons are used to apply discounts on items, carts, or shipping during the checkout process. By subscribing to coupon-related events, as merchants, you can get event-specific information, including coupon ID, event name, and event status.
The following table details various coupon-related events along with the example responses:
Events
Event Type | Description | Example Response |
---|---|---|
offers:coupon:created | The event is triggered when a coupon is created. | { "specversion": "v1", "type": "offers:coupon:created", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "CREATED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:coupon:deleted | The event is triggered when a coupon is deleted. | { "specversion": "v1", "type": "offers:coupon:deleted", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "DELETED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:coupon:updated | The event is triggered when a coupon is updated. | { "specversion": "v1", "type": "offers:coupon:updated", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "UPDATED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:coupon:enabled | The event is triggered when a coupon is enabled. Only disabled coupons can be enabled. When a coupon is enabled, shoppers can use them to get a discount on eligible products. | { "specversion": "v1", "type": "offers:coupon:enabled", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "ENABLED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:coupon:disabled | The event is triggered when a coupon is disabled. When a coupon is disabled, shoppers can’t use them to get a discount on their purchases. | { "specversion": "v1", "type": "offers:coupon:disabled", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "DISABLED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:coupon:activated | The event is triggered when a coupon becomes active and is available for use. | { "specversion": "v1", "type": "offers:coupon:activated", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "ACTIVATED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:coupon:deactivated | The event is triggered when a coupon is deactivated and is no longer available for use. | { "specversion": "v1", "type": "offers:coupon:deactivated", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON", "status": "DEACTIVATED", "id": "642babcd3ebd250008455701", "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:couponCode:created | The event is triggered when a coupon code is created. | { "specversion": "v1", "type": "offers:couponCode:created", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON-CODE", "status": "CREATED", "promotionId": "642babcd3ebd250008455701","couponCode":"ABC-123" "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |
offers:couponCode:updated | The event is triggered when a coupon code is updated. | { "specversion": "v1", "type": "offers:couponCode:updated", "tenantid": "63a123070cf218e178efda30", "events": \[ { "id": "0076064a-695e-43ac-b004-17802ed186ac", "time": "2023-06-01T13:29:40.000Z", "source": "offers:business-layer", "subject": null, "data": { "eventName": "COUPON-CODE", "status": "UPDATED", "promotionId": "642babcd3ebd250008455701","couponCode":"ABC-123" "callbackUrls": \[ "https://stg02.copilot.fabric.inc/api-offers/priceList/100001" \] } } \] } |