Find Plans and inspect configured subscription choices
Find a Plan, inspect its access rules or list its subscriptions. A Plan defines access rules. A subscription is a choice within the Plan. A membership connects a reader to that choice.
| Task | Operation | Distinct result |
|---|---|---|
| Find Plans and inspect relationship counts | GET /api/v1/admin/plans | Paged Plan records, general subscriptions and extras counts |
| Inspect one known Plan | GET /api/v1/admin/plans/{id} | Top-level Plan, general subscriptions and linked team subscriptions; no extras counts |
| Find configured subscription choices | GET /api/v1/admin/subscriptions | Paged general subscriptions with an expanded Plan |
Existing context and identifiers
Allowed roles: readonly, manager, support, admin, partner; root is also permitted. Send the assigned token and publication public key. Service accounts cannot use these three routes, including those with full_access. Keep privileged calls in trusted server code.
| Input | Location / type | Meaning |
|---|---|---|
| resource | Required header, publication public-key string | Selects top-level Plans or choices whose Plan belongs to the publication. Not a numeric ID or secret. |
| token | Required header, existing authorized token string | ADMIN_TOKEN in examples, with eligible caller context. |
| id | Digits-only path value for Plan detail | Plan ID, not subscription or membership-row ID. |
The caller must be active; their current publication relationship, when present, must not be locked or suspended. Top-level records use the selected publication. Linked team, next or downgrade choices can belong to other publications; inspect their configuration context separately.
Inactive and private records can appear. They describe configuration, not current reader eligibility or access.
Example conventions
Examples use fictional Plan 5001, linked Plan 5002 and subscriptions 3001/3002. Responses are excerpts. 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. Catalog price units are unspecified; examples do not convert to major currency units. See response conventions.
Find Plans and inspect related-record counts
GET /api/v1/admin/plans
Find publication Plans with subscriptions, optional rules and relationship counts. Keep a Plan ID for detail inspection. Counts refer to stored records rather than distinct active readers or payments.
Before you call
Send the token and publication key. No reader or membership is required. Inactive/private Plans and choices can appear unless an applicable filter narrows them.
Request
No body is needed.
| Query input | Type / requirement | Meaning and constraints |
|---|---|---|
| page | Optional integer; send 1 explicitly | Send a positive page, such as 1; the omitted-page default is unspecified. |
| limit | Optional integer; default 10 | Send a positive page size, such as 10. No maximum is specified here. |
| filter | Optional bracket map or JSON-string field map | Metadata-based Plan/subscription filters. For example, filter[Plans.title] performs case-insensitive substring matching. Unknown/invalid filters are not uniformly rejected. |
| order / by | Optional known field string | order takes precedence over by; default Plans.created_at. |
| sort | Optional direction string; default DESC | Use ASC/DESC. No stable tie order is promised. |
Subscription filters can select Plans without pruning every nested choice. The type filter below is the exception. Membership-field filtering is not a supported reader-membership search here.
For filter[subscriptions.type], send an array of exact stored values. A scalar can fail; case is not normalized automatically. A nonempty type array can narrow nested subscriptions and the purchase-row count, while subscriptions_count still counts all choices. The example omits it. No complete type enum or uniform malformed-filter error is specified.
Response
HTTP 200 normally returns items and the common paginator. Items contain Plan fields, general subscriptions, conditional rules and extras:
| extras field | Meaning |
|---|---|
| users_count | Number of Plan membership relationships, not necessarily distinct or active people. |
| promos_count | Number of linked promotion relationships. |
| subscriptions_count | Number of all related catalog subscriptions, even when nested type selection narrows the returned array. |
| bundles_count | Number of linked bundle relationships. |
| purchases_count | Stored purchase rows of subscription category for the selected nested subscription IDs; zero when no selected choices. Not a paid/succeeded transaction count, distinct purchasers or revenue. |
Counts do not share an active-reader or time-window filter. Pagination counts Plans before later lookups; skipped missing Plans can leave fewer items, or no items key if all are skipped. Query/filter/related-record failures do not always return an empty list or uniform error.
Example: Find Plans in the publication
Assume one Plan has one choice, two membership links and three subscription purchase rows. Related objects are excerpts; no taxonomy/content-type rules exist in this example.
curl "${WALLKIT_API_BASE}/api/v1/admin/plans" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
--get \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10' \
--data-urlencode 'by=Plans.id' \
--data-urlencode 'sort=ASC'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/plans`);
url.search = new URLSearchParams({"page": "1", "limit": "10", "by": "Plans.id", "sort": "ASC"}).toString();
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
from urllib.parse import urlencode
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/plans"
url += "?" + urlencode({'page': '1', 'limit': '10', 'by': 'Plans.id', 'sort': 'ASC'})
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": 5001,
"title": "Example Plan",
"active": true,
"private": false,
"public": true,
"subscriptions": [
{
"id": 3001,
"title": "Example subscription",
"plan_id": 5001,
"price": 1200,
"currency": "USD",
"active": true,
"private": false,
"public": true,
"plan": {
"id": 5001,
"title": "Example Plan"
}
}
],
"extras": {
"users_count": 2,
"promos_count": 0,
"subscriptions_count": 1,
"bundles_count": 0,
"purchases_count": 3
}
}
],
"paginator": {
"current_page": 1,
"page": 1,
"total_pages": 1,
"total_items": 1,
"limit": 10
}
}
The counts describe three stored purchase rows and two membership links, not necessarily successful payments or distinct active readers.
No Plans match the selected page/query
HTTP 200 excerpt, paginator omitted:
{
"items": []
}
This ordinary empty result differs from missing items after skipped Plan lookups. Query or response-format failure is not confirmed absence.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 200 | items [] with paginator | No selected page/query results. | Check publication, filters and page; display an empty catalog state. |
| 200 | Paginator present but items absent | Selected Plan records were missing at the follow-up lookup. | Treat it as an incomplete result and ask the integration operator to inspect the selected records. |
| Varies / no guaranteed JSON | Filter/type shape, missing related record, query or transport failure | Not every failure is converted into a uniform operation error. | Use known fields and array-valued type filters when needed; retain any request reference for operator investigation. |
See shared errors. Inspect a Plan ID for its detail fields.
Inspect a Plan and its linked team subscriptions
GET /api/v1/admin/plans/{id}
Read a publication Plan, its rules, general subscriptions and linked team choices. The list’s extras counts are absent.
Before you call
Send the token, publication key and intended Plan ID. The Plan must belong to this publication. Team, next or downgrade references can belong to other publications. Reading configuration does not establish team membership, seats or reader access.
Request
Send the headers and a known nonzero Plan ID in the path, without a body. No filters, pagination or sorting are supported. ID 0 is rejected as empty.
Response
HTTP 200 returns Plan fields and conditional rules at the top level, plus subscriptions[] and team_subscriptions[], including empty arrays. There is no items wrapper, paginator or extras.
| Detail field / selection | Meaning |
|---|---|
| subscriptions[] | All related general subscription records, without the list’s type-array selection. Use the exact linked general definition above. |
| team_subscriptions[] | Configured linked choices using the general subscription with the expanded immediate Plan, plus users_limit. Linked choices can be inactive or private and can belong to other publications. |
| team_subscriptions[].users_limit | Stored numeric seat-limit setting or null; not current remaining seats or permission to create a team. |
Missing linked records can fail the response instead of being skipped or null. No nested team ID, profile, activated membership or credential is added.
Example: Inspect a Plan with a linked team choice
Assume Plan 5001 has an ordinary choice and a link to subscription 3002 in Plan 5002, with users_limit 5. No taxonomy/content-type rules exist, so those keys are absent. Related objects are excerpts.
curl "${WALLKIT_API_BASE}/api/v1/admin/plans/5001" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/plans/5001`);
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/plans/5001"
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:
{
"id": 5001,
"title": "Example Plan",
"active": true,
"private": false,
"public": true,
"subscriptions": [
{
"id": 3001,
"title": "Example subscription",
"plan_id": 5001,
"price": 1200,
"currency": "USD",
"active": true,
"private": false,
"public": true,
"plan": {
"id": 5001,
"title": "Example Plan"
}
}
],
"team_subscriptions": [
{
"id": 3002,
"title": "Example team choice",
"plan_id": 5002,
"users_limit": 5,
"plan": {
"id": 5002,
"title": "Linked Plan",
"subscriptions": [
{
"id": 3002,
"title": "Example team choice",
"price": 2400,
"currency": "USD",
"period": "1 month"
}
]
}
}
]
}
The linked choice’s Plan contains lightweight subscriptions. users_limit is configured capacity, not remaining seats or purchase/use eligibility.
The Plan is missing or belongs to another publication
HTTP 404 response:
{
"error": "plan_not_found",
"error_description": "Plan not found",
"req_guid": "example-request"
}
The same response covers other-publication IDs. Check the intended ID and publication; this does not test global Plan existence.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 409 | invalid_id | Falsy/zero Plan ID; description is Empty plan id. | Supply a known nonzero Plan ID. |
| 404 | plan_not_found | No Plan matches both ID and selected publication. | Check the known Plan ID and publication public key against intended catalog records. |
| Varies / no guaranteed JSON | Missing linked record, query/response-format or transport failure | The response format can vary; do not treat a failed request as an empty catalog. | Retain any request reference and ask the integration operator to inspect the Plan’s related records. |
See shared errors. List subscriptions to search and page catalog choices directly.
Find configured subscription choices
GET /api/v1/admin/subscriptions
List catalog subscriptions whose Plan belongs to the publication. Their immediate Plan has more fields than the compact Plan in a general subscription. Reader memberships are separate.
Before you call
Send the token and publication key. No target account is required. Inactive/private choices can appear by default.
Request
No body is needed.
| Query input | Type / requirement | Meaning and constraints |
|---|---|---|
| page | Optional integer; send 1 explicitly | Send a positive page, such as 1; the omitted-page default is unspecified. |
| limit | Optional integer; default 10 | Send a positive page size, such as 10. No maximum is specified here. |
| filter | Optional bracket map or JSON-string field map | Metadata-based subscription/Plan filters. For example filter[Plans.title] matches Plan title text case-insensitively. Unknown/invalid filters are not uniformly rejected. |
| by | Optional known field string; default Subscriptions.id | This call’s sort field. Do not assume the Plan list’s order alias applies. |
| sort | Optional direction string; default DESC | Use ASC/DESC. No stable tie order is promised. |
Response
HTTP 200 normally returns items and paginator. Each item uses general subscription fields, with the expanded immediate Plan. Next/downgrade choices keep their own fields and compact Plans. The immediate Plan adds no taxonomy/content-type rules, extras counts or team_subscriptions.
Admin-only subscription timestamps/country_vat remain conditional. Price units are unspecified. No membership dates, reader or purchase result is added. Missing subscriptions or Plans can fail processing rather than return a uniform empty result.
Example: Read the first page of configured choices
Subscription 3001 belongs to Plan 5001. The excerpt shows lightweight Plan subscriptions; other catalog and Plan fields are omitted.
curl "${WALLKIT_API_BASE}/api/v1/admin/subscriptions" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
--get \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10' \
--data-urlencode 'by=Subscriptions.id' \
--data-urlencode 'sort=ASC'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/subscriptions`);
url.search = new URLSearchParams({"page": "1", "limit": "10", "by": "Subscriptions.id", "sort": "ASC"}).toString();
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
from urllib.parse import urlencode
url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/subscriptions"
url += "?" + urlencode({'page': '1', 'limit': '10', 'by': 'Subscriptions.id', 'sort': 'ASC'})
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,
"price": 1200,
"currency": "USD",
"active": true,
"private": false,
"public": true,
"plan": {
"id": 5001,
"title": "Example Plan",
"active": true,
"private": false,
"public": true,
"subscriptions": [
{
"id": 3001,
"title": "Example subscription",
"price": 1200,
"currency": "USD",
"period": "1 month"
}
]
},
"next_subscription": null,
"downgrade_subscription": null
}
],
"paginator": {
"current_page": 1,
"page": 1,
"total_pages": 1,
"total_items": 1,
"limit": 10
}
}
The nested price, currency and period describe catalog configuration, not a transaction or computed membership duration.
No configured choices match this page/query
HTTP 200 excerpt, paginator omitted:
{
"items": []
}
This ordinary empty result describes the selected publication, filters and page. Query/related-record failures are not confirmed empty catalogs.
Recovery
| HTTP status | API code / response shape | Cause | Next action |
|---|---|---|---|
| 200 | items [] with paginator | No selected page/query results. | Check publication, filters and page; display an empty catalog state. |
| Varies / no guaranteed JSON | Invalid filters, selected/linked record lookup, query/response-format or transport failure | The response format can vary; do not treat a failed request as an empty catalog. | Use known fields, retain any request reference and ask the integration operator to inspect the failure. |
See shared errors. Use plan_id to inspect the Plan; check reader content access separately.
Plan fields used by these reads
These Plan fields are shared by the three reads, with differences below. Plan timestamps, resource_id and settings are absent. Subscription timestamps belong to that subscription, not its Plan.
| Field | Type / meaning |
|---|---|
| id | Integer Plan identifier. |
| title | Stored display-name text, potentially null. |
| slug | Stored Plan label text, potentially null. |
| description | Stored description text, potentially null. |
| full_access | Boolean Plan access-rule flag. Reading it does not grant membership or decide access. |
| predictive_paywall | Stored predictive-rule flag; not uniformly converted to JSON boolean here. |
| predictive_percents | Stored predictive-rule percentage value, potentially null; not a price. |
| can_own_teams | Stored team-ownership support flag, not the caller’s role or a membership grant. |
| priority | Integer configured ranking; not the universal sort order of these reads. |
| private | Boolean configured visibility flag. Private records can be returned. |
| active | Boolean activation flag. Inactive records can be returned. |
| extra | Decoded JSON value or empty/null stored value; application-defined, with no closed schema. |
| public | Boolean inverse of private, independent of active. |
| subscriptions | Array whose selected shape depends on the operation, as described below. Can be empty. |
Plan list/detail subscriptions use general subscription fields, with compact Plans and next/downgrade objects as defined there. Choices can be inactive/private. The Plan list’s type filter is described in its request section.
Conditional taxonomy and content-type rules
Plan list/detail add these configured rule arrays. With no matching relationships, the entire taxonomies or content_types key is omitted rather than empty or null. Rules differ from reader tags and current access counters.
| Returned field/object | Fields and meaning |
|---|---|
| taxonomies[] | Linked taxonomy id, key and title, with terms containing its term rules. IDs and text keep stored types. |
| taxonomies[].terms[] | Term id, key and title, plus the five rule fields below. |
| content_types[] | Content-type id and key, plus the same five rule fields. No title. |
| exclude | Boolean relationship exclusion setting. |
| predictive_paywall | Boolean relationship predictive setting. |
| predictive_percents | Relationship percentage converted to floating point. |
| access_limit | Integer configured limit, not measured remaining access. |
| access_limit_period | Stored period text or null; no fixed seconds conversion. |
Linked taxonomy and content-type rules describe stored classification configuration; confirm the intended publication context. Missing related records can fail the response instead of becoming null. Stored rules do not establish current reader access.
Expanded Plan inside a subscription result
The subscription list and Plan detail’s team_subscriptions use general subscription fields with one difference: the immediate plan uses the Plan fields, but its subscriptions contain only id, title, price, currency and period. id and price are integers; other values keep stored text. Units remain unspecified.
This immediate Plan has no taxonomies, content_types, extras or team_subscriptions. Its lightweight choices can be inactive/private and do not expand recursively. The outer next_subscription and downgrade_subscription keep their own general/public fields and compact Plans; the immediate-Plan rule does not apply to them.
Subscription created_at, updated_at and country_vat require an authorized Admin context. Country VAT fields include a conditional country object. These reads do not calculate tax or convert currencies.