The document
group of properties contain information related to the document contents.
The group of properties related to the document type, name, and the document footer.
A text displayed in the document footer.
You can edit the text on the Settings → Invoice Settings page in your Sufio account.
The link where the customer can view the document.
Use the text
attribute to render the value as a clickable link formatted in HTML.
The URL address where the customer can view the document.
Use the text
attribute to render the value as a clickable link formatted in HTML.
Subheading for documents created from other documents, for example, a credit note created for an invoice.
A text with a link to the Sufio website.
Use the text
attribute to render the value as a clickable hyperlink to the Sufio website formatted in HTML.
The link to the Sufio website.
Use the text
attribute to render the URL as a clickable link in HTML.
The “Thank you” note of the document, displayed in the document footer.
You can edit the text on the Design → Footer page in your Sufio account.
This group of properties determines the type of the document.
If True
, the document is a pro forma invoice.
The type of the document. The possible values are:
invoice
pro-forma-invoice
credit-note
quote
The document.statuses
group of properties contains various checks you can use as conditions in your document templates.
If True
, the document has at least one shipping line.
The group of properties that describe the document currency and language settings.
The number of decimals of the document currency.
The name of the document currency, rendered in the document language.
Two-letter code (ISO 639‑1 format) of the document language, optionally followed by a region modifier.
If True
, the document language uses right-to-left script.
The document.dates
group of properties contain the document dates.
You can render the dates as date values or as strings formatted in a country-specific date format.
Use the following for
loop to iterate through all the properties of the group that are supposed to be shown in the document. This depends on the document type, your settings on the Design page, and whether the properties have a value.
The delivery date of the document.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The due date of the document.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
Important date is the date you may want to emphasize on the document. This property is used by some of our document templates.
If the document has a due date, the value is equal to document.dates.due_date
. Otherwise, the value is document.dates.issue_date
.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The issue date of the document.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The document.payments
group includes properties that contain the payment information for the order.
Use the following for
loop to iterate through all the properties of the group that are supposed to be shown in the document. This depends on the document type, your settings on the Design page, and whether the properties have a value.
The bank account number for the payment of the document.
The constant symbol number for the payment of the document.
The payment method selected for the document.
The variable symbol number for the payment of the document.
The document.lines
array contains all item lines of the document.
Use the {% for line in document.lines %}
loop to iterate through the item lines of the document.
Use a second {% for item in line %}
loop to iterate through values of each line, such as item name, unit
price or quantity, that are supposed to be shown in the document. This
depends on the document type and your settings on the Design page.
The document.lines_titles
array contains titles of values for the document item lines, such as Unit Price or Quantity.
These titles are typically displayed in the header row of the item table.
Use the {% for title in document.lines_titles %}
loop to iterate through titles that are supposed to be shown in the
document. This depends on the document type and your settings on the Design page.
The description of the line item.
By default, this is/contains the product’s variant name and SKU code.
The discount applied to the line item, either as an amount or as a percentage.
You can use exact amounts (e.g. 2.50
) or percentages (e.g. 10%
) when entering the discount.
Use the text
attribute to render the value formatted in a country-specific currency format.
If the discount was applied as a percentage, the formatted value contains the %
symbol.
The total value of discounts applied to the line item.
If the discount was specified as a percentage, this is the calucalted discount amount.
Use the text
attribute to render the value formatted in a country-specific currency format.
If True
, the line contains shipping information.
The name of the line item.
In most cases, this is the product name.
The percentage tax rate applied to the specific line item.
Use the {% for tax in document.lines[#].taxes %}
loop to iterate through the taxes that are supposed to be shown in the document.
The total value of discounts applied to the taxes of the line item.
Use the text
attribute to render the value formatted in a country-specific currency format.
The total price of the purchased units of the line item.
Use the text
attribute to render the value formatted in a country-specific currency format.
Price for one unit of the line item.
Use the text
attribute to render the value formatted in a country-specific currency format.
The document.taxes
group includes properties that contain the taxes in the document.
Each property represents the total tax amount per each tax rate used in the document.
You can render the property values as plain text strings or as formatted in the document currency.
Use the following for
loop to iterate through all the taxes in the document.
Use the sum
filter to return the total amount of taxes of the document.
Please note that these tax properties are also included in the document.totals
group of properties.
The rate of the document tax, as a decimal number.
Use the text attribute to render the value formatted as a percentage.
The document.totals
group includes properties that contain the invoice total amounts.
You can render the property values as plain text strings or as formatted in a country-specific currency format.
Use the following for
loop to iterate through all the properties of the group that are supposed to be shown in the document. This depends on the document type, your settings on the Design page, and whether the properties have a value.
If the document has taxes, this iterator also include properties from document.taxes
.
The total amount due of the document, that is, the total amount of the document minus the amount paid.
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The total amount paid of the document.
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The total amount of discounts of the document, that means, the sum of all the discounts applied.
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The total amount of shipping of the document, that is, the sum of all the shipping plus taxes, minus shipping discounts.
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The total amount of shipping discounts of the document.
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The subtotal amount of the document, that means, the sum of all the line items totals.
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The total amount of the document, excluding the taxes
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
The total amount of the document, including the taxes
Use the text
attribute to render the value formatted in a country-specific currency format.
Use the title
attribute to render the name of the value.
Some documents may have related documents. Typically, a credit note and the invoice for which the credit note is issued are related documents. Or, in case an invoice is created from a pro forma invoice, the two documents are related.
You can retrieve properties from the related documents, such as an issue date of the original invoice on a credit note.
Click on the property name in the list below to learn more about the original property.
The document.related
group of properties let you retrieve some values for the related documents.
These following list shows all the possible document.related
properties that can have a value, depending on the document type and your settings.
- document.related.name
- document.related.number
- document.related.type
- document.related.dates.issue_date
- document.related.dates.delivery_date
- document.related.dates.due_date
- document.related.payments.bank_account
- document.related.payments.constant_symbol
- document.related.payments.order_number
- document.related.payments.payment_method
- document.related.payments.variable_symbol
- document.related.totals.amount_due
- document.related.totals.amount_paid
- document.related.totals.discount
- document.related.totals.shipping
- document.related.totals.shipping_discount
- document.related.totals.subtotal
- document.related.totals.total_excl_tax
- document.related.totals.total_incl_tax
- document.related.currency.code
- document.related.currency.decimals
- document.related.currency.name
- document.related.currency.symbol
- document.related.heading
- document.related.language.code
- document.related.language.name
- document.related.lines.description
- document.related.lines.item
- document.related.lines.quantity
- document.related.lines.total
- document.related.lines.unit_price
- document.related.notes
- document.related.public_link
- document.related.public_url
- document.related.subheading
- document.related.sufio_link
- document.related.sufio_url
- document.related.thanks