Account Model

Overview

Account is the persistent identity entity for customers, organisations, and providers in the platform. It is the long-lived record that survives across orders — distinct from the Customer entity on an order, which is a per-order snapshot of contact details at the time of purchase.

Accounts support soft deletion: is_deleted is set rather than removing the row.

When the shop module is active, shop-specific fields from ShopClientAccount are merged onto the Account entity via [ExtendsType]. These fields appear as top-level properties on the Account in the API — there is no separate ShopClientAccount endpoint.


Core Fields

Field Notes
id Account identifier
title Display name of the account
email Contact email for the account
kind Account type — see AccountKind below
status Current lifecycle status — see AccountStatus below
future_status A status that will become active at future_status_effective_time
future_status_effective_time When future_status takes effect
ordinal Display sort order
created_time When the account was created
is_deleted Soft-delete flag
is_hidden Account is hidden from listings (not visible to regular users)
is_guest Guest/unregistered account
is_login_only Account exists only to hold a login — has no contact or address data
notes Internal staff notes (IList<EntityNote>, admin-only)
integration_relations External system mappings

AccountKind

Value Description
personal Individual person
company Business/company
branch Branch of a company
department Department within an organisation
organization Organisation
public_institution Public institution

AccountStatus

Value Description
active Active and operational (default)
setup_in_progress Account is being configured
on_hold Temporarily inactive
terminated Closed/terminated

future_status+ future_status_effective_time allow scheduling a status change in advance (e.g. terminate an account from a specific date).


Contact: Profile (default_profile)

default_profile is the primary contact record for the account (IProfile). It holds personal and professional contact details.

Field Notes
first_name / last_name / middle_name Name
salutation e.g. "Mr.", "Ms."
title Professional title
initials Initials
email Contact email
primary_phone / secondary_phone Phone numbers
company Company name
company_identifier CVR / organisation number
global_location_number GLN / EAN number
company_industry Industry classification
department Department name
job_title Job title
job_status Employment status (employee, freelancer, student, retired)
website Personal or company website
birthdate Date of birth
membership_number Membership identifier
referrer Who referred this contact
short_description / long_description Bio or notes
gender Gender
relationship_status Marital/relationship status
locale_id Preferred language

Full name resolution: first_name+ middle_name+ last_name, or parsed from a single string via SetFullName().


Address (default_address)

default_address is the primary physical address for the account (IAddress).

Field Notes
title Address label (e.g. "Head office")
address_line1 / address_line2 Street address
building_name Building or floor
room_name Room or unit number
postnumber Postal / zip code
city City
state State / province
county County
country_id / country_object Country
latitude / longitude Geographic coordinates (populated by geocoding)
location_kind Classification of the location
is_geocoding_disabled Prevent automatic geocoding for this address

Account Hierarchy (Sub-accounts)

Accounts can be organised in a parent/child tree.

Field Notes
parent_id / parent Parent account (if this is a sub-account)
is_sub_accounts_enabled Whether this account can have sub-accounts
is_invoicing_on_parent_account This account's orders are invoiced on the parent
is_sub_accounts_invoicing_on_parent_account_by_default New sub-accounts default to invoicing on parent
sub_account_token Token used by sub-accounts to self-register under this account

Provider / Client Relationship

An account can be a client of a provider account, or a provider managing client accounts.

Field Notes
is_client This account is a client
provider_account_id / provider_account The provider account this client belongs to
is_client_information_managed_by_provider The provider can edit this client's information
is_provider This account is a provider (manages client accounts)

An account can optionally be linked to a User record for authentication.

Field Notes
user_id The linked User (if account has its own login)
department_id The platform department this account is associated with

When is_login_only = true, the account exists solely to hold authentication credentials and has no contact/address/client data.


Account Authorizations

Accounts can grant other accounts access to act on their behalf.

authorizations_on_this_accountIList<IAccountAuthorization> — other accounts that have been granted access to this account.

authorizations_on_other_accountsIList<IAccountAuthorization> — accounts that this account has been granted access to (admin-only).

Each IAccountAuthorization record:

Field Notes
authorizing_account_id / authorizing_account The account granting access
authorized_account_id / authorized_account The account receiving access
access_level Level of access granted — see AccountAccessLevel below

AccountAccessLevel

Value Description
stakeholder Read-only view access
basic Basic ordering/interaction on behalf of the account
manage Full administrative control of the account

Shop Extensions (ShopClientAccount)

When the shop module is active, the following fields are merged onto Account. They control shop behaviour for accounts acting as clients.

Pricing

Field Notes
client_price_group_id / client_price_group Price group applied to this account — overrides default pricing for all products
is_individual_price_visible Whether individual line prices are shown to this account
is_price_summary_visible Whether the price summary is shown to this account

Category Restrictions (client_category_relations)

client_category_relations is an IList<IShopClientAccountRelCategory>. Each record restricts a specific category for this client account.

Field Notes
category_id The category being restricted
is_category_available_for_client Whether the category is visible/available to this account
is_individual_price_visible Price visibility override for this category

Shipping Method Restrictions (client_shipping_method_relations)

client_shipping_method_relations is an IList<IShopClientAccountRelShippingMethod>. Restricts which shipping methods are available to this account.

Field Notes
shipping_method_id / shipping_method The allowed shipping method
shipping_plan_id / shipping_plan Optional shipping plan associated with the method for this account
start_time / end_time Availability window for this shipping option

Fees (client_fees)

client_fees is an IList<IEntityRelFeeProduct> — fee products that are automatically applied to orders from this account. Same structure as product-level fees (see Fees-en.md).

Return Rules (client_return_rules)

client_return_rules is an IList<IShopClientAccountReturnRule>. Defines return policies per category for this account.

Field Notes
category_id Category this rule applies to (null= applies to all)
returnable_value_percentage Percentage of the original price that can be returned

Partial Orders

Field Notes
is_main_account_partial_ordering_enabled Account can use partial ordering (multi-department/cycle split orders)
is_sub_account_partial_ordering_enabled Sub-accounts of this account can place partial orders
is_main_account_non_partial_ordering_enabled Normal (non-partial) ordering is also allowed alongside partial ordering
is_delivery_with_parent_account This account's orders are delivered together with the parent account's orders
is_sub_accounts_delivery_with_parent_account_by_default New sub-accounts default to delivery with parent

Account vs. Customer

These are two distinct concepts:

Account Customer (on an order)
Lifetime Persistent, survives across orders Per-order snapshot
Purpose Identity, authorisation, preferences Contact and address details at time of purchase
Profile/address default_profile / default_address invoicing_profile, delivery_profile, invoicing_address, delivery_address
Link customer.accountAccount Owned by the Order

When an order is placed, the customer's profile and address data is copied into the Customer entity on the order. Later changes to the Account do not affect completed orders.


Computed Fields (read-only, resolved at query time)

Computed fields are IncludeByDefault=false and must be requested explicitly:

GET /resources/Account/123?include=computed_parent_title
Field Notes
computed_parent_title Title of the parent account