Create, read and update the shop's customer accounts. The API can't delete accounts or give or remove admin roles.
List accounts
Returns the shop's customer accounts, newest first. The filters match exact values; an empty filter value is ignored. Deleted accounts are not listed.
query Parameters
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
customer_numberReturn the accounts with exactly this customer number. Case-sensitive.
emailReturn the account with this email address. The match ignores case.
referenceReturn the accounts with exactly this reference. Case-sensitive.
creditsReturn the accounts whose credit balance is exactly this amount. 0 also matches the accounts that have never had credits.
List accounts › Responses
The accounts.
Create an account
Creates a customer account. The API sends the customer no email, and the account has no usable password: the customer sets one with the shop's password reset before logging in. Fields you omit get their defaults: empty strings, false, pays_vat default and no credits. Text fields accept null and store an empty string.
Create an account › Request Body
nameThe customer's name. Can't be null; on create it can't be a number.
emailA valid email address that no other account uses, ignoring case. The shop saves it in lowercase. Can't be null.
role_idThe ID of an existing customer role, see List roles. Admin roles return 400 Insufficient rights, and so does moving an account out of an admin role. Can't be null.
customer_numberstreetstreet2postal_codecitystatecountycountry_idThe ID of a delivery country, see List countries. Sets country_name and country_code too. null removes the country.
phone_numbercompanyvat_numberpublic_languageOne of the shop's languages, a two-letter code such as FI. Other values return 400.
genderm, f, x (prefers not to say), or an empty string or null for unknown.
birthdateAn ISO 8601 date. A date-time is accepted too; only the date is stored.
email_promotion_allowedCan't be null.
mail_promotion_allowedCan't be null.
sms_promotion_allowedCan't be null.
pays_vatdefault follows the shop's VAT setting, yes and no override it. An empty string or null means default.
referencecreditsSets the account's credit balance to this amount (it does not add to it). Can't be null.
extra_data_1extra_data_2extra_data_3Create an account › Responses
The created account.
hrefThe URL of the request.
One account.
Get an account
path Parameters
account-idThe account's ID. A value that is not a number returns 400; an unknown or deleted account returns 404.
Get an account › Responses
The account.
hrefThe URL of the request.
One account.
Update an account
Updates the fields you send and keeps the others. Text fields accept null and store an empty string; country_id and birthdate accept null to clear them. credits replaces the balance.
path Parameters
account-idThe account's ID. A value that is not a number returns 400; an unknown or deleted account returns 404.
Update an account › Request Body
nameThe customer's name. Can't be null; on create it can't be a number.
emailA valid email address that no other account uses, ignoring case. The shop saves it in lowercase. Can't be null.
role_idThe ID of an existing customer role, see List roles. Admin roles return 400 Insufficient rights, and so does moving an account out of an admin role. Can't be null.
customer_numberstreetstreet2postal_codecitystatecountycountry_idThe ID of a delivery country, see List countries. Sets country_name and country_code too. null removes the country.
phone_numbercompanyvat_numberpublic_languageOne of the shop's languages, a two-letter code such as FI. Other values return 400.
genderm, f, x (prefers not to say), or an empty string or null for unknown.
birthdateAn ISO 8601 date. A date-time is accepted too; only the date is stored.
email_promotion_allowedCan't be null.
mail_promotion_allowedCan't be null.
sms_promotion_allowedCan't be null.
pays_vatdefault follows the shop's VAT setting, yes and no override it. An empty string or null means default.
referencecreditsSets the account's credit balance to this amount (it does not add to it). Can't be null.
extra_data_1extra_data_2extra_data_3Update an account › Responses
The updated account.
hrefThe URL of the request.
One account.