Documentation Index
Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
Use this file to discover all available pages before exploring further.
Scrip provides reporting endpoints for tracking program financials, browsing the ledger audit trail, and monitoring API usage. All reporting data is computed in real time from the double-entry ledger.
Ledger Summary
Get aggregated balances and flows across all assets in a program:
GET /v1/reports/ledger-summary?program_id=program-uuid
The response includes one entry per asset:
| Field | Description |
|---|
total_issued | Cumulative credits to participants (all time) |
total_redeemed | Cumulative value redeemed by participants (all time) |
total_expired | Cumulative value expired via lot expiration (all time) |
total_forfeited | Cumulative value forfeited via explicit forfeit actions (all time) |
current_balance | Net outstanding liability (issued minus redeemed minus expired minus forfeited) |
participant_count | Distinct participants holding this asset |
The program_id filter is optional. Omitting it returns summaries across all programs in the organization.
Program Activity
Compare activity across programs:
GET /v1/reports/program-activity
Returns one entry per program with:
| Field | Description |
|---|
event_count | Total events processed |
journal_count | Total ledger entries created |
total_issued | Cumulative credits via this program |
total_redeemed | Cumulative value redeemed via this program |
unique_participants | Distinct participants who earned or redeemed |
last_activity_at | Timestamp of the most recent ledger entry |
Use the since parameter to filter to programs with activity after a given timestamp:
GET /v1/reports/program-activity?since=2025-01-01T00:00:00Z
Journal Entries
The journal is the full audit trail of every ledger movement. Each entry represents an atomic set of postings (debits and credits) that balance to zero.
GET /v1/journal-entries?program_id=program-uuid
Filtering
| Filter | Description |
|---|
program_id | Entries for a specific program |
participant_id | Entries involving a specific participant |
external_id | Entries by external ID |
group_id | Entries involving a group |
asset_id | Filter by asset |
bucket | Filter by bucket (AVAILABLE, HELD, DEFERRED) |
event_id | Entries from a specific event |
rule_id | Entries created by a specific rule |
action_type | Filter by ledger action type (CREDIT, DEBIT, HOLD, RELEASE, FORFEIT, VOID_HOLD, MATURITY) |
reference_id | Filter by correlation ID to find all entries associated with a specific hold/release/settle flow |
from / to | Time range |
min_amount / max_amount | Posting amount range (signed: credits positive, debits negative) |
The entity filters (participant_id, external_id, group_id) are mutually exclusive.
Entry Detail
GET /v1/journal-entries/{id}
Returns the full entry with all postings. Each posting includes the entity type, bucket, asset, signed amount, and timestamp. Postings within an entry always sum to zero.
Transaction History
View a specific participant’s or program’s ledger history:
# Participant history
GET /v1/participants/{id}/activity/history
# Program history
GET /v1/programs/{id}/history
Both return a chronological list of ledger entries involving that entity. Useful for building balance history views or transaction receipts in your UI.
The participant history endpoint supports two time-range filters that can be combined:
| Filter | Filters on | Description |
|---|
from / to | created_at | When the journal entry was recorded in the system |
event_from / event_to | event_timestamp | When the originating event occurred in your system |
This dual-filter lets you distinguish between when a transaction was recorded and when the underlying event happened. Entries without an originating event fall back to created_at for event_from/event_to filtering.
Request Logs
Browse a log of every API request made to your organization:
Each entry includes the HTTP method, path, status code, duration, and authentication type. Use the detail endpoint to inspect the full request and response bodies:
| Filter | Description |
|---|
method | HTTP method (POST, GET, etc.) |
route_pattern | Route pattern (e.g., /v1/events) |
request_id | Specific request by X-Request-ID header |
status_min / status_max | Status code range |
from / to | Time range |
Usage Analytics
Get daily aggregated API usage metrics:
Returns one entry per day with total request count, error count (status >= 400), and average latency in milliseconds. Defaults to the last 30 days. Use from and to to specify a custom range.
Common Queries
| Goal | Endpoint | Filters |
|---|
| Total points outstanding | Ledger Summary | program_id |
| Program comparison | Program Activity | since |
| Participant statement | Journal Entries | participant_id |
| Debug a specific event | Event Impact | Full causal chain: rules, postings, state changes, balance impact |
| Breakage tracking | Ledger Summary | total_expired + total_forfeited fields |
| API error investigation | Request Logs | status_min=400 |