Skip to main content

Creating a new document

When you enter a document section (Invoices, Orders, Deliveries, Payments, Parties and Items), on the top right corner you will see a New [document type] button. Clicking on it displays the document editor. This view has two modes: Code view and Form view, switchable using the toggle in the upper-right corner.

Code view

Invoice editor
In code view, the editor presents the document as a JSON object. This mode is intended for users who prefer to work directly with the underlying structure of the invoice.
  • JSON Editor: When creating a new document, the editor loads a minimal boilerplate invoice object. Any missing or incomplete fields are highlighted with red squiggles. These markers correspond to validation issues—either required fields that have not been filled in or values that do not meet schema rules.
  • Build Button: The Build action validates the JSON against the defined GOBL schema. If the document is valid, the system enriches it with any required calculated or default data. You will only be able to save the invoice if the document is built and valid.
  • Error & Warning Drawer: A collapsible drawer appears at the bottom of the screen. It lists any errors or warnings identified in the current document, including missing properties, invalid values, or schema mismatches. Each entry links directly to the relevant line in the JSON. The drawer can be hidden when not needed.

Form view

Invoice editor
Switching to form view displays the same data into a structured, user-friendly layout with input fields. Form view ensures that the document can be created without interacting with code, code view gives full control to those who prefer manual editing.