curl --request GET \
--url https://api.scrip.dev/v1/groups/{id}/statement \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/groups/{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/groups/{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/groups/{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/groups/{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/groups/{id}/statement")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/groups/{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 group statement
Returns a running-balance statement of a group wallet’s ledger activity for one asset, with opening and closing balances for the window. When program_id is provided, movements and balances are scoped to that program’s journal entries.
curl --request GET \
--url https://api.scrip.dev/v1/groups/{id}/statement \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/groups/{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/groups/{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/groups/{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/groups/{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/groups/{id}/statement")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/groups/{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"
}asset_id is required. Each row is one posting with its signed amount, bucket, action_type, journal entry, created_at, and the running balance after it. A successful response contains data, opening_balance, closing_balance, and pagination. Treat missing or malformed fields as an error rather than substituting an empty movement list or zero balance.
from and to select rows by the posting’s created_at. Both bounds are inclusive, and they do not reset the running balance. opening_balance is the balance before from, and closing_balance is the balance through to. Opening plus the rows in the window equals closing. Pass bucket to limit rows and balances to one or more buckets, such as bucket=AVAILABLE,DEFERRED. The balances cover the selected buckets together.
Pass program_id to include only journal entries recorded under that program. The filter applies to movements and all reported balances. It uses the entry’s program, which can differ from the program that originally issued a lot. Entries without a program_id, such as lot expirations, are excluded.
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.
event_timestamp, see Statements in the Reporting guide.Authorizations
API key passed in the X-API-Key header.
Path Parameters
Group ID
Query Parameters
Scope movements and balances to this program
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"