The activity logs capture a chronological record of notable events that occur for a subscription contract in Loop - who did what, to which resource, when, from where, and with what outcome. They’re immutable audit entries intended for monitoring, troubleshooting, compliance, and analytics.
Each activity logs object represent represent a single activity log that has occurred for the subscription. Below is an example of the the activity log object
{
"id": 23881,
"subscriptionId": 988,
"key": "billing_policy_updated",
"entity": "",
"source": "Admin Portal",
"createdAt": "2023-01-05T01:43:34.000Z"
}
Response log payload keys explained:
Field | Description |
|---|---|
id | A unique internal identifier for the specific activity log entry. Each recorded event gets a distinct id for reference and tracking. |
subscriptionId | The unique ID of the Loop Subscription that this activity is related to. It links the event back to a specific subscriber’s subscription record. |
key | Represents the type of activity or action that occurred. For example, billing_policy_updated indicates that the subscription’s billing interval or charge timing was updated. A complete list of keys is documented here. |
entity | Specifies the exact point by which the action was completed. The set is not limited as the entity can be changed. Click here to see the entity examples based on the source key. |
source | Describes the interface or origin where the action was taken. It can have the following values:
|
createdAt | Timestamp (in ISO 8601 UTC format) when the activity occurred. This helps in sorting or filtering events chronologically. |
Entity examples
Below are the examples on how the entity key value changes based on the type of source :
Storefront apis :
- Source: Customer portal
- Entity: API
Admin apis :
-
Source: API
-
Entity: {{token name}}
Admin portal
-
Source: Admin portal
-
Entity: {{User email}}
Customer portal
-
Key: product_added_subscription
-
Source: Customer portal
-
Entity: Loop Quick Actions
Sytem
-
Source: System
-
Entity: Loop Dunning
Shopify
- Source: Shopify
- Entity: Checkout
