Skip to main content
Veyndi AML
Documentation contents

API reference

Platform

32 operations in this area of the contract. Every one declares the permission it requires.

Contract version 0.3.0All areas

Operations

GET/v1/admin/commercial/offers

List immutable commercial offer versions

Required permission: platform.commercial.managelistCommercialOffers

Platform catalogue with exact deployment, base-term and offer-key predicates before LIMIT and genuine created_at/id order in either direction. Cursors bind caller institution, all filters and order. Normal supplied terms and components remain unchanged; this is not an invoice.

Show parameters and responses

Parameters

NameInTypeDescription
sortquerycreated_at_desc | created_at_asc—
deployment_modequerysaas | onprem—
base_term_typequerysaas_subscription | onprem_licence—
offer_keyquerystring—
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.

Responses

  • 200Offer versionsCommercialOfferPage
POST/v1/admin/commercial/offers

Create an immutable offer version

Required permission: platform.commercial.managecreateCommercialOffer

Records supplied terms without inventing a price. Money is optional integer minor units plus a supported ISO currency. SaaS supports monthly/annual subscriptions and optional allowances/rates. On-prem supports one-time/annual licence terms and cannot commit without a separately typed annual support/maintenance component. Add-ons and professional services remain separate components.

Show parameters and responses

Responses

  • 201Immutable offer versionCommercialOffer
  • 400—
  • 409The offer key/version already exists
GET/v1/admin/commercial/offers/export

Export the complete authorized commercial metadata register as CSV or Excel

Required permission: platform.commercial.manageexportCommercialOfferRegister

One authenticated platform-pool repeatable-read snapshot, using the same supplied read connection on all pages. After that snapshot commits, a separate caller-tenant transaction non-consumingly rechecks the active original caller identity, original/current required permission intersection and any existing support-grant binding and current expiry/revocation, then commits the exact artifact digest, row count, selected scope and ordering receipt. Bytes are withheld on either phase failure. No cross-pool atomicity claim or platform app-table grants. Own-history remains own tenant; management remains explicit platform authority. Free notes/source, operator identity/labels, free revision reason and component private descriptions are excluded before JSON capture. Monetary terms and revision metadata use exact decimal strings; missing supplied money remains absent, never zero. No charges, invoices, licence assertions or commercial write transitions are added. Maximum 10,000 rows and 32 MiB; no partial artifact; cursor input is refused. Columns: id, offer_key, version, display_name, deployment_mode, base_term_type, billing_cadence, allowance_interval, transaction_allowance, user_allowance, currency, base_amount_minor, transaction_overage_minor, user_overage_minor, available_from, available_until, created_at.

Show parameters and responses

Parameters

NameInTypeDescription
formatrequiredquerycsv | xlsx—
sortquerycreated_at_desc | created_at_asc—
deployment_modequerysaas | onprem—
base_term_typequerysaas_subscription | onprem_licence—
offer_keyquerystring—

Responses

  • 200Complete metadata with retained caller audit receipt
  • 400—
  • 403—
  • 503—
GET/v1/admin/feature-flags

Read effective tenant feature switches

Required permission: platform.feature_flags.managelistTenantFeatureFlags

Uses the tenant database and works offline. Only declared product capabilities are accepted; switches cannot bypass authorization or compliance controls.

Show parameters and responses

Responses

  • 200Effective switch values and optimistic revisionsobject
PUT/v1/admin/feature-flags/{flagKey}

Audit a tenant feature switch change

Required permission: platform.feature_flags.managesetTenantFeatureFlag
Show parameters and responses

Parameters

NameInTypeDescription
flagKeyrequiredpathoperations.job_console | ai.assistance—

Responses

  • 200Committed audited changeobject
  • 404—
  • 409—
GET/v1/admin/jobs

List retained background jobs for the authenticated tenant

Required permission: platform.jobs.managelistAdminJobs

Operational metadata only: arguments, errors, metadata targets and global sweep jobs are excluded before JSON leaves the tenant reader. Exact state/kind/queue filters run before LIMIT. Numeric bigint ID ordering supports id_desc and id_asc without JavaScript number conversion. Canonical cursors bind tenant, all filters and order. The legacy unfiltered id_desc before/next_before walk remains supported; before cannot be combined with a canonical cursor, a filter or ascending order.

Show parameters and responses

Parameters

