Browse promotion configuration and associated readers
Find a promotion, read its settings or inspect associated reader rows. Optional transaction summaries have separate matching limits below.
| Task | Operation | Result |
|---|---|---|
| Find promotion records | GET /api/v1/admin/promos | Paged configuration with linked groups and activation-row count |
| Inspect known configuration | GET /api/v1/admin/promos/{id} | One configuration object |
| Inspect associated reader rows | GET /api/v1/admin/promos/info/{id} | Paged resource-aware readers, optionally with a transaction summary |
Context and examples
Allowed roles: readonly, manager, support, admin, partner; root is also permitted. Send the assigned token and publication key. 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 | Selects the top-level promotion's publication; not a numeric record ID or secret. |
| token | Required header, existing eligible token string | ADMIN_TOKEN in examples. |
| id | Detail/info path, digit string | Promotion record ID, not its redemption code. |
The caller must be active; their current publication relationship, when present, must not be locked or suspended. Session checks can reject revoked, expired or compromised tokens. Choose the intended promotion from the selected publication’s records.
Examples use fictional promotion 8201, publication 2001, code EXAMPLE2026, reader 1002 and transaction 9101. 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 RESOURCE_KEY and ADMIN_TOKEN. See shared errors.
Browse promotions
GET /api/v1/admin/promos
Read promotion configurations in the selected publication.
Before you call
Responses contain sensitive redeemable codes. Publication scope applies to the promotion, not all linked data. Treat configuration as privileged; it does not decide redemption. Inactive, out-of-date or exhausted configurations can appear.
Send the token and publication key. No reader or purchase is required.
Request
No body is needed. The primary example omits filters.
| 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. |
| order | Optional known field string | Overrides by; default Promos.created_at when both omitted. |
| by | Optional known field string | Used only when order is absent. |
| sort | Optional direction string; default DESC | Use ASC or DESC. No stable tie order is promised. |
| filter | Optional bracket map or JSON-string field map | Metadata-derived promotion fields; text filters use case-insensitive substring matching. Unknown/invalid fields are not uniformly rejected or converted into a clean error. |
Response
HTTP 200 returns items and the common paginator. Rows use configuration fields and linked groups. Totals are not unique redemptions or transactions.
Example: Read the first configuration page
This excerpt shows known stored fields and added groups/count without closing the schema. All groups are empty. count_uses:0 describes no activation rows here, not no discount-related transaction.
curl "${WALLKIT_API_BASE}/api/v1/admin/promos" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
--get \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10' \
--data-urlencode 'order=Promos.id' \
--data-urlencode 'sort=ASC'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/promos`);
url.search = new URLSearchParams({"page": "1", "limit": "10", "order": "Promos.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/promos"
url += "?" + urlencode({'page': '1', 'limit': '10', 'order': 'Promos.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 excerpt:
{
"items": [
{
"id": 8201,
"title": "Example promotion",
"description": "Illustrative configuration only.",
"resource_id": 2001,
"code": "EXAMPLE2026",
"discount": 15,
"discount_type": "percent",
"currency": "USD",
"start_date": "2026-10-01 00:00:00",
"end_date": "2026-10-31 23:59:59",
"for_all_plans": false,
"for_all_bundles": false,
"for_all_content": false,
"for_all_ti_events": false,
"activations_limit": 100,
"created_at": "2026-10-01 12:00:00",
"updated_at": "2026-11-01 12:00:00",
"active": "1",
"available_for": {
"subscriptions": [],
"content": [],
"bundles": [],
"available_subscriptions": [],
"ti_event_tickets": []
},
"count_uses": 0
}
],
"paginator": {
"current_page": 1,
"page": 1,
"total_pages": 1,
"total_items": 1,
"limit": 10
}
}
Alternative: No selected promotion rows
HTTP 200 excerpt, paginator omitted:
{
"items": []
}
This is an ordinary empty selection; failed queries or links may return differently.
Recovery
| HTTP status | API code / shape | Cause | Next action |
|---|---|---|---|
| 200 | items[] empty, with paginator | No selected publication/page/query rows. | Check publication, page and intended filters; display an empty list. |
| Varies / no guaranteed JSON | Filter/query/linked-data/transport failure | A failed request may return a different format, not a normal empty page. | Use known fields, keep any request reference and ask the integration operator to inspect the failure. |
Inspect promotion configuration by ID
GET /api/v1/admin/promos/{id}
Read one promotion configuration in this publication.
Before you call
The result includes a sensitive redeemable code and linked metadata, rather than a validity decision. Send the token, publication key and known numeric promotion ID. Digit IDs are converted to integers; nondigit paths do not guarantee this JSON error.
Request
Body, filter, pagination and sort are ignored. Use ID 8201, not code EXAMPLE2026.
Response
HTTP 200 returns configuration and linked groups at the top level, without items/paginator. Fields are open-schema; dates, flags and limits are not combined into current validity.
Example: Inspect promotion 8201
Use the list’s fictional configuration. Related-field definitions apply even with empty group arrays.
curl "${WALLKIT_API_BASE}/api/v1/admin/promos/8201" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/promos/8201`);
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/promos/8201"
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 excerpt:
{
"id": 8201,
"title": "Example promotion",
"description": "Illustrative configuration only.",
"resource_id": 2001,
"code": "EXAMPLE2026",
"discount": 15,
"discount_type": "percent",
"currency": "USD",
"start_date": "2026-10-01 00:00:00",
"end_date": "2026-10-31 23:59:59",
"for_all_plans": false,
"for_all_bundles": false,
"for_all_content": false,
"for_all_ti_events": false,
"activations_limit": 100,
"created_at": "2026-10-01 12:00:00",
"updated_at": "2026-11-01 12:00:00",
"active": "1",
"available_for": {
"subscriptions": [],
"content": [],
"bundles": [],
"available_subscriptions": [],
"ti_event_tickets": []
},
"count_uses": 0
}
Alternative: Promotion not found
HTTP 404 response:
{
"error": "promo_not_found",
"error_description": "Promo not found",
"req_guid": "synthetic-request-reference"
}
No ID matched this publication. This does not establish global absence or code validity elsewhere.
Recovery
| HTTP status | API code / shape | Cause | Next action |
|---|---|---|---|
| 404 | promo_not_found / Promo not found | ID not found in selected publication. | Check publication and known record ID. Do not substitute the redemption code. |
| Routing-dependent | No guaranteed action-level JSON | Nondigit path does not match numeric registration. | Use the known numeric ID. |
| Varies / no guaranteed JSON | Lookup/linked-data/response-format/transport failure | Error response formats can vary. | Retain any request reference and ask the integration operator to inspect the failure. |
See shared errors. Read associated readers for the qualified reporting view.
Read associated reader rows
GET /api/v1/admin/promos/info/{id}
Read rows from promotion activations or an alternate succeeded-purchase join. This is neither a configuration object nor a unique-reader count.
Before you call
Rows contain personal reader data, application extra/settings and possibly a transaction summary. The promotion is publication-scoped; linked data can extend beyond it, and summaries search user-level transactions across publications. Do not use this as financial reconciliation or verified unique completed signups.
Send the token, publication key and numeric promotion ID. Numeric/missing-record behavior matches configuration detail. No reader ID is needed.
Request
No body is needed. The primary example uses the default activation-row selection.
| Query input | Type / requirement | Meaning and constraints |
|---|---|---|
| page | Optional integer; send 1 explicitly | Page of selected joined rows; no omitted-page request default established. |
| limit | Optional integer; default 10 | Send a positive page size, such as 10. No maximum is specified here. |
| filter | Optional JSON-string object; different from list Criteria/bracket filtering | Recognized key promoActivations.completed_signups selects the alternate branch when truthy. Use JSON boolean true/false; a nonempty string such as false is not equivalent to boolean false. Other keys do not add a general reader-filter contract. |
Default rows join users to this promotion’s activations. completed_signups:true instead joins promotion purchases to succeeded transactions. Both can repeat readers; alternate counts are purchase/join rows. sort/order/by are ignored and order is unspecified.
Response
HTTP 200 returns items and the common paginator, using reader and transaction fields. Totals count joined rows, not unique readers or revenue. The optional summary is selected separately from the alternate succeeded-transaction condition; it may be a different record.
Example: Read the first associated-reader page
This reader excerpt omits contact/address/social data, extra/settings and other defined fields. subscriptions is empty here. The optional transaction is also partial; it shows conditional fields, not verified matching or financial calculation.
curl "${WALLKIT_API_BASE}/api/v1/admin/promos/info/8201" \
-X GET \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
--get \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/promos/info/8201`);
url.search = new URLSearchParams({"page": "1", "limit": "10"}).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/promos/info/8201"
url += "?" + urlencode({'page': '1', 'limit': '10'})
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 excerpt:
{
"items": [
{
"id": 1002,
"email": "reader@example.com",
"subscriptions": [],
"transaction": {
"id": 9101,
"status": "succeeded",
"currency": "USD",
"price": 500,
"discount": 75,
"sub_total": 425,
"created_at": "2026-10-15 12:00:00"
}
}
],
"paginator": {
"current_page": 1,
"page": 1,
"total_pages": 1,
"total_items": 1,
"limit": 10
}
}
Alternatives: No associated rows, or no promotion
An existing promotion with no selected rows normally returns HTTP 200 items[] and paginator. Excerpt without paginator:
{
"items": []
}
A missing publication promotion returns HTTP 404:
{
"error": "promo_not_found",
"error_description": "Promo not found",
"req_guid": "synthetic-request-reference"
}
If no summary is assembled, transaction is omitted rather than necessarily null. Relevant transactions may still exist.
Recovery
| HTTP status | API code / shape | Cause | Next action |
|---|---|---|---|
| 200 | items[] empty, with paginator | Existing promotion has no selected joined rows for this page/branch. | Check page/branch and display an empty reporting state without inferring unique-user or financial totals. |
| 404 | promo_not_found / Promo not found | No promotion matches ID and publication. | Check the known promotion ID/publication. |
| 409 | promo_info_fail / Get promo info has failed | Failure while assembling reader information. | Retain request reference; ask the integration operator to inspect joins, reader context and linked data. |
| Varies / no guaranteed JSON | Uncaught runtime/routing/transport or other failure | Other errors can return a different format from the 409 response. | Keep available diagnostics and ask the integration operator to inspect the failure. |
See shared errors. Read promotion configuration for stored dates, limits and targets; those do not reconcile these rows or decide redemption.
Configuration fields and their limits
List and detail return stored promotion data. These 18 declared fields are not a complete closed schema. available_for and count_uses are added:
| Field | Type / presence | Meaning |
|---|---|---|
| id, resource_id | Integers; selected stored fields | Promotion ID and its publication record ID. |
| title, description | Stored text / nullable; selected | Configuration name and description. |
| code | Stored string / nullable; selected | Promotion/redemption code, not an authentication token. Handle it as confidential configuration and share it only with intended recipients. |
| discount | Integer; selected | Stored discount setting. No application, rounding or final-price calculation is performed. |
| discount_type | Stored text / nullable; selected | Configuration convention includes percent/amount; this read does not validate a closed enum or applicability. |
| currency | Stored string / nullable; selected | Currency code; amount units unspecified, no conversion. |
| start_date, end_date | Stored timestamp text / nullable; selected | Configured dates, timezone unspecified. These reads do not compare them with the current time. |
| for_all_plans, for_all_bundles, for_all_content, for_all_ti_events | Booleans; selected | Stored broad-target flags. They do not make linked arrays exhaustive or prove a reader/item qualifies. |
| activations_limit | Integer; selected | Configured limit. No zero-means-unlimited, remaining-quota or exhaustion result is established by these reads. |
| created_at, updated_at | Stored timestamp strings; selected | Record times, timezone unspecified. |
| active | Stored flag / nullable; selected, not uniformly normalized to boolean | Configuration state, not a computed currently-valid result. |
| available_for | Object; added | Exactly five linked-record arrays described below. |
| count_uses | Relation count; added | Number of associated activation rows, not unique readers, successful purchases, remaining quota or savings. |
Dates and active describe configuration. Codes and discounts do not establish successful redemption.
Linked-record groups
All five arrays are present, including empty ones. Linked records can belong to other publications. Subscriptions and Plans can be inactive or private; content shows stored metadata and its publication timestamp. Other linked objects follow their own field definitions. Duplicates and missing relations can cause repeated rows or failure; order is unspecified.
| available_for field | Type / presence | Fields and meaning |
|---|---|---|
| subscriptions[] | Array; present | General subscription with expanded immediate Plan:14 Plan fields and lightweight id,title,price,currency,period choices. Subscription timestamps/country_vat need Admin context. Next/downgrade retain compact Plans and defined nesting limits. |
| content[] | Array; present | 12 content fields and image meanings, without numeric ID, taxonomy, VAT or content_type. |
| bundles[] | Array; present | id,title,price,currency,created_at as below. No items expansion. Confirm the intended bundle context separately. |
| available_subscriptions[] | Array; present | Same subscription/Plan fields as subscriptions[]. A separately configured event-related set, not all available subscriptions or reader eligibility. |
| ti_event_tickets[] | Array; present | Event ticket fields with parent ti_event:18 ticket fields plus event. No passes, available quantity or Plan discounts. |
Linked bundles contain these fields:
| Field | Type / presence | Meaning |
|---|---|---|
| id | Integer; present | Bundle record ID. |
| title | Stored text / nullable; present | Bundle name. |
| price | Integer; present | Stored bundle price, units unspecified. |
| currency | Stored string / nullable; present | Currency code; no conversion. |
| created_at | Stored timestamp string; present | Creation time, timezone unspecified. |
Linked tickets have id,ti_event_id,title,slug,description,quantity,price,currency,min_quantity_order,max_quantity_order,status,start_date,end_date,is_private,active,is_applied_vat,vat_percent,extra with stored types. ti_event uses event fields: id,slug,title,description,location,timezone,registration_page,url,contact_email,status,start_date,end_date,active,is_virtual plus photo[] with slug/url. No event tickets, taxonomy or type expansion is added. Links/photos are stored metadata; stock and dates do not decide sale availability.
Reader fields and optional transaction
Rows use User fields with publication-specific values, plus subscriptions only. Identity membership defines full catalog, compact Plan, next/downgrade and conditional sponsorship-slot fields. Teams, tags, last_action and new authentication fields are not added.
Profile fields include contact/address/social data, photos, publication extra/UID/language/lock, activity, active/confirm/can_own_teams and conditional Admin settings/role. Application-defined extra/settings may contain sensitive values. Invalid membership mappings may be skipped; memberships need not be active/unexpired. A reader needs a publication relationship, and mapping failure can fail the operation.
| Row addition | Type / presence | Meaning |
|---|---|---|
| subscriptions[] | Array; added | Exact identity memberships above, empty if none selected by the mapping. |
| transaction | Object; conditional; omitted when not assembled, not guaranteed null | Optional source-derived transaction summary. Its association is not a reliable activation/financial reconciliation or complete/newest matching transaction. |
Transaction fields are conditional on source values being set; the full object is not guaranteed:
| Field | Type / presence | Meaning |
|---|---|---|
| id | Integer transaction ID; conditional | Transaction record identifier. |
| item_type | Stored value; conditional | Item-type value; transaction-level value can replace the embedded value. No closed enum asserted. |
| item_title | Stored text; conditional | Embedded transaction item title. |
| sub_title, plan_title | Stored text; conditional | Titles looked up using embedded item ID as a subscription reference and its Plan. Inspect the underlying transaction in your existing accounting records before interpreting these titles or reconciling amounts. |
| price, discount, sub_total | Stored embedded values; conditional | Reported amounts without extra summary casting, unit conversion, recomputation or reconciliation. |
| status, currency | Stored transaction values; conditional | Status and currency from the selected record, which can have a status other than success. |
| created_at | Stored timestamp string; conditional | Selected record time, timezone unspecified; not guaranteed newest. |
An optional summary can use a reader-level transaction from another publication, with a non-success status or an older timestamp. It may also be absent even when matching transactions exist. These rows are not a complete ledger or a reliable activation-to-payment match. Use the intended transaction records for payment success, net revenue, refunds, fees and savings.