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

# Challenge Events

> JSON Schemas for the challenge definition lifecycle events.

<Warning>
  **Constraints**

  Payload fields keep the `Activity` prefix — `ActivityId`, `ActivityName`, `ActivityDrawType`. The rename to Challenge applies to event names only, not to the payload contract.
</Warning>

Published when a challenge definition changes. Not customer-scoped — no `CustomerId`. For a customer's progress card, see [Card Events](/integration/external-integrations/events/card-events).

## Field reference

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

| Event               |
| ------------------- |
| Challenge Created   |
| Challenge Updated   |
| Challenge Published |
| Challenge Stopped   |
| Challenge Deleted   |

## Schemas

<Tabs>
  <Tab title="Challenge Created">
    ```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" }
          }
        },
        "ProgressRule": {
          "type": ["object", "null"],
          "properties": {
            "Id": { "type": "integer" },
            "ProgressCalculationType": { "type": "string", "enum": ["ProductCount", "PurchaseAmount", "StoreVisit", "PaymentMethod"] },
            "UnitOfMeasure": { "type": ["string", "null"], "enum": ["Item", "Litre", "Gram", "Kilogram", null] },
            "ApplicationType": { "type": "string", "enum": ["Include", "Exclude"] },
            "RequiredProgress": { "type": ["number", "null"] },
            "MinimumPurchaseAmount": { "type": ["number", "null"] },
            "CooldownHours": { "type": ["integer", "null"] },
            "PaymentTypes": { "type": ["array", "null"], "items": { "type": "string" } },
            "Tier": { "type": "integer" },
            "RuleIndex": { "type": "integer" },
            "HasAffiliationFilter": { "type": "boolean" }
          }
        }
      },
      "properties": {
        "UnifiedCampaignId": { "type": ["string", "null"] },
        "ActivityId": { "type": "string" },
        "ActivityName": { "type": "string" },
        "HideInList": { "type": "boolean" },
        "StartDate": { "type": "string", "format": "date-time" },
        "EndDate": { "type": "string", "format": "date-time" },
        "ActivationLimit": { "type": ["integer", "null"] },
        "PickUpEndDate": { "type": ["string", "null"], "format": "date-time" },
        "DaysForPickup": { "type": ["integer", "null"] },
        "Status": { "type": "string", "enum": ["Draft", "Published"] },
        "AdminName": { "type": ["string", "null"] },
        "AdminId": { "type": ["string", "null"] },
        "AccrualValue": { "type": ["number", "null"] },
        "AudienceIds": { "type": ["array", "null"], "items": { "type": "string" } },
        "IsSinglePurchase": { "type": "boolean" },
        "ChainIds": { "type": ["array", "null"], "items": { "type": "string" } },
        "StoreIds": { "type": ["array", "null"], "items": { "type": "string" } },
        "Rewards": { "type": ["array", "null"], "items": { "$ref": "#/$defs/Reward" } },
        "ProgressRules": { "type": ["array", "null"], "items": { "$ref": "#/$defs/ProgressRule" } },
        "ActivationMode": { "type": "string", "enum": ["Manual", "Automatic"] },
        "ProductFileUrl": { "type": "string" },
        "CategoryFileUrl": { "type": "string" },
        "IsTemplate": { "type": "boolean" },
        "DrawType": { "type": "string", "enum": ["Instant", "GlobalLottery", "StoreLottery"] },
        "TimeUnit": { "type": "string", "enum": ["None", "Hour", "Day", "Week", "Month", "Year"] },
        "TimeUnitBetweenCardsIssued": { "type": ["integer", "null"] },
        "ValidForDays": { "type": ["integer", "null"] },
        "SegmentationType": { "type": "string", "enum": ["Standard", "Triggered"] },
        "DiscountFilterType": { "type": "string", "enum": ["IncludeAll", "ExcludeAll", "RecalculateBasedOnPrice"] },
        "FundedBy": { "type": ["string", "null"] },
        "IssueStoreCoupon": { "type": "boolean" },
        "CheckoutTypes": { "type": ["array", "null"], "items": { "type": "string", "enum": ["Pos", "SelfCheckout", "ScanAndPay", "Online"] } },
        "Tags": { "type": ["array", "null"], "items": { "type": "string" } },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Challenge Updated">
    ```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" }
          }
        },
        "ProgressRule": {
          "type": ["object", "null"],
          "properties": {
            "Id": { "type": "integer" },
            "ProgressCalculationType": { "type": "string", "enum": ["ProductCount", "PurchaseAmount", "StoreVisit", "PaymentMethod"] },
            "UnitOfMeasure": { "type": ["string", "null"], "enum": ["Item", "Litre", "Gram", "Kilogram", null] },
            "ApplicationType": { "type": "string", "enum": ["Include", "Exclude"] },
            "RequiredProgress": { "type": ["number", "null"] },
            "MinimumPurchaseAmount": { "type": ["number", "null"] },
            "CooldownHours": { "type": ["integer", "null"] },
            "PaymentTypes": { "type": ["array", "null"], "items": { "type": "string" } },
            "Tier": { "type": "integer" },
            "RuleIndex": { "type": "integer" },
            "HasAffiliationFilter": { "type": "boolean" }
          }
        }
      },
      "properties": {
        "UnifiedCampaignId": { "type": ["string", "null"] },
        "ActivityId": { "type": "string" },
        "ActivityName": { "type": "string" },
        "HideInList": { "type": "boolean" },
        "StartDate": { "type": "string", "format": "date-time" },
        "EndDate": { "type": "string", "format": "date-time" },
        "ActivationLimit": { "type": ["integer", "null"] },
        "PickUpEndDate": { "type": ["string", "null"], "format": "date-time" },
        "DaysForPickup": { "type": ["integer", "null"] },
        "AccrualValue": { "type": ["number", "null"] },
        "AudienceIds": { "type": ["array", "null"], "items": { "type": "string" } },
        "IsSinglePurchase": { "type": "boolean" },
        "ChainIds": { "type": ["array", "null"], "items": { "type": "string" } },
        "StoreIds": { "type": ["array", "null"], "items": { "type": "string" } },
        "Rewards": { "type": ["array", "null"], "items": { "$ref": "#/$defs/Reward" } },
        "ProgressRules": { "type": ["array", "null"], "items": { "$ref": "#/$defs/ProgressRule" } },
        "ActivationMode": { "type": "string", "enum": ["Manual", "Automatic"] },
        "ProductFileUrl": { "type": "string" },
        "CategoryFileUrl": { "type": "string" },
        "IsTemplate": { "type": "boolean" },
        "ModifiedBy": { "type": ["string", "null"] },
        "DrawType": { "type": "string", "enum": ["Instant", "GlobalLottery", "StoreLottery"] },
        "TimeUnit": { "type": "string", "enum": ["None", "Hour", "Day", "Week", "Month", "Year"] },
        "TimeUnitBetweenCardsIssued": { "type": ["integer", "null"] },
        "ValidForDays": { "type": ["integer", "null"] },
        "SegmentationType": { "type": "string", "enum": ["Standard", "Triggered"] },
        "DiscountFilterType": { "type": "string", "enum": ["IncludeAll", "ExcludeAll", "RecalculateBasedOnPrice"] },
        "FundedBy": { "type": ["string", "null"] },
        "IssueStoreCoupon": { "type": "boolean" },
        "CheckoutTypes": { "type": ["array", "null"], "items": { "type": "string", "enum": ["Pos", "SelfCheckout", "ScanAndPay", "Online"] } },
        "Tags": { "type": ["array", "null"], "items": { "type": "string" } },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Challenge Published">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ActivityId": { "type": "string" },
        "PublishedAt": { "type": "string", "format": "date-time" },
        "PublishedBy": { "type": ["string", "null"] },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Challenge Stopped">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ActivityId": { "type": "string" },
        "StoppedBy": { "type": ["string", "null"] },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Challenge Deleted">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ActivityId": { "type": "string" },
        "DeletedBy": { "type": ["string", "null"] },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>
</Tabs>
