Promotion

Overview

Promotions are discounts on items, carts, or shipping that are automatically applied when the required conditions are met. By subscribing to promotion events, as merchants, you can receive event-specific information, including promotion ID, event name, and event status.

The following table details various promotion events along with the example responses:

Events

Event Type Description Example Response
offers:promo:created The event is triggered when a promotion is created.
{
  "specversion": "v1",
  "type": "offers:promo: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": "PROMOTION",
        "status": "CREATED",
        "id": "642babcd3ebd250008455701",
        "callbackUrls": [
          "https://stg02.copilot.fabric.inc/api-offers/priceList/100001"
        ]
      }
    }
  ]
}

offers:promo:deleted The event is triggered when a promotion is deleted.
{
  "specversion": "v1",
  "type": "offers:promo: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": "PROMOTION",
        "status": "DELETED",
        "id": "642babcd3ebd250008455701",
        "callbackUrls": [
          "https://stg02.copilot.fabric.inc/api-offers/priceList/100001"
        ]
      }
    }
  ]
}

offers:promo:updated The event is triggered when a promotion is updated.
{
  "specversion": "v1",
  "type": "offers:promo: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": "PROMOTOION",
        "status": "UPDATED",
        "id": "642babcd3ebd250008455701",
        "callbackUrls": [
          "https://stg02.copilot.fabric.inc/api-offers/priceList/100001"
        ]
      }
    }
  ]
}

offers:promo:activated The event is triggered when a promotion becomes active and is available for use.
{
  "specversion": "v1",
  "type": "offers:promo: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": "PROMOTION",
        "status": "ACTIVATED",
        "id": "642babcd3ebd250008455701",
        "callbackUrls": [
          "https://stg02.copilot.fabric.inc/api-offers/priceList/100001"
        ]
      }
    }
  ]
}

offers:promo:deactivated The event is triggered when a promotion is deactivated and is no longer available for use.
{
  "specversion": "v1",
  "type": "offers:promo: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": "PROMOTION",
        "status": "DEACTIVATED",
        "id": "642babcd3ebd250008455701",
        "callbackUrls": [
          "https://stg02.copilot.fabric.inc/api-offers/priceList/100001"
        ]
      }
    }
  ]
}