Skip to content

History

The record's history file: every entry with its status and each committed entry's receipt. records.history in the SDKs, GET .../history on the wire.

http
GET /api/v1/records/{recordType}/{record}/history

The history is the record as a file: every entry with its status, and for each committed entry its receipt. It is what the Shared Record's browser check runs on, what the standalone checker takes, and what the other side downloads to keep. It is the first thing to read after a write, and it is what the docs tell you to poll.

Call

typescript
const history = await pac.records.history({ record: 'build-2026-09-15-0417' });
for (const entry of history.entries) {
  console.log(entry.seq, entry.status, entry.code ?? '', entry.sentence ?? '');
}

What comes back

The body is the history file itself, exactly as the checker reads it, so the SDKs return it whole rather than reshaping it. The parts you read from code:

FieldWhat it is
recordKeyThe record's fixed key.
entries[]Every entry in order: seq, status (queued, committed, or failed), and for a committed entry its receiptId. A failed entry carries code and a plain sentence. A queued entry carries the number it will take. seq is the wire's count, from 0; the pages and the SDKs count the same entry from 1, so seq: 0 is Entry 1.
receipts[]One receipt per committed entry: the sealed record as it was committed, its seal, and what the check needs.
bundleDigestThe file's own fingerprint. A copy that was changed after export no longer produces it.
exportedAtWhen this file was produced.

The rest of the file is what the check needs and is read by the checker, the Shared Record, and records.check.

Paging

A history returns up to 5,000 entries at a time. fromSeq and toSeq bound the page on the wire, counted from 0; the SDKs take fromEntry and toEntry, counted from 1, and convert. When more remain the answer carries the next start in the X-Next-From-Seq header, which the SDKs read into nextFromSeq, a wire number.

typescript
let fromEntry = 1;
do {
  const page = await pac.records.history({ record: 'build-2026-09-15-0417', fromEntry });
  // page.entries
  fromEntry = page.nextFromSeq == null ? 0 : page.nextFromSeq + 1;   // the header is a wire number
} while (fromEntry > 0);

Download

Send Accept: application/octet-stream and the answer arrives as an attachment named record-history-{recordType}-{record}.json, which is the file to hand to someone who will check it without PacSpace.

Who can read it

Your workspace's key. Or a grant token, sent as ?grant=, with no key: a grant is a way to let software on the other side read this one record's receipts and history, made with POST .../grants. A person on the other side does not need either; they open the share link.

When the call is refused

CodeThe rule
RECORD_NOT_FOUND (404)No record exists for this id in your workspace.
RECORD_ENTRY_NOT_FOUND (404)This record has no committed entries in the requested range.
RECORD_BUNDLE_RANGE_INVALID (400)fromSeq and toSeq are whole numbers and toSeq is not below fromSeq.
RECORD_BUNDLE_GRANT_REQUIRED (403)Reading a history takes your workspace's key or a grant for this record.