NameInTypeDescription
limitqueryinteger—
beforequerystring—
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.
sortqueryid_desc | id_asc—
statequeryavailable | cancelled | completed | discarded | pending | retryable | running | scheduled—
kindquerystring—
queuequerystring—

Responses

  • 200Retained tenant jobsAdminJobPage
  • 400—
POST/v1/admin/jobs/{jobID}/discard

Audit and discard a queued tenant job

Required permission: platform.jobs.managediscardAdminJob

Atomically records the reason and discards available, retryable, scheduled or pending work. Running or finalized work is refused.

Show parameters and responses

Parameters

NameInTypeDescription
jobIDrequiredpathstring—

Responses

  • 200Audited state transitionAdminJobTransition
  • 404—
  • 409—
POST/v1/admin/jobs/{jobID}/retry

Audit and retry a failed or cancelled tenant job

Required permission: platform.jobs.manageretryAdminJob

Atomically records the operator reason and makes a retryable, discarded or cancelled job available. Running and completed jobs are refused.

Show parameters and responses

Parameters

NameInTypeDescription
jobIDrequiredpathstring—

Responses

  • 200Audited state transitionAdminJobTransition
  • 404—
  • 409—
GET/v1/admin/jobs/export

Export all matching retained tenant job metadata as CSV or Excel

Required permission: platform.jobs.manageexportAdminJobRegister

Uses one tenant repeatable-read snapshot and the same tenant-owned filtered reader on every page. Only id, kind, queue, state, attempt, max_attempts, created_at, scheduled_at and finalized_at enter the capture. Job args, errors, metadata targets, other tenants and global sweep work never enter the artifact. The job-console feature switch and current platform.jobs.manage permission remain required. Audit digest and complete row count commit in the same snapshot transaction before bytes are delivered. Up to 10,000 rows and 32 MiB; no partial artifact. Each reader page remains bounded to 100 rows. Cursor and legacy before input are refused. Retry/discard/cancellation semantics are unchanged.

Show parameters and responses

Parameters

NameInTypeDescription
formatrequiredquerycsv | xlsx—
sortqueryid_desc | id_asc—
statequeryavailable | cancelled | completed | discarded | pending | retryable | running | scheduled—
kindquerystring—
queuequerystring—

Responses

  • 200Complete tenant metadata with committed digest receipt
  • 400—
  • 403—
  • 503—
POST/v1/admin/key-rotations

Propose a tenant subject-DEK root-key rewrap ceremony

Required permission: platform.key_rotation.manageproposeSubjectDEKRotation

The source must be the active configured root and the target must already be configured but inactive. A distinct system administrator approves the resulting maker-checker request. Approval installs an irreversible write barrier for the source while it is still active; it does not switch keys or rewrap data. New subject and audit-anchor writes may therefore refuse during the deliberately short operator cutover. There is no cancel/unblock operation and this endpoint never authorizes physical root removal.

Show parameters and responses

Responses

  • 201Pending four-eyes approval; no barrier or wrapper has changed yetApprovalRequest
  • 409A proposal is already pending or the source/target state is not valid
  • 503The provider cannot enumerate every configured root, so rotation refuses fail closed
GET/v1/admin/key-rotations/{rotationID}

Read rotation progress, readiness and retirement dependencies

Required permission: platform.key_rotation.managegetSubjectDEKRotation

Distinguishes the expected approved-awaiting-key-switch phase from a runnable or blocked configuration. Dependency counts are tenant-scoped. Immutable historical identifier blind indexes and audit anchors normally keep `tenant_dependencies_clear` false, and every tenant would have to be assessed before a process-wide software root could even be considered for a separate retirement ceremony. This API always reports `physical_retirement_supported: false`.

Show parameters and responses

Parameters

NameInTypeDescription
rotationIDrequiredpathstring—

Responses

  • 200Durable rotation cursor and fail-closed readinessSubjectDEKRotationReadiness
  • 404—
POST/v1/admin/key-rotations/{rotationID}/run

Start or resume bounded subject-DEK wrapper batches

Required permission: platform.key_rotation.managerunSubjectDEKRotation

Refuses until the approved target is active, the source remains configured, provider enumeration is complete and both key fingerprints still match approval. The worker authenticates and rewraps at most 100 subject-DEK envelopes per transaction, records immutable per-subject evidence, and transactionally enqueues the next page. It never decrypts or rewrites subject fields. Repeating this call while work is active is idempotent. It does not remove the source root.

Show parameters and responses

