The account object is accessible via the session object, when user has signed in. It is also accessible via various other objects, such as order and enquiry transaction objects.

Variables

.id

Unique ID for the account.

TYPE
numeric
CONSTRAINTS
>= 1
PRESENCE
always

Examples

CODE{{ session.user.account.id }}
OUTPUT1192345

.name

TYPE
string
CONSTRAINTS
up to 64 characters
PRESENCE
always

Examples

CODE{{ session.user.account.name }}
OUTPUTJohn Smith

.first_name

The first name of the customer for standard accounts, but could be empty for corporate accounts.

TYPE
string
CONSTRAINTS
up to 32 characters
PRESENCE
always, but could be blank

Examples

CODE{{ session.user.account.first_name }}
OUTPUTJohn

.last_name

The last name of the customer for standard accounts, but could be empty for corporate accounts.

TYPE
string
CONSTRAINTS
up to 32 characters
PRESENCE
always, but could be blank

Examples

CODE{{ session.user.account.last_name }}
OUTPUTSmith

.email

The primary email address for the account.

TYPE
string
CONSTRAINTS
valid email address
PRESENCE
always

Examples

CODE{{ session.user.account.email }}
OUTPUTjohn.smith@gmail.com

.emails

TYPE
emails object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE{% for email in session.user.account.emails.all %}
{{ email.email }}
{% endfor %}
OUTPUTjohn.smith@gmail.com
alt@gmail.com

.phones

TYPE
phones object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE{% for email in session.user.account.phones.all %}
{{ phone.number }}
{% endfor %}
OUTPUT0830000000
0110000000

.type

The type of the account.

TYPE
string
CONSTRAINTS
customer | admin
PRESENCE
always

Examples

CODE{{ session.user.account.type }}
OUTPUTcustomer

.is_customer

Equivalent to account.type == 'customer'

TYPE
boolean
CONSTRAINTS
true | false
PRESENCE
always

Examples

CODE{{ session.user.account.is_customer }}
OUTPUT1

.is_admin

Equivalent to account.type == 'admin'

TYPE
boolean
CONSTRAINTS
true | false
PRESENCE
always

Examples

CODE{{ session.user.account.is_admin }}
OUTPUT1

.tier

TYPE
string
CONSTRAINTS
up to 8 characters
PRESENCE
optional

Examples

CODE{{ session.user.account.tier }}
OUTPUTRESELLER

.status

TYPE
string
CONSTRAINTS
active | suspended
PRESENCE
always

Examples

CODE{{ session.user.account.status }}
OUTPUTactive

.orders

TYPE
orders object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE
OUTPUT

.enquiries

TYPE
enquiries object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE
OUTPUT

.cash_accounts

TYPE
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE
OUTPUT

.billing_addresses

TYPE
addresses object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE
OUTPUT

.shipping_addresses

TYPE
addresses object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE
OUTPUT

.metadata

TYPE
metadata object
CONSTRAINTS
n/a
PRESENCE
always

Examples

CODE
OUTPUT