> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Coupon Events

> JSON Schemas for the coupon lifecycle events.

<Warning>
  **Constraints**

  Coupon Assigned event is only published live for Triggered Offers. Segmented Offers publish the event only when the Offer is Activated.

  Coupon Activated for Pre-activated Segmented Offers is only published after the first redemption.
</Warning>

Published when a customer's coupon changes state. Every payload carries `CustomerId`, `CouponId` and `OfferId`.

## Field reference

Field definitions match the coupon models used by the Promotion Platform endpoints. See [Coupons (Web & Mobile) V3](/api-reference/promotion-platform/coupons-web-and-mobile-v3) and [Coupons (POS)](/api-reference/promotion-platform/coupons-pos) in the API Reference.

| Event                      | Triggering endpoint                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------- |
| Coupon Assigned            | `POST /v3/customers/{customerId}/coupons/assign` — Create coupon                      |
| Coupon Activated           | `POST /v3/customers/{customerId}/coupons/{couponId}/activate` — Activate coupon       |
| Coupon Deactivated         | `POST /v3/customers/{customerId}/coupons/{couponId}/deactivate` — Deactivate coupon   |
| Coupon Redeemed            | `POST /v3/coupons/{couponId}/redeem` — Redeem coupon by id                            |
| Coupon Redemption Canceled | `POST /v3/coupons/posCouponId/{posCouponId}/cancel-redeem` — Cancel coupon redemption |
| Coupon Deleted             | Admin delete action                                                                   |

Mobile app equivalents (`POST /mobile-app/v3/coupons/{couponId}/activate` and `/deactivate`) and the POS redeem-by-`posCouponId` variant emit the same events.

## Schemas

<Tabs>
  <Tab title="Coupon Assigned">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CouponId": { "type": "string" },
        "ReservationId": { "type": ["string", "null"] },
        "AssignedAt": { "type": "string", "format": "date-time" },
        "AssignedBy": { "type": ["string", "null"] },
        "VisibleFrom": { "type": "string", "format": "date-time" },
        "DateToPickUp": { "type": "string", "format": "date-time" },
        "StoreId": { "type": ["string", "null"] },
        "OfferId": { "type": "string" },
        "OfferType": { "type": "string" },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Coupon Activated">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CouponId": { "type": "string" },
        "ReservationId": { "type": ["string", "null"] },
        "ActivatedAt": { "type": "string", "format": "date-time" },
        "StoreId": { "type": ["string", "null"] },
        "OfferId": { "type": "string" },
        "DateToPickUp": { "type": "string", "format": "date-time" },
        "AutoActivated": { "type": "boolean" },
        "OfferType": { "type": "string" },
        "PosCouponId": { "type": ["string", "null"] },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Coupon Deactivated">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CouponId": { "type": "string" },
        "OfferId": { "type": "string" },
        "OfferType": { "type": "string" },
        "ReservationId": { "type": ["string", "null"] },
        "DeactivatedAt": { "type": "string", "format": "date-time" },
        "CustomerId": { "type": "string" },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Coupon Redeemed">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CouponId": { "type": "string" },
        "OfferId": { "type": "string" },
        "OfferType": { "type": "string" },
        "ReservationId": { "type": ["string", "null"] },
        "RedeemedAt": { "type": "string", "format": "date-time" },
        "RedemptionLimit": { "type": "integer" },
        "RedeemedCount": { "type": "integer" },
        "IdempotencyKey": { "type": ["string", "null"] },
        "Value": { "type": ["number", "null"] },
        "BasketValue": { "type": ["number", "null"] },
        "StoreId": { "type": ["string", "null"] },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Coupon Redemption Canceled">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CouponId": { "type": "string" },
        "OfferId": { "type": "string" },
        "IdempotencyKey": { "type": ["string", "null"] },
        "CanceledAt": { "type": "string", "format": "date-time" },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Coupon Deleted">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CouponId": { "type": "string" },
        "OfferId": { "type": "string" },
        "OfferType": { "type": "string" },
        "ReservationId": { "type": ["string", "null"] },
        "DeletedAt": { "type": "string", "format": "date-time" },
        "CustomerId": { "type": "string" },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>
</Tabs>