Parameters

NameInTypeDescription
rotationIDrequiredpathstring—

Responses

  • 202Bounded resumable work acceptedSubjectDEKRotationReadiness
  • 404—
  • 409Awaiting target activation, blocked, or already complete
GET/v1/admin/tenants/{tenantID}/commercial

One tenant's commercial summary

Required permission: platform.commercial.managegetAdminCommercialSummary

Vendor control-plane read. It does not grant access to customer/AML records.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—

Responses

  • 200Recorded terms and usage coverageCommercialSummary
POST/v1/admin/tenants/{tenantID}/commercial/agreements

Record a tenant commercial agreement

Required permission: platform.commercial.managecreateCommercialAgreement

Links an immutable offer version to a tenant, with an explicit half-open term and IANA billing timezone. Selected components must belong to that exact offer; on-prem terms require selected annual support. This operation records commercial state only—it does not take payment, issue an invoice, enable a vendor feed or change tenant lifecycle.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—

Responses

  • 201Agreement and first immutable history revisionCommercialAgreement
  • 400—
  • 404—
  • 409A live agreement or agreement reference already exists
GET/v1/admin/tenants/{tenantID}/commercial/agreements/{agreementID}/history

Immutable history for a managed tenant agreement

Required permission: platform.commercial.managelistAdminCommercialAgreementHistory

Filters apply before LIMIT. Cursors bind caller institution, selected tenant, agreement, read authority mode, filters and the actual stored revision direction.

Show parameters and responses

Parameters

NameInTypeDescription
sortqueryrevision_desc | revision_asc—
statusqueryprovisioning | current | renewal_due | grace | past_due | disputed | ended | not_applicable—
event_typequerycreated | status_changed—
tenantIDrequiredpathstring—
agreementIDrequiredpathstring—
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.

Responses

  • 200Typed selected-agreement revisions in the requested stored revision orderCommercialHistoryPage
GET/v1/admin/tenants/{tenantID}/commercial/agreements/{agreementID}/history/export

Export the complete authorized commercial metadata register as CSV or Excel

Required permission: platform.commercial.manageexportAdminCommercialAgreementHistory

One authenticated platform-pool repeatable-read snapshot, using the same supplied read connection on all pages. After that snapshot commits, a separate caller-tenant transaction non-consumingly rechecks the active original caller identity, original/current required permission intersection and any existing support-grant binding and current expiry/revocation, then commits the exact artifact digest, row count, selected scope and ordering receipt. Bytes are withheld on either phase failure. No cross-pool atomicity claim or platform app-table grants. Own-history remains own tenant; management remains explicit platform authority. Free notes/source, operator identity/labels, free revision reason and component private descriptions are excluded before JSON capture. Monetary terms and revision metadata use exact decimal strings; missing supplied money remains absent, never zero. No charges, invoices, licence assertions or commercial write transitions are added. Maximum 10,000 rows and 32 MiB; no partial artifact; cursor input is refused. Columns: id (agreement/revision identity), agreement_id, revision, event_type, offer_version_id, status, renewal_mode, term_start, term_end, grace_until, billing_timezone, occurred_at.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—
agreementIDrequiredpathstring—
formatrequiredquerycsv | xlsx—
sortqueryrevision_desc | revision_asc—
statusqueryprovisioning | current | renewal_due | grace | past_due | disputed | ended | not_applicable—
event_typequerycreated | status_changed—

Responses

  • 200Complete metadata with retained caller audit receipt
  • 400—
  • 403—
  • 503—
POST/v1/admin/tenants/{tenantID}/commercial/agreements/{agreementID}/status

Transition commercial agreement status

Required permission: platform.commercial.manageupdateCommercialAgreementStatus

Follows the closed lifecycle graph and appends an immutable revision. Past due and disputed are visible commercial states, never automatic AML suspension or quota gates.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—
agreementIDrequiredpathstring—

Responses

  • 200Agreement in its new commercial stateCommercialAgreement
  • 400—
  • 404—
  • 409Concurrent revision conflict
GET/v1/admin/upload-quarantine

Rejected-upload metadata and verified reupload status

Required permission: platform.jobs.managelistUploadQuarantine

Filters apply before the bounded tuple page. Cursors bind tenant, scope and order. Old unbound cursors must restart. Every read rechecks current tenant permissions.

Show parameters and responses

Parameters

