Data Contract Reference
Technical guidance on the data a document expects, how Epistola checks it, and example payloads.
User guide navigation
On this page
Data contract reference
Expected data describes the fields a template needs to generate a document. The explanation for users is in Expected Data.
Contract format
The Suite stores the expected data model as JSON Schema. Use it to describe:
- field names
- required values
- nested objects
- lists
- validation rules
The root of the schema always describes an object. Field names start with a letter or underscore, followed by letters, digits, and underscores. Schemas made in the visual editor declare JSON Schema Draft 7. If a schema does not declare $schema, Epistola uses Draft 2020-12.
Once connected systems depend on a field name, do not change that name any more. If the meaning of a field changes, add a new field.
Versions
A data contract has no versions of its own. It is part of the template and travels with the catalog release. Sometimes a release no longer accepts all input that the previous release accepted. For example, it removes a field or adds a required field without a default. Then that release needs a new major version.
A request can pin a versionRange, such as ^1.4.0. Then Epistola renders the highest release within that range. A caller on ^1.4.0 does not move to version 2.0.0 until it changes the range. How releases reach documents is in From template to document.
Default values
A field’s JSON Schema default stands in when the data leaves the field out. Generation, preview, and data validation fill in defaults before they validate. So a caller may leave out a required field that has a default. Only an absent key is filled in: an explicit null is validated as sent.
Documentation
Guided tour
Exercises
Integration guides
Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →