Skip to main content
GET
/
v1
/
reports
/
integrity
Get ledger integrity attestation
curl --request GET \
  --url https://api.scrip.dev/v1/reports/integrity \
  --header 'X-API-Key: <api-key>'
{
  "all_passed": true,
  "chain_head": {
    "created_at": "2026-06-10T12:00:00Z",
    "hash": "b3a1d9f8c2e4a7b6d1e3f5a8c9b2d4e6f7a1b3c5d7e9f2a4b6c8d0e1f3a5b7c9",
    "sequence_number": 48211
  },
  "hash_chain": {
    "anchored_at_genesis": false,
    "entries_verified": 1000,
    "pass": true,
    "violation_count": 0
  },
  "organization_id": "550e8400-e29b-41d4-a716-446655440000",
  "postings_balanced": {
    "pass": true,
    "violation_count": 0
  },
  "unsealed_entries": {
    "pass": true,
    "violation_count": 0
  },
  "value_conservation": {
    "pass": true,
    "violation_count": 0
  },
  "verified_at": "2026-06-10T12:00:00Z",
  "window": 1000
}
Returns a pass/fail attestation that your ledger is internally consistent and tamper-free: postings balance to zero, value is conserved, the hash chain verifies, and no entries are stuck unsealed. The response includes verified_at and the current chain_head. Record the head hash externally at each close; any later alteration of history changes it, making tampering detectable. Hash-chain verification is bounded by window (default 1000 entries, max 10000).
For how the hash chain works, see the Ledger guide. For usage patterns, see the Reporting guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Query Parameters

window
integer
default:1000

Number of most recent sealed journal entries to verify in the hash-chain check (1 to 10000)

Required range: 1 <= x <= 10000

Response

Integrity attestation

Ledger integrity attestation for your organization

all_passed
boolean

Whether every check below passed

Example:

true

chain_head
object

Current chain head; null when the organization has no sealed entries yet

hash_chain
object

Recomputed hashes over the verification window match the stored tamper-evident chain

organization_id
string<uuid>

Organization this attestation covers

Example:

"550e8400-e29b-41d4-a716-446655440000"

postings_balanced
object

Every journal entry's postings sum to zero

unsealed_entries
object

Journal entries past the sealing grace period that have not been sealed into the hash chain

value_conservation
object

Every asset's postings sum to zero across all accounts (no value created or destroyed)

verified_at
string<date-time>

When the verification ran (RFC 3339)

Example:

"2026-06-10T12:00:00Z"

window
integer

Hash-chain verification window that was applied (number of most recent sealed entries)

Example:

1000