NameInTypeDescription
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.
kindquerydocument | case_attachment | validation_evidence—
statusquerypending | retry_requested | dismissed | recovered—
sortquerycreated_at_desc | created_at_ascIndexed tuple order; filter/order/tenant changes require a new cursor walk.

Responses

  • 200Quarantine metadata; no file bytes, filenames or subject referencesUploadQuarantinePage
  • 400—
  • 403—
  • 503—
POST/v1/admin/upload-quarantine/{quarantineID}/disposition

Request a fresh scan or dismiss a rejected upload

Required permission: platform.jobs.managedispositionUploadQuarantine
Show parameters and responses

Parameters

NameInTypeDescription
quarantineIDrequiredpathstring—

Responses

  • 200Audited disposition recorded; rejected bytes can never be releasedUploadQuarantineDisposition
  • 409—
GET/v1/commercial/agreements/{agreementID}/history

Immutable history for this tenant's agreement

Required permission: tenancy.commercial.readlistCommercialAgreementHistory

Filters apply before LIMIT. Cursors bind caller institution, selected tenant, agreement, read authority mode, filters and the actual stored revision direction.

Show parameters and responses

Parameters

NameInTypeDescription
sortqueryrevision_desc | revision_asc—
statusqueryprovisioning | current | renewal_due | grace | past_due | disputed | ended | not_applicable—
event_typequerycreated | status_changed—
agreementIDrequiredpathstring—
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.

Responses

  • 200Typed selected-agreement revisions in the requested stored revision orderCommercialHistoryPage
GET/v1/commercial/agreements/{agreementID}/history/export

Export the complete authorized commercial metadata register as CSV or Excel

Required permission: tenancy.commercial.readexportOwnCommercialAgreementHistory

One tenant RLS repeatable-read snapshot, using the same supplied read connection on all pages. After that snapshot commits, a separate caller-tenant transaction non-consumingly rechecks the active original caller identity, original/current required permission intersection and any existing support-grant binding and current expiry/revocation, then commits the exact artifact digest, row count, selected scope and ordering receipt. Bytes are withheld on either phase failure. No cross-pool atomicity claim or platform app-table grants. Own-history remains own tenant; management remains explicit platform authority. Free notes/source, operator identity/labels, free revision reason and component private descriptions are excluded before JSON capture. Monetary terms and revision metadata use exact decimal strings; missing supplied money remains absent, never zero. No charges, invoices, licence assertions or commercial write transitions are added. Maximum 10,000 rows and 32 MiB; no partial artifact; cursor input is refused. Columns: id (agreement/revision identity), agreement_id, revision, event_type, offer_version_id, status, renewal_mode, term_start, term_end, grace_until, billing_timezone, occurred_at.

Show parameters and responses

Parameters

NameInTypeDescription
agreementIDrequiredpathstring—
formatrequiredquerycsv | xlsx—
sortqueryrevision_desc | revision_asc—
statusqueryprovisioning | current | renewal_due | grace | past_due | disputed | ended | not_applicable—
event_typequerycreated | status_changed—

Responses

  • 200Complete metadata with retained caller audit receipt
  • 400—
  • 403—
  • 503—
GET/v1/commercial/summary

This tenant's commercial summary

Required permission: tenancy.commercial.readgetCommercialSummary

Own-tenant, read-only view of the recorded agreement, immutable offer version, entitlement-only components, commercial status and usage evidence. Missing agreement or measurement is labelled unavailable rather than rendered as zero. A sanctions or adverse-media add-on is never proof that a provider feed is licensed or connected.

This is not an invoice or payment statement, and a past-due/disputed status does not suspend AML, screening or ingestion. Suspension remains the separate explicit tenant lifecycle operation.

Show parameters and responses

Responses

  • 200Recorded commercial terms and coverageCommercialSummary
GET/v1/iam/impersonation-grants/export

Export the complete authorized metadata register as CSV or Excel

Required permission: iam.impersonation.readexportSupportAccessRegister

A single tenant repeatable-read snapshot with tenant RLS and one declared status cutoff. Excludes platform_actor, free reason and reference before JSON capture. This is not an estate-wide support reader. All pages use the same read connection. After the read snapshot commits, a separate caller-tenant transaction rechecks current active identity, original permission ceiling and any existing grant binding without consuming another support use, then commits the digest/row-count audit receipt. Bytes are withheld on either phase failure. There is no cross-pool atomicity claim. No added platform app-table privileges. Maximum 10,000 rows/32 MiB; no partial artifact; cursor input is refused. CSV formulas are escaped and Excel cells are text. Metadata columns: id, reason_code, status, granted_at, expires_at, revoked_at, first_used_at, last_used_at, use_count.

