Guides - Administrator and support

API delta report, declared types versus runtime payloads

Use this report to compare what the documentation declares with what the shipped readers actually accept. Each row states the endpoint, the declared shape, the runtime shape stated in the reader, and the delta. A delta is one of mismatched, missing, renamed, nullable versus omitted, or differently serialized.

How to read this report

Scope is endpoints stated in this site pack. An endpoint not stated here is Unknown. Declared means the canonical contract on the response contract page. Runtime means the reader in this pack, either public/site.js, public/status.html, public/health.html, or APPKIT.md where those files state a shape.

  • Mismatched means the same field has a different meaning or type in the two shapes.
  • Missing means a declared field is not read, or a runtime field is not declared.
  • Renamed means the same value is carried under a different field name.
  • Nullable versus omitted means one shape allows an explicit null while the other omits the field, with no rule for the difference.
  • Differently serialized means the same value is encoded in a different format, such as a number versus a string.
  • No secret, token, vault item, card detail or internal address appears in any shape in this report.

Delta by endpoint

Work down the table in order. Fix a delta only in the additive order stated on the response contract page, keeping the runtime alias while the canonical field is added.

Declared versus runtime payloads, by endpoint
Endpoint and readerDeclared shapeRuntime shape stated in the readerDelta
POST /api/public/request, reader public/site.jsError is one object with code, message and request_id. Success has ok true, data and meta.Failure is a plain sentence in top level error. The support code is read from code, requestId, request_id or diagnosticCode. Success is read only as ok true with readable JSON, with no data object stated.Renamed and mismatched: error object versus plain sentence. Renamed: four alias names for one code value. Missing: data and meta are not read. Differently serialized: code is read as a short string and truncated before display.
GET /api/public/records/status/{code}, reader public/status.htmlDetail has ok, data as one object, and meta with request_id and checked_at. Record fields use snake_case.Body has ok true, a top level record object, a top level next_step value and a top level timeline list. Record fields are record_number, type_name, title, status, submitted_at, issued_at and closed_at. Timeline items have changed_at, new_status and public_message.Renamed: record, next_step and timeline are top level in runtime and inside data in the declared shape. Missing: request_id and checked_at are not read. Nullable versus omitted: a date field that is absent is skipped by the reader, while the declared shape states no null rule.
GET /healthz, reader public/health.htmlHealth keeps status ok at the top level, and the reader must accept status ok first and ok true second.Accepted only where the body is JSON and the status field is ok. The checked at time is generated on the device and is not read from the response.Mismatched: status ok string versus ok true boolean in the other readers. Missing: request_id and a server checked_at are not read. Differently serialized: checked_at is an ISO string from the device clock, not a server field.
POST /api/files and GET /api/files with ref, stated in APPKIT.mdList and detail envelopes in the declared contract apply as aliases where a list already states one.Unknown: success envelope not in supplied site pack. Unknown: file object fields not in supplied site pack.Missing: every field, including file identity and timestamps, is Unknown. Do not add a file field from memory. Supply a sample response from the app modules before a delta can be closed.
Signed-in list and detail endpoints under /api, not enumerated in this site packSuccess list has ok, data as a list, and meta with total, page, page_size, request_id and checked_at.Unknown: list envelope and pagination fields not in supplied site pack, beyond the six filter fields and the list order on the reports and setup page.Missing: total, page and page_size are Unknown. Differently serialized: no timestamp format is stated for these endpoints.

Dates, identifiers, numbers and enums

Read this table when a value looks correct but is encoded in the other format.

Serialization deltas by value kind
KindDeclared ruleRuntime rule stated in the readerDelta to fix
Dates and timestampsNew fields are ISO 8601 strings in UTC with a Z suffix.Status dates are read as numbers and rendered as locale dates, which is epoch milliseconds. Health time is an ISO string from the device.Differently serialized: epoch milliseconds versus ISO string for submitted_at, issued_at, closed_at, changed_at and checked_at. Accept both on read and write ISO strings in new responses, keeping an epoch millisecond alias only where a reader already requires it.
IdentifiersBusiness identity stays record_number. Database identifiers, where stated, are opaque strings never parsed by the client.Status identity is record_number, a business number. No reader in the pack states a database identifier format.Missing: database identifier format is Unknown. Renamed risk: a client must not parse record_number as a database identifier.
NumbersTotal counts distinct records across all pages. Page starts at the first page with rows.Status reader sends no total, page or page_size. The form reader sends no numeric field. File and signed-in lists are Unknown.Missing: total, page and page_size are Unknown on every endpoint in the pack. Differently serialized risk: a row count on one page must not be read as a total across all pages.
Enums and fixed labelsError code is a short fixed label in upper case with hyphens, such as SIGN_IN_REQUIRED, ROLE_NOT_ALLOWED, VALIDATION_FAILED and SERVER_ERROR.Form reader accepts any string in code, requestId, request_id or diagnosticCode, and health reader accepts only status with value ok. Status lookup sends no error code.Mismatched: free text support code versus a fixed label set. Missing: status lookup has no code field. Renamed: four alias names for one code value.
Nullable versus omittedError is one object on failure and is omitted on success. Data is omitted on failure.Status reader skips a date field where the value is empty, null or undefined, with no distinction between null and omitted. Form reader treats a missing error sentence as a status only message.Nullable versus omitted: state one rule per field, either omit the field or send an explicit null, and keep the reader tolerant of both until the rule is live.

Close each delta in order

Work through these steps in order. Each step ends with what you should see when it worked.

  1. Add the canonical field beside the runtime alias

    Return data, error object and meta while keeping record, next_step, timeline, status ok and the four code aliases with the same values. You should see the old reader and a new reader return the same record, list or error.

  2. Normalize codes to the fixed label set, keeping aliases

    Return error code as a fixed label and keep code, requestId, request_id and diagnosticCode as aliases. You should see the same support code whichever alias the server returns.

  3. Normalize timestamps on write, tolerate both on read

    Write ISO UTC strings in new fields, keep epoch millisecond aliases where the status reader requires them, and make every reader accept both. You should see the same instant rendered from either format.

  4. Supply the Unknown shapes before you rely on them

    For files and signed-in lists, supply a sample response from the app modules with field names, identifier format, timestamp format and pagination from the town office. Record each answer in setup notes. You should see Unknown replaced by a named sample or a written decision not to use the endpoint.

  5. Test on a test record, then publish

    Walk a test record through form submit, status lookup, file list and one signed-in list. Check success, each error code, empty list, page past the last page, and a draft that never appears in public search. You should see the same result from the old reader and the new reader before you publish.

Unified API response contract - API authorization rules - Search a public record - Reports and setup

Bring your endpoint list to the demo

Tell us which list or record you need first, and we will confirm its envelope, status codes and pagination with your town role list.

Request a demo