Templates

Template Objects

Listed below are the SparkLayer objects available to use in templates and content zones. The objects available will depend on the themes template, refer to this documentation to see which objects are available for specific templates.

Address

Properties

Key

Type

Description

Example(s)

name

string

-

-

company

string

-

-

address_line_1

string

-

-

address_line_2

string

-

-

city

string

-

-

region_code

string

-

-

postal_code

string

-

-

country_code

string

-

-

phone

string

-

-

Customer

Properties

Key

Type

Description

Example(s)

id

string

-

-

title

string

-

-

first_name

string

-

-

last_name

string

-

-

email

string

-

-

company_name

string

-

-

external_id

string

-

-

accounting_id

string

-

-

ContentZone

Content zones can be configured as part of the invoicing feature

Note: Content zones may be configured to contain liquid variables and should be handled in templates accordingly

Properties

Key

Type

Description

Example(s)

title

string

-

-

content

string

-

-

InvoiceSettings

Properties

Key

Type

Description

Example(s)

content_zones.zone_1

ContentZone

-

-

content_zones.zone_2

ContentZone

-

-

content_zones.zone_3

ContentZone

-

-

LineItem

Properties

Key

Type

Description

Example(s)

custom_attributes.[].key

string

-

-

custom_attributes.[].value

string

-

-

identifiers.sku

string

-

-

name_child

string

-

-

name_parent

string

-

-

quantity

integer

-

-

line_total

LineTotal

-

-

unit_total

UnitTotal

-

-

LineTotal

Properties

Key

Type

Description

Example(s)

total_net

Money

-

-

total_gross

Money

-

-

discount_net

Money

-

-

discount_gross

Money

-

-

tax_rate

number

-

-

Merchant

Merchant details

Properties

Key

Type

Description

Example(s)

address1

string,null

The address line 1 associated to the merchants store address

-

address2

string,null

The address line 2 associated to the merchants store address

-

base_currency

string,null

The base currency used by the store

USD,GBP

city

string,null

The city associated to the merchants store address

-

region

string,null

The region code associated to the merchants store address

-

country

string,null

The country code associated to the merchants store address

GB

email

string,null

The email associated to the merchant

-

phone

string,null

The phone number associated to the merchants store

-

postcode

string,null

The postcode associated to the merchants store address

-

store_name

string,null

The connected platforms store name

-

timezone

string,null

-

-

url

string,null

-

-

locale

string,null

The default locale of the store

en,fr

Money

Represents a monetary value

Properties

Key

Type

Description

Example(s)

amount

string

-

-

currency_code

string

-

GBP,USD

Package

Properties

Key

Type

Description

Example(s)

line_items

array of LineItem

-

-

shipping_address

Address

-

-

Purchase

Properties

Key

Type

Description

Example(s)

billing_address

Address

-

-

customers.sparklayer

Customer

-

-

custom_fields.[].name

string

-

-

custom_fields.[].value

string,null

-

-

customer_reference

string,null

-

-

dates.created_at

string

-

-

dates.updated_at

string

-

-

dates.placed_at

string,null

-

-

dates.calculated_submitted_at

string,null

-

-

identifiers.visible

string

-

-

packages

array of Package

-

-

line_items

array of LineItem

-

-

subtotal

Money

-

-

tax

Money

-

-

shipping_cost

Money

-

-

calculated_total

Money

-

-

UnitTotal

Properties

Key

Type

Description

Example(s)

total_net

Money

-

-

total_gross

Money

-

-

discount_net

Money

-

-

discount_gross

Money

-

-

tax_rate

number

-

-

Note: This documentation is in beta and may not be accurate, please contact support if you have any issues or questions

Updated 12 Feb 2025
Did this page help you?