Show parameters and responses

Parameters

NameInTypeDescription
formatrequiredquerycsv | xlsx—
statusqueryactive | expired | revoked—
reason_codequerysupport_ticket | incident | migration | audit—
sortquerygranted_at_desc | granted_at_asc—

Responses

  • 200Complete authorized metadata with audited artifact digest
  • 400—
  • 401—
  • 403—
  • 503—
GET/v1/tenants

Tenants visible to the caller

Required permission: tenancy.tenant.readlistTenants

**Your own tenant, unless you are a platform operator.** `tenancy.tenant.read` is a read of your own institution's record and returns exactly one row. Seeing the estate requires `tenancy.tenant.write`.

That distinction is a fix, not a nicety. This operation previously ran an unfiltered list inside a platform transaction and returned it to anybody holding `tenancy.tenant.read` — which the ng-core pack grants to `system_admin`, `executive` and `auditor`. Three of the seven BRD §4.1 personas could enumerate every other institution on the installation: slug, legal name, segment, data residency and status.

The estate view is resumable with a caller/authority/status/order-bound `cursor`, keyed on (`created_at`, `id`) in either selected direction. Changed authority requires a new walk. The single-tenant view returns at most its own matching row and carries no cursor, because a cursor on your own record would claim there is more of it.

Show parameters and responses

Parameters

NameInTypeDescription
sortquerycreated_at_desc | created_at_asc—
statusqueryprovisioning | active | suspended | closed—
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.

Responses

  • 200TenantsTenantPage
POST/v1/tenants

Provision an institution

Required permission: tenancy.tenant.writecreateTenant

The platform control plane. Creates the tenant in **`provisioning`**, never `active`: the authenticator refuses every request from a tenant that is not active, so a tenant left provisioning cannot serve traffic until a content pack has been installed and an administrator provisioned. Creating it active would open a door into an installation with no roles in it (Q11).

`slug` is the subdomain and cannot be changed afterwards — every IdP redirect URI and webhook callback binds to it, so renaming is a migration with a cutover rather than an edit.

Show parameters and responses

Responses

  • 201Provisioned, awaiting activationTenant
  • 400The slug is malformed or reserved
  • 409That slug is already in use
GET/v1/tenants/{tenantID}

One tenant

Required permission: tenancy.tenant.readgetTenant

Without `tenancy.tenant.write` a caller may read only their own tenant, and asking for another id returns the same `404` a non-existent id returns. A `403` would confirm the tenant exists, which is the fact being withheld.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—

Responses

  • 200The tenantTenant
  • 404—
PATCH/v1/tenants/{tenantID}

Correct a tenant's metadata

Required permission: tenancy.tenant.writeupdateTenant

Replaces display name, segment and residency together rather than patching single fields. A partial update over three columns needs three "was this key present" checks and the one that gets forgotten silently blanks a column — `data_residency` defaulting itself back to empty would put a tenant outside the BRD §9 residency check while looking like a rename.

Status is **not** settable here. See `POST /v1/tenants/{tenantID}/status`.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—

Responses

  • 200The updated tenantTenant
  • 422—
POST/v1/tenants/{tenantID}/status

Suspend, resume or close a tenant

Required permission: tenancy.tenant.writesetTenantStatus

Its own operation rather than a field on the PATCH, because the blast radius is different in kind: a suspended tenant has **every** request refused by the authenticator with `tenant-inactive` from the moment this returns. An act with that reach should not be reachable by a form that also fixes a typo in the display name.

A `reason` is required for anything but a resume. The audit row is the only place the "why" survives, and "who suspended this bank, and why" is asked after the fact.

Show parameters and responses

Parameters

NameInTypeDescription
tenantIDrequiredpathstring—

Responses

  • 200The tenant in its new stateTenant
  • 422—
GET/v1/tenants/export

Export the complete authorized metadata register as CSV or Excel

Required permission: tenancy.tenant.readexportTenantRegistry

