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

TypeAPI/keyDescriptionExample use
textstringFree-form texttitle, body, vendor_name
numbernumberNumeric valuetotal, quantity, page_number
datedate / string (ISO)Date or datetimeeffective_date, invoice_date
booleanbooleanTrue/falseis_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

TypeDescriptionExample use
objectNested key-value structureaddress, party (name, role, contact)
arrayList of values or objectsline_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.