Skip to content

Schema

Schema version 0.3.0. 17 core record types.

Full field types, formats and constraints are in the API reference, which is generated from the same definitions. This page lists what each record asserts beyond the envelope every record carries.

The envelope

On every record, of every type:

  • id
  • type
  • record_class
  • schema_version
  • occurred_at
  • occurred_at_precision
  • recorded_at
  • asserted_by
  • authenticated_as
  • lawful_basis
  • on_behalf_of
  • delegation
  • device_id
  • supersedes
  • superseded_by
  • ext

Why superseded_by is not among them — it is derived, never stored — is 0002.

The records

party

  • kind
  • display_name
  • identifiers
  • contacts
  • primary_region

account

  • account_id
  • primary_party
  • auth_subject
  • status

delegation

  • delegator
  • delegate
  • scope
  • granted_at
  • expires_at
  • granted_via
  • evidence
  • revoked_at

membership

  • member
  • organisation
  • role
  • joined_at
  • left_at

facility

  • kind
  • operated_by
  • location
  • admin_region
  • capacity

plot

  • held_by
  • tenure
  • centroid
  • boundary
  • area
  • admin_region
  • local_name

planting

  • plot
  • crop
  • variety
  • season
  • area_planted

harvest

  • planting
  • plot
  • crop
  • quantity
  • grade

observation

  • subject_type
  • subject_ref
  • observation_type
  • value
  • method
  • instrument
  • media

lot

  • commodity
  • quantity
  • custodian
  • location
  • composed_of
  • grade

custody_transfer

  • lot
  • from_party
  • to_party
  • location
  • quantity
  • evidence

delivery

  • from_party
  • to_party
  • lot
  • fulfils
  • commodity
  • quantity
  • grade
  • location
  • agreed_price
  • evidence

delivery_confirmation

  • delivery
  • confirming_party
  • channel
  • note
  • evidence

agreement

  • kind
  • parties
  • commodity
  • quantity_committed
  • price_terms
  • delivery_window
  • season
  • agreed_at
  • evidence

obligation

  • kind
  • obligor
  • obligee
  • amount
  • due_at
  • arising_from

settlement_reference

  • obligation
  • amount
  • settled_at
  • rail
  • external_ref
  • verification_status
  • confirmed_by
  • evidence

retraction

  • target
  • reason_code
  • note

The schema is the only definition of what a record is. The kernel never restates a field, and neither does this page: it is generated from @clycites/schema on every build.