A single platform repeatable-read snapshot of authorized registry metadata. Callers without tenancy.tenant.write receive only their own institution. No identity-provider, provisioning, quota or invitation configuration is captured. All pages use the same read connection. After the read snapshot commits, a separate caller-tenant transaction rechecks current active identity, original permission ceiling and any existing grant binding without consuming another support use, then commits the digest/row-count audit receipt. Bytes are withheld on either phase failure. There is no cross-pool atomicity claim. No added platform app-table privileges. Maximum 10,000 rows/32 MiB; no partial artifact; cursor input is refused. CSV formulas are escaped and Excel cells are text. Metadata columns: id, slug, display_name, status, deployment_mode, isolation_strategy, data_residency, segment, created_at, updated_at.

Show parameters and responses

Parameters

NameInTypeDescription
formatrequiredquerycsv | xlsx—
sortquerycreated_at_desc | created_at_asc—
statusqueryprovisioning | active | suspended | closed—

Responses

  • 200Complete authorized metadata with audited artifact digest
  • 400—
  • 401—
  • 403—
  • 503—
GET/v1/usage

Recorded usage for this tenant

Required permission: platform.usage.readlistUsage

Returns measurements that have already been **recorded**, in the requested global period/ID order. A period nobody measured comes back absent, not zero: those are different facts, and conflating them reports a quiet month for a tenant whose measurement simply never ran.

These rows are usage evidence, not invoices or payments. Open rows may be corrected; closed rows name the IANA billing timezone and cannot be changed.

Show parameters and responses

Parameters

NameInTypeDescription
period_startquerystringInclusive lower bound, RFC 3339. A timestamp rather than a date, because `2026-08-01` means two different instants in Lagos and in UTC.
period_endquerystringExclusive upper bound, RFC 3339. The window is half-open.
limitqueryintegerPage size, capped at 200.
cursorquerystringOpaque keyset cursor from a previous response. Offset pagination is deliberately not offered: `OFFSET 500000` is a table scan, and if it were offered it would be used (ADR-0012). Only the collections that document this parameter can be resumed. The rest report `truncated: true` and refuse a cursor rather than silently returning the first page again — see the `truncated` field on the page schemas.
metricquerytransaction.count | user.active—
statequeryopen | closed—
sortqueryperiod_start_desc | period_start_asc—

Responses

  • 200Recorded measurementsUsagePage
GET/v1/usage/export

Export recorded usage measurements as CSV or Excel

Required permission: platform.usage.readexportUsageRegister

Uses the same authorized filtered measurement reader in one repeatable-read tenant snapshot. Starts at the first matching row; cursor input is refused. Up to 10,000 rows/32 MiB, with no partial artifact. Audits SHA-256 and row count before returning bytes. CSV formulas are escaped and Excel cells are text. Recorded metric values, half-open periods, method, measurement state, billing timezone and closure time are included. Missing measurements remain absent. No invoices or charges are calculated.

Show parameters and responses

Parameters

NameInTypeDescription
formatrequiredquerycsv | xlsx—
period_startquerystringInclusive lower bound, RFC 3339. A timestamp rather than a date, because `2026-08-01` means two different instants in Lagos and in UTC.
period_endquerystringExclusive upper bound, RFC 3339. The window is half-open.
metricquerytransaction.count | user.active—
statequeryopen | closed—
sortqueryperiod_start_desc | period_start_asc—

Responses

  • 200Complete recorded measurements and audited digest
  • 400—
  • 403—
  • 503—
POST/v1/usage/measurements

Measure and record a period

Required permission: platform.usage.readmeasureUsage

`POST`, not `GET`, because it **writes**. The snapshot is the fact; the query that produced it is not repeatable once retention has purged the source rows, so a live count would let a closed period's usage change retroactively or vanish.

The window is **half-open**: `[period_start, period_end)`. A closed range double-counts a transaction booked exactly at a boundary midnight into two months. Timestamps rather than dates, because `2026-08-01` is two different instants in Lagos and in UTC — an hour of a bank's transactions either side of an invoice line.

Re-measuring an open period corrects the recorded row in place rather than appending a second one and is refused after closure. Maximum window: one year. A daily run-on-start worker closes the previous local calendar month from the agreement's explicit IANA timezone; its half-open period key makes retries idempotent.

Show parameters and responses

Parameters

NameInTypeDescription
period_startrequiredquerystringInclusive lower bound, RFC 3339.
period_endrequiredquerystringExclusive upper bound, RFC 3339. A transaction booked exactly here belongs to the next period.

Responses

  • 201The measurements recorded for the periodUsagePage
  • 400The window is empty, inverted or longer than a year
  • 422—