Read reader memberships and a publication activity summary
Read a reader’s unpaginated membership list or a publication summary of registration dates, stored activity and net paid amounts.
A subscription is a catalog choice in a Plan. A membership links a reader to that choice. Use a separate content-access check before serving protected content.
| Task | Operation | Allowed credentials |
|---|---|---|
| Read the older unpaginated membership list | GET /api/v1/admin/users/{user_id}/subscriptions | readonly, manager, support, admin or partner, or root |
| Read a reader’s publication statistics summary | GET /api/v1/admin/users/{user_id}/statistic | readonly, manager, support, admin or partner, or root |
Existing context and examples
Use the API address, token and publication public key supplied by your operator. Send the key in resource. Allowed roles appear in the task table. Service accounts cannot use these routes, including those with full_access. Keep privileged calls in trusted server code.
| Input | Location / type | Meaning |
|---|---|---|
| resource | Required header, publication public-key string | Publication context for the selected memberships or statistics; not a numeric resource ID or secret. |
| token | Required header, existing authorized token string | ADMIN_TOKEN in examples; an eligible credential already supplied by the operator. |
| user_id | Required digits-only path value | Known global account ID. Use the intended reader’s existing ID. |
The caller must be active; their current publication relationship, when present, must not be locked or suspended. Use the intended reader’s ID from your audience records. Publication-relationship requirements differ below.
Examples use fictional reader 1002, subscription 3001 and Plan 5001. Requests use cURL, Node.js 18+ fetch in an ES module (.mjs), and Python 3 urllib. Set WALLKIT_API_BASE to scheme and host only, plus existing RESOURCE_KEY and ADMIN_TOKEN. Timestamp timezone is unspecified. See response conventions.
Read the older unpaginated membership list
GET /api/v1/admin/users/{user_id}/subscriptions
Read all mapped memberships whose Plan belongs to this publication, without pagination. This older route and the paginated list have different permissions, validation and empty/error behavior.
Before you call
Use an eligible Admin/root token, publication key and the intended reader ID. The account must exist. Selection follows the Plan’s publication and can include inactive or expired memberships.
Request
Send the path and headers without a body. This read returns an unpaginated list with unspecified order; it has no filter, date-range or sort options. Use the separate paginated route when needed; its service-account grant does not apply here.
Response
HTTP 200 returns items with the identity membership fields, including the general subscription, compact Plan and next/downgrade choices. The linked definitions list each object’s fields. There is no paginator or profile wrapper.
| Field / selection | Meaning and limits for this read |
|---|---|
| items[].id, plan_id | Catalog subscription and Plan IDs, not membership relationship-row IDs. General subscription fields follow the linked definition. |
| subscription_start_date, subscription_updated_date | Membership relationship creation/update timestamps. |
| subscription_end_date | Membership expiration timestamp or null; row presence does not establish current access. |
| subscription_is_external | Boolean external-management marker on the membership. |
| autorenew, is_trial, is_team_subscription, is_allowed_next_subscription | Membership choice/state booleans. No reliable parent-membership fallback is promised. |
| sponsored_subscription_slot | Conditional slot object or null, with the sponsorship fields in the linked definition. Stored activation codes are not caller authentication credentials. |
| created_at, updated_at, country_vat on the catalog choice | Conditional Admin fields; distinct from the membership timestamps above. |
Other-publication Plans and rows with missing or incompatible relationships are omitted. The list is not every stored membership. It contains catalog/membership objects rather than raw relationship IDs or payments.
A missing global account can return user_not_exists. The paginated route has a different query/error contract and also accepts eligible service accounts; the routes are not aliases.
Example: Inspect an existing membership
Assume the membership’s Plan belongs to this publication. The excerpt shows the catalog ID and membership state; other subscription/Plan fields are omitted.
curl "${WALLKIT_API_BASE}/api/v1/admin/users/1002/subscriptions" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/1002/subscriptions`);
const response = await fetch(url, {
method: "GET",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/1002/subscriptions"
request = Request(
url,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
method="GET"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
HTTP 200 response excerpt:
{
"items": [
{
"id": 3001,
"title": "Example subscription",
"plan_id": 5001,
"subscription_start_date": "2026-10-01 12:00:00",
"subscription_updated_date": "2026-10-31 12:00:00",
"subscription_end_date": "2026-11-01 12:00:00",
"subscription_is_external": false,
"autorenew": false,
"is_trial": false,
"is_team_subscription": false,
"is_allowed_next_subscription": false,
"sponsored_subscription_slot": null
}
]
}
Subscription 3001 is the catalog choice. The dates and flags describe reader 1002’s membership, not a current access decision.
No memberships can be returned for this publication
HTTP 200 response:
{
"items": []
}
The account exists but no memberships were returned for this publication. Other-publication rows and failed relationship mappings are excluded.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 404 | user_not_exists | Global account lookup fails; description is Incorrect user. | Check the intended reader ID against existing account records. |
| 200 | items [] | No mapped memberships in the selected publication. | Check publication context and known membership records; do not infer absence across all publications. |
| Varies / no guaranteed JSON | Other construction/query/response-format or transport failure | Failure response formats can vary. | Retain any request reference and ask the integration operator to inspect the failure. |
See shared errors. Use the membership state in your application, or the paginated list for its query options. Check content access separately.
Read registration dates, stored activity and net paid amounts
GET /api/v1/admin/users/{user_id}/statistic
Read a compact reader/publication summary: account timestamps, publication registration, session activity, stored counts and net paid amounts grouped by currency.
Counts can be zero after a caught query failure. The selected last-action timestamp may not be the latest across all data sources.
Before you call
Use an eligible Admin/root token. The global account and its publication relationship must exist. This read uses stored data without contacting a payment provider or changing configuration.
Request
Send the path and headers without a body. The summary uses the fixed count threshold below, rather than a requested period or date range. It has no pagination or filter options and does not select payment mode or convert currencies.
Response fields
HTTP 200 returns these top-level fields, without items or paginator:
| Field | Type / presence | Meaning |
|---|---|---|
| registered_at | Stored timestamp | Global account creation time. |
| registered_in_resource_at | Stored timestamp | Target’s relationship creation time in the selected publication; can differ from global registration. |
| last_updated_at | Stored timestamp | Global account update time, not publication-only update time. |
| last_action_at | Stored timestamp or null | Selected non-system session update timestamp, using the current-session-first rule below; not necessarily last login. |
| activity_last_30_days.content_viewed | Count value, database scalar representation can vary | Distinct non-null content/source IDs recorded with access action for this reader/publication after the fixed date threshold. Not the number of repeated views or proof of reading. |
| activity_last_30_days.paywall_hits | Count value, database scalar representation can vary | Stored paywall-action rows with non-null source IDs in the same context/threshold. Not distinct content/people or a confirmed denial/conversion count. |
| ltv | Formatted string or null | Stored succeeded transaction amounts minus refunded amounts, grouped by currency for this reader/publication and matching the publication’s existing payment mode. Values are formatted to two decimals and joined by commas. Not a prediction or unified numeric total. |
How the summary selects its values
last_action_at uses the most recently updated current non-system session for this reader/publication. Archived non-system sessions are used only when no usable current timestamp exists. A stored current-session timestamp can take precedence over a newer archived one, including after session expiry or activation changes. Null means no usable timestamp was selected.
Counts start at the server’s calendar date minus 30 days, with no explicit upper bound. This differs from a rolling 720-hour window. Zero can mean no matching records or a caught query failure. These measures depend on stored-event coverage rather than a complete analytics history.
ltv sums stored amount - amount_refunded for succeeded transactions in this publication’s existing live/test mode, then divides amounts by 100 for display. Currencies stay separate; order is unspecified. There is no date-range filter. No matches can produce an empty string; a caught helper failure can leave null. This is net stored payments, not predictive lifetime value or complete revenue after fees and tax.
Example: Read a reader’s summary
The example shows three distinct content IDs, five paywall rows and two currency groups. Five rows does not mean five unique readers or confirmed denials.
curl "${WALLKIT_API_BASE}/api/v1/admin/users/1002/statistic" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/1002/statistic`);
const response = await fetch(url, {
method: "GET",
headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/1002/statistic"
request = Request(
url,
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
method="GET"
)
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
HTTP 200 response:
{
"registered_at": "2026-09-01 12:00:00",
"registered_in_resource_at": "2026-10-01 12:00:00",
"last_updated_at": "2026-10-30 12:00:00",
"last_action_at": "2026-10-31 12:00:00",
"activity_last_30_days": {
"content_viewed": 3,
"paywall_hits": 5
},
"ltv": "25.00 USD,10.00 EUR"
}
Keep the currency groups separate. last_updated_at belongs to the global account; last_action_at follows session selection and is not necessarily a login or the maximum current/archived timestamp.
No selected activity or paid rows are shown
HTTP 200 excerpt, registration/update timestamps omitted:
{
"last_action_at": null,
"activity_last_30_days": {
"content_viewed": 0,
"paywall_hits": 0
},
"ltv": ""
}
This can mean no usable session or matching activity/payment rows. Zero counts can also hide query failure, and ltv can be null after a helper failure. Do not treat these values as proof that the reader was never active or never paid.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 404 | user_not_exists | Global account is missing; description is User not found. | Check the intended reader ID. |
| 404 | user_not_exists_in_resource | The account has no matching publication relationship; description is User not found in current resource. | Check publication key and existing audience relationship; the global account can still exist. |
| 409 | user_statistics_failed | A caught outer exception prevents the summary; description is Get user statistics has been failed. | Provide req_guid and intended reader/publication context to the integration operator. |
| 200 | Zero activity, null timestamp, empty/null ltv | Missing matching data, selection rules or query failure can produce these values. | Handle unavailable/empty values in the UI. Investigate unexpected zeros/empty amounts with the integration operator instead of treating them as proven inactivity or zero revenue. |
| Varies / no guaranteed JSON | Other PHP/transport failure | Not every failure becomes the documented exception response. | Retain any request reference and ask the integration operator to inspect the failure. |
See shared errors for caller/context failures. Inspect stored mail/update records for their specific purposes and scope. These summaries do not reconstruct a complete reader timeline.