Skip to main content

Document

A generated document attached to an order (invoice, credit note, delivery note, …). Each document points at a static rendered file plus the JSON config used to render it.

type Document implements Node {
id: ID!
config: JSON!
deepLinkCode: String!
documentNumber: String
downloadUrl: String!
sent: Boolean
static: Boolean
dependentDocuments(
first: Int = 10
after: String
filter: DocumentFilterInput
): DocumentConnection
documentType: DocumentType
order: Order
referencedDocument: Document
}

Fields​

Document.id ● ID! non-null scalar​

Global identifier for this entity.

Document.config ● JSON! non-null scalar​

JSON object holding the rendering input captured at document creation (customer address, totals, line items, …).

Random code used as part of the public download URL so the file can be served without an authenticated session.

Document.documentNumber ● String scalar​

Human-readable document number assigned at render time (e.g. invoice number). Format is controlled by the document type's number range.

Document.downloadUrl ● String! non-null scalar​

Public download URL for the rendered file: /api/_action/document/{id}/{deepLinkCode}. Stable for the lifetime of the document.

Document.sent ● Boolean scalar​

True once the document was marked as sent to the customer (e.g. an invoice email was dispatched).

Document.static ● Boolean scalar​

True when the document was uploaded as a finished file rather than rendered. Static documents have no live config.

Document.dependentDocuments ● DocumentConnection object​

Document.dependentDocuments.first ● Int scalar​
Document.dependentDocuments.after ● String scalar​
Document.dependentDocuments.filter ● DocumentFilterInput input​

Document.documentType ● DocumentType object​

Document.order ● Order object​

Document.referencedDocument ● Document object​

Interfaces​

Node interface​

Any entity that can be loaded by its global id through the node(id: ID!) query.

Returned By​

document query

Member Of​

Document object ● DocumentEdge object