$schema property declares which document type it is.
A document’s schema determines which properties are valid, which workflow templates can process it, and which apps and tax regimes will accept it.
Supported schemas
Every document is wrapped in a signed envelope whose
doc property carries the business document. The envelope and its header hold metadata about the document rather than business data, and are covered in Document contents.
Shared properties
The four billing schemas — invoice, order, delivery and payment — share a common set of properties.FAQ
Can I change a document's schema or type after it has been signed?
Can I change a document's schema or type after it has been signed?
No. Signing fixes the document’s digest, and both the schema and the type form part of the signed payload. Issue a correction against the original instead, or replicate it into a new document if it was never issued.
Can one workflow process more than one schema?
Can one workflow process more than one schema?
Yes. A workflow can branch on the schema of the incoming entry, which is how regimes with overlapping flows are handled — France’s invoicing workflows accept both invoices and status documents. See workflows and document schemas.