API Reference

Ledger API

Immutable ledger records, certificates, and chain integrity

Endpoints in this group

GET/v1/ledger/records

List ledger records with pagination and filters

Parameters

ParameterInTypeReqDescription
pagequeryintegerNo
pageSizequeryintegerNo
eventTypequerystringNo
startDatequerystringNo
endDatequerystringNo
actorIdquerystringNo
documentHashquerystringNo
documentReferencequerystringNo

Responses

200Paginated list of ledger records401Unauthorized
FieldTypeReqDescription
dataRecord[]Yes
paginationPaginationYes

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/records" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
GET/v1/ledger/records/{id}

Get a single ledger record

Parameters

ParameterInTypeReqDescription
idpathstringYesRecord ID

Responses

200Ledger record details401Unauthorized404Record not found
FieldTypeReqDescription
idstringNo
firmIdstringNo
sequenceNumberintegerNo
eventTypestringNo
actorIdstringNo
actorFcaRefstring | nullNo
actorNamestringNo
documentHashstringNo
documentMetadataobjectNo
previousHashstring | nullNo
recordHashstringNo
chainHashstringNo
signaturestringNo
publicKeystringNo
timestampstring (date-time)No
reviewJobIdstring | nullNo

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/records/<id>" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
GET/v1/ledger/records/{id}/certificate

Get presigned URL for certificate PDF

Parameters

ParameterInTypeReqDescription
idpathstringYesRecord ID

Responses

200Presigned URL for certificate PDF401Unauthorized404Certificate not found
FieldTypeReqDescription
urlstring (uri)No
certificateIdstringNoID of the certificate

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/records/<id>/certificate" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
POST/v1/ledger/records/{id}/certificate

Issue a certificate on demand for a ledger record

On-demand certificate issuance for any ledger record outside the auto-issue allowlist. Idempotent: returns the existing certificate id if one was already issued for the record.

Parameters

ParameterInTypeReqDescription
idpathstringYesRecord ID

Responses

200Certificate already existed or was enqueued for generation401Unauthorized404Ledger record not found
FieldTypeReqDescription
certificateIdstring | nullNoExisting certificate id, or null if cert-gen was enqueued
statusstringNo
existingenqueued

Example request

curl
curl -X POST "https://api.bedrockcompliance.co.uk/v1/ledger/records/<id>/certificate" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
GET/v1/ledger/certificates

List all certificates for the authenticated firm

Responses

200List of certificates401Unauthorized

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/certificates" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
GET/v1/ledger/certificates/{id}

Get certificate metadata by id

Item pair of `listCertificates` — returns the full Certificate envelope. For the PDF download, use `GET /v1/ledger/records/{id}/certificate` instead.

Parameters

ParameterInTypeReqDescription
idpathstringYesCertificate ID

Responses

200Certificate envelope401Unauthorized404Certificate not found
FieldTypeReqDescription
idstringNo
ledgerRecordIdstringNo
firmIdstringNo
firmNamestringNo
firmFrnNumberstringNo
issuedAtstring (date-time)No
verificationUrlstring (uri)No
pdfUrlstring (uri)No
pdfStorageKeystringNo
metadataobjectNoEvent-specific snapshot — shape depends on the linked record's eventType. Carries `eventLabel`, optional `statusPill`, and `sections` (heading + labelled fields).

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/certificates/<id>" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
GET/v1/ledger/integrity

Chain integrity status with verification history

Responses

200Integrity status including last verification and history401Unauthorized
FieldTypeReqDescription
firmIdstringNo
totalRecordsintegerNo
lastVerificationobject | nullNo
recentVerificationsobject[]No

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/integrity" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
POST/v1/ledger/integrity/verify

Run a fresh chain verification

Recomputes every record hash from its payload fields and verifies chain links. The result is persisted and returned.

Responses

200Verification result with discrepancy detail (if any)401Unauthorized
FieldTypeReqDescription
verificationobjectNo
resultobjectNo

Example request

curl
curl -X POST "https://api.bedrockcompliance.co.uk/v1/ledger/integrity/verify" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
GET/v1/ledger/integrity/records/{id}/discrepancy

Compare a record against its immutable backup

Returns a field-by-field diff between the database row and the S3 immutable copy. If the record was deleted, `database` is null.

Parameters

ParameterInTypeReqDescription
idpathstringYesLedger record ID

Responses

200Discrepancy detail401Unauthorized404Record not found in database or S3
FieldTypeReqDescription
recordIdstringNo
sequenceNumberintegerNo
databaseobject | nullNo
immutableobject | nullNo
diffsobject[]No

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/integrity/records/<id>/discrepancy" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
POST/v1/ledger/integrity/records/{id}/restore

Restore a tampered record from its immutable backup

Overwrites the database row (or re-inserts a deleted record) from the S3 immutable copy. Requires FIRM_ADMIN or LEAD_REVIEWER role. A CHAIN_REPAIRED audit record is written to the ledger.

Parameters

ParameterInTypeReqDescription
idpathstringYesLedger record ID

Request body

FieldTypeReqDescription
confirmbooleanYesMust be true to proceed

Responses

200Restore result400Missing confirm: true401Unauthorized403Insufficient role404Record or immutable copy not found

Example request

curl
curl -X POST "https://api.bedrockcompliance.co.uk/v1/ledger/integrity/records/<id>/restore" \
  -H "X-Bedrock-Key: bk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "confirm": true
}'
GET/v1/ledger/integrity/missing/{sequenceNumber}

Find a deleted record by sequence number from S3

Scans the immutable S3 backup for a record with the given sequence number that no longer exists in the database. Used to recover deleted records detected by chain verification.

Parameters

ParameterInTypeReqDescription
sequenceNumberpathintegerYesThe sequence number of the missing record

Responses

200Discrepancy detail with database set to null and immutable copy from S3400Invalid sequence number401Unauthorized404No S3 record found for this sequence number
FieldTypeReqDescription
recordIdstringNo
sequenceNumberintegerNo
databaseobject | nullNo
immutableobject | nullNo
diffsobject[]No

Example request

curl
curl -X GET "https://api.bedrockcompliance.co.uk/v1/ledger/integrity/missing/<sequenceNumber>" \
  -H "X-Bedrock-Key: bk_live_your_api_key"
Bedrock AIAsk me anything about Bedrock

Hi! I'm Bedrock's AI assistant. I can answer questions about the product, pricing, compliance coverage, and integrations. What would you like to know?