curl --request GET \
--url https://api.scrip.dev/v1/participants/{id}/statement \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/participants/{id}/statement"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/participants/{id}/statement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/participants/{id}/statement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/participants/{id}/statement"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/participants/{id}/statement")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/participants/{id}/statement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"asset_id": "550e8400-e29b-41d4-a716-446655440000",
"bucket": "AVAILABLE",
"closing_balance": "350",
"data": [
{
"action_type": "CREDIT",
"amount": "100",
"bucket": "AVAILABLE",
"created_at": "2024-01-15T10:30:00Z",
"created_by_api_key_id": "770e8400-e29b-41d4-a716-446655440000",
"description": "Points earned",
"event_id": "660e8400-e29b-41d4-a716-446655440000",
"event_timestamp": "2024-01-15T10:30:00Z",
"journal_entry_id": "550e8400-e29b-41d4-a716-446655440000",
"posting_id": "880e8400-e29b-41d4-a716-446655440000",
"reference_id": "auth_7f3a9c21",
"rule_id": "990e8400-e29b-41d4-a716-446655440000",
"running_balance": "350"
}
],
"from": "2024-01-01T00:00:00Z",
"opening_balance": "250",
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
},
"to": "2024-02-01T00:00:00Z"
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "forbidden",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Insufficient permissions for this action"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Get participant statement
Returns a running-balance statement of a participant’s ledger activity for one asset, with opening and closing balances for the window.
curl --request GET \
--url https://api.scrip.dev/v1/participants/{id}/statement \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/participants/{id}/statement"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/participants/{id}/statement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/participants/{id}/statement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/participants/{id}/statement"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/participants/{id}/statement")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/participants/{id}/statement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"asset_id": "550e8400-e29b-41d4-a716-446655440000",
"bucket": "AVAILABLE",
"closing_balance": "350",
"data": [
{
"action_type": "CREDIT",
"amount": "100",
"bucket": "AVAILABLE",
"created_at": "2024-01-15T10:30:00Z",
"created_by_api_key_id": "770e8400-e29b-41d4-a716-446655440000",
"description": "Points earned",
"event_id": "660e8400-e29b-41d4-a716-446655440000",
"event_timestamp": "2024-01-15T10:30:00Z",
"journal_entry_id": "550e8400-e29b-41d4-a716-446655440000",
"posting_id": "880e8400-e29b-41d4-a716-446655440000",
"reference_id": "auth_7f3a9c21",
"rule_id": "990e8400-e29b-41d4-a716-446655440000",
"running_balance": "350"
}
],
"from": "2024-01-01T00:00:00Z",
"opening_balance": "250",
"pagination": {
"has_more": true,
"next_cursor": "YWJjMTIz"
},
"to": "2024-02-01T00:00:00Z"
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "forbidden",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Insufficient permissions for this action"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}event_timestamp. asset_id is required. Pass bucket to limit rows and balances to one or more buckets, such as bucket=AVAILABLE,DEFERRED. The balances cover the selected buckets together.
from and to select rows by the posting’s created_at. Both bounds are inclusive. opening_balance is the balance before from, and closing_balance is the balance through to. Opening plus the rows in the window equals closing. Balances count the account’s full history, so closing_balance is the participant’s balance as of to.
Rows created by a rule carry rule_id and event_id. A manual adjustment has neither. reference_id is the shared ID that links related rows, such as a hold and its release, or a pending redemption’s HOLD, RELEASE, and REDEMPTION.
event_timestamp, see Statements in the Reporting guide. For a period summary that does the classifying for you, see Get participant rollforward.Authorizations
API key passed in the X-API-Key header.
Path Parameters
Participant ID
Query Parameters
Asset to produce the statement for
Scope the statement (rows and running balance) to one or more buckets. Accepts one or more comma-separated values from AVAILABLE, HELD, DEFERRED (for example AVAILABLE,DEFERRED); rows and the running balance are scoped to the union of the listed buckets. Omitted, the statement covers all buckets
Start of statement window (RFC 3339), inclusive; applied to the journal entry posting time (created_at)
End of statement window (RFC 3339), inclusive; applied to the journal entry posting time (created_at)
Maximum number of results (default 50, max 200)
x >= 1Pagination cursor from previous response
Response
Statement page with running balances
Asset the statement covers
"550e8400-e29b-41d4-a716-446655440000"
Bucket scope, when the statement was requested for one or more buckets: the normalized list (trimmed, deduplicated, in the order requested) as a comma-joined string, for example "AVAILABLE,DEFERRED". Absent when the statement covers all buckets (running balance is then the total across buckets).
"AVAILABLE"
Scope balance as of the end of the window (the current balance when no to is given). Always equals the as-of(to) balance for the same entity/asset/bucket scope, regardless of pagination.
"350"
Statement lines, oldest first
Show child attributes
Show child attributes
Start of the statement window, when provided
"2024-01-01T00:00:00Z"
Scope balance immediately before the window ("0" when no from is given)
"250"
Pagination metadata for fetching subsequent statement pages
Show child attributes
Show child attributes
End of the statement window, when provided
"2024-02-01T00:00:00Z"