Skip to main content
The activity log endpoints give you a tamper-evident audit trail for all subscription lifecycle events. You can query the global log for DataTable views, fetch the full state-diff payload for a single event, or retrieve the ordered timeline scoped to one subscription. All routes are read-only, require an authenticated Medusa Admin user, and default to created_at desc ordering.
All routes require an authenticated Medusa Admin user. Unauthenticated requests return 401.

Actor type values

ValueMeaning
userMedusa Admin user
systemInternal system action
schedulerScheduled job

Event type groups

Events are namespaced by domain: subscription.*, renewal.*, dunning.*, cancellation.*.

GET /admin/subscription-logs

Returns the paginated global activity log for Admin DataTable views.

Query parameters

limit
number
Number of results per page.
offset
number
Zero-based result offset for pagination.
q
string
Free-text search.
order
string
Field to sort by. Database-backed: created_at, event_type, actor_type. In-memory: subscription_reference, customer_name, reason.
direction
string
Sort direction. One of asc or desc. Defaults to desc.
subscription_id
string
Filter to events for a specific subscription.
customer_id
string
Filter to events for a specific customer.
event_type
string | string[]
Filter by event type. Accepts a single value or an array.
actor_type
string | string[]
Filter by actor type. Accepts a single value or an array.
date_from
string
ISO datetime lower bound for created_at.
date_to
string
ISO datetime upper bound for created_at.

Response

subscription_logs
object[]
required
Array of activity log list items.
count
number
required
Total matching records.
limit
number
required
Page size used.
offset
number
required
Result offset used.
Response example
{
  "subscription_logs": [
    {
      "id": "slog_123",
      "subscription_id": "sub_123",
      "event_type": "subscription.paused",
      "actor_type": "user",
      "actor_id": "user_123",
      "actor": {
        "type": "user",
        "id": "user_123",
        "email": "admin@example.com",
        "name": "Admin User",
        "display": "admin@example.com"
      },
      "subscription": {
        "subscription_id": "sub_123",
        "reference": "SUB-001",
        "customer_id": "cus_123",
        "customer_name": "Jane Doe",
        "product_title": "Coffee Subscription",
        "variant_title": "1 kg"
      },
      "reason": "customer requested pause",
      "change_summary": "status, paused_at",
      "created_at": "2026-04-15T10:00:00.000Z"
    }
  ],
  "count": 1,
  "limit": 20,
  "offset": 0
}

Errors

CodeErrorMeaning
400invalid_dataInvalid query parameter shape or unsupported sort field

GET /admin/subscription-logs/:id

Returns the full detail payload for a single activity log event, including the previous state, new state, and a field-level diff.

Path parameters

id
string
required
Activity log record ID.

Response

Returns a subscription_log object with all list fields plus:
subscription_log
object
required
Response example
{
  "subscription_log": {
    "id": "slog_123",
    "subscription_id": "sub_123",
    "event_type": "renewal.succeeded",
    "actor_type": "scheduler",
    "actor_id": null,
    "actor": {
      "type": "scheduler",
      "id": null,
      "email": null,
      "name": null,
      "display": null
    },
    "subscription": {
      "subscription_id": "sub_123",
      "reference": "SUB-001",
      "customer_id": "cus_123",
      "customer_name": "Jane Doe",
      "product_title": "Coffee Subscription",
      "variant_title": "1 kg"
    },
    "reason": null,
    "change_summary": "status, processed_at",
    "created_at": "2026-04-15T10:03:00.000Z",
    "previous_state": {
      "status": "scheduled"
    },
    "new_state": {
      "status": "succeeded"
    },
    "changed_fields": [
      {
        "field": "status",
        "before": "scheduled",
        "after": "succeeded"
      }
    ],
    "metadata": {
      "renewal_cycle_id": "re_123",
      "order_id": "order_123"
    }
  }
}

Errors

CodeErrorMeaning
404not_foundActivity log record does not exist

GET /admin/subscriptions/:id/logs

Returns the paginated activity log timeline scoped to a single subscription. Accepts the same query parameters as the global list and applies subscription_id = :id automatically.

Path parameters

id
string
required
Subscription ID.

Query parameters

Same as GET /admin/subscription-logs. Default sort is created_at desc.

Response

Same shape as GET /admin/subscription-logs.
Response example
{
  "subscription_logs": [
    {
      "id": "slog_123",
      "subscription_id": "sub_123",
      "event_type": "subscription.paused",
      "actor_type": "user",
      "actor_id": "user_123",
      "actor": {
        "type": "user",
        "id": "user_123",
        "email": "admin@example.com",
        "name": "Admin User",
        "display": "admin@example.com"
      },
      "subscription": {
        "subscription_id": "sub_123",
        "reference": "SUB-001",
        "customer_id": "cus_123",
        "customer_name": "Jane Doe",
        "product_title": "Coffee Subscription",
        "variant_title": "1 kg"
      },
      "reason": "customer requested pause",
      "change_summary": "status, paused_at",
      "created_at": "2026-04-15T10:00:00.000Z"
    }
  ],
  "count": 1,
  "limit": 20,
  "offset": 0
}