Schema field reference
This page is a reference for the schema field types and options available in Bundata. Use it when defining schemas in Schema Studio or via the API for schema-aware extraction and smart bites.
Primitive types
| Type | API/key | Description | Example use |
|---|---|---|---|
| text | string | Free-form text | title, body, vendor_name |
| number | number | Numeric value | total, quantity, page_number |
| date | date / string (ISO) | Date or datetime | effective_date, invoice_date |
| boolean | boolean | True/false | is_signed, has_amendments |
- text — No format constraint by default; use for any string. Optional max length where supported.
- number — Integer or decimal depending on configuration. Use for amounts, counts, page numbers.
- date — Prefer ISO 8601 (e.g.
YYYY-MM-DD) for consistency and filtering. See product docs for timezone handling. - boolean — Use for flags; extraction may derive from presence/absence of a clause or field.
Complex types
| Type | Description | Example use |
|---|---|---|
| object | Nested key-value structure | address, party (name, role, contact) |
| array | List of values or objects | line_items[], sections[], signatories[] |
- object — Define child fields. Use for a single structured block (e.g. one address per document).
- array — Element type can be primitive (e.g. array of strings) or object (e.g. array of
{ description, quantity, amount }). Use for repeated blocks like invoice line items or contract sections.
Required vs. optional
- required — Field must be present for the run to be considered successful for that document. Use sparingly; missing data can cause failures. See Schema design.
- optional — Field may be absent. Prefer optional for fields that don’t appear in every document (e.g. optional clauses, attachments).
Validation and constraints
- format — For dates, specify expected format (e.g.
YYYY-MM-DD) where configurable. - min/max — For numbers, optional min/max bounds. For text, optional max length.
- Product-specific options may exist (e.g. enum, pattern). Check Schema Studio or the API schema definition for your deployment.
API representation
Schemas are typically represented as JSON: an object with a fields array (or equivalent). Each field has name, type, required, and type-specific options. Example (conceptual):
{
"fields": [
{ "name": "title", "type": "text", "required": false },
{ "name": "effective_date", "type": "date", "required": false },
{ "name": "line_items", "type": "array", "items": { "type": "object", "fields": [...] } }
]
}
Exact schema is defined in the API reference for your plan.
Related
- Schema Studio: Field types — When to use each type.
- Schema design — Design principles.
- Extraction overview — How extraction uses schemas.