> ## 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.

# Card Events

> JSON Schemas for a customer's challenge card - assigned, activated, progress and completion.

<Warning>
  **Constraints**

  Card Assigned is published only for Triggered Challenges.

  For Pre-activated Challenges, Card Activated event is published the first time customer opens the app or after the first purchase made.
</Warning>

Published as a customer progresses through a challenge. A **card** is one customer's instance of a challenge. Every payload carries `CustomerId`, `CardId` and `ActivityId`.

For the challenge definition itself, see [Challenge Events](/integration/external-integrations/events/challenge-events).

## Field reference

Field definitions match the card models used by the Challenges endpoints. See [Challenges](/api-reference/promotion-platform/challenges) in the API Reference.

| Event              | Triggering endpoint                                          |
| ------------------ | ------------------------------------------------------------ |
| Card Assigned      | Platform action when a customer becomes eligible             |
| Card Activated     | `PUT /v3/cards/{id}/activate` — Activate challenge           |
| Progress Increased | `POST /v1/purchases` — purchase processing advances progress |
| Card Completed     | `POST /v1/purchases` — the purchase that completes the card  |

The mobile app equivalent (`PUT /mobile-app/v3/cards/{id}/activate`) emits the same Card Activated event.

## Schemas

<Tabs>
  <Tab title="Card Assigned">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CardId": { "type": "string" },
        "ActivityId": { "type": "string" },
        "AssignedAt": { "type": "string", "format": "date-time" },
        "ExpiresAt": { "type": ["string", "null"], "format": "date-time" },
        "ExecutionId": { "type": "string" },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Card Activated">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CardId": { "type": "string" },
        "ActivityId": { "type": "string" },
        "ActivatedAt": { "type": "string", "format": "date-time" },
        "ExecutionId": { "type": ["string", "null"] },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Progress Increased">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "CardId": { "type": "string" },
        "ActivityId": { "type": "string" },
        "Progress": { "type": "number" },
        "PreviousTier": { "type": ["integer", "null"] },
        "CurrentTier": { "type": ["integer", "null"] },
        "PurchaseId": { "type": "string" },
        "StoreId": { "type": "string" },
        "ChainId": { "type": "string" },
        "PurchaseTime": { "type": "string", "format": "date-time" },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Card Completed">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "$defs": {
        "Reward": {
          "type": ["object", "null"],
          "properties": {
            "Id": { "type": ["string", "null"] },
            "OfferId": { "type": ["string", "null"] },
            "Title": { "type": ["string", "null"] },
            "TotalRewards": { "type": ["integer", "null"] },
            "BonusAmount": { "type": ["number", "null"] },
            "RewardType": { "type": "string", "enum": ["Coupon", "Bonus", "Custom", "LotteryTicket", "Multiple"] },
            "Tier": { "type": "integer" }
          }
        }
      },
      "properties": {
        "CardId": { "type": "string" },
        "ActivityId": { "type": "string" },
        "Offer": { "type": ["string", "null"] },
        "UnifiedCampaignId": { "type": ["string", "null"] },
        "ClosedAt": { "type": "string", "format": "date-time" },
        "PickUpEndDate": { "type": ["string", "null"], "format": "date-time" },
        "RewardType": { "type": ["string", "null"], "enum": ["Coupon", "Bonus", "Custom", "LotteryTicket", "Multiple", null] },
        "BonusAmount": { "type": ["number", "null"] },
        "ActivityDrawType": { "type": "string", "enum": ["Instant", "GlobalLottery", "StoreLottery"] },
        "FundedBy": { "type": ["string", "null"] },
        "ActivityName": { "type": "string" },
        "RewardTitle": { "type": ["string", "null"] },
        "Rewards": { "type": ["array", "null"], "items": { "$ref": "#/$defs/Reward" } },
        "CompletedByPurchaseId": { "type": "string" },
        "StoreId": { "type": "string" },
        "EventId": { "type": "string" },
        "CustomerId": { "type": "string" }
      }
    }
    ```
  </Tab>
</Tabs>
