JSON overview
JSON invoice bodies come in a wide range of shapes, but the vast majority
share the same core: a top-level invoice object with header fields, one or
more party sub-objects, address sub-objects, payment details, and a lines
array. Nuntiq's inbound framework ships a global format template that
covers this common nested-object shape out of the box.
Available shapes
- Generic JSON Invoice —
single-invoice nested-object body. Header fields at the root; supplier /
customer / bill-to / ship-to / payment as sub-objects;
lines,taxes,charges,discountsas arrays.
Additional shapes (batch envelopes, custom API bodies) can be layered on top of the same JSONPath authoring model as consultants encounter them.
Common patterns
- JSONPath locators. Loops carry a
jsonpathselector; fields carry a JSONPath string. Bare identifiers (invoiceNumber) are auto-prefixed with$.by the runtime, so the shortest and the fully-qualified form both work. - 1:1 scope loops (
recordType: nonewith ascopeTarget) for supplier, customer, bill-to, ship-to, and payment sub-objects. Each such loop navigates once into its own sub-object; child fields reference that sub-object via$.name,$.street, etc. - 1:many detail loops for line items, tax details, charges, and
discounts. Selectors of the form
$.lines[*]iterate the whole array; filter predicates ($.items[?(@.type=='line')]) work too. - Native types. JSON already distinguishes numbers, strings, booleans,
and nulls. The runtime coerces to the field's declared type (
text,number,date) and applies date parsing via the field'sdateFormattransform.