Core API
...
Core API Docs
Customers
Update a Customer
PATCH
PATH PARAMETERS
id
string
*Either the Internal or External ID
HEADER PARAMETERS
Site-Id
string
*Example: jones-climbing
Spark Layer Site ID
BODY PARAMETERS
body
CustomerRequest-2
*[All Of:CustomerBase-2object]id
string
Example: cu_123
SparkLayer Customer ID (always prefixed with cu_)
created_at
string<date-time>
updated_at
string<date-time>
addresses
Address-2[]
title
string
Example: Mr
Title
first_name
string
Example: Tom
First Name
last_name
string
Example: Jones
Last Name
email
string
Example: Tom.jones@climbing.com
Email Address (Unique)
company_name
string
Example: Tom Jones Climbing Ltd
Company Name
external_id
string
Example: XXXX00123
External Id (cannot start with cu_ and must be unique)
accounting_id
string
Example: XXXX00123
Accounting Id
status
undefined
Status - login is allowed only via the `active` status
group
string
Example: base
Customer Group
role
string<main | limited-customer | sales-agent | sales-admin>
Example: limited-customer
A role that represents the users permissions
default_billing_address_id
string
Example: ca_1234
Default Billing Address ID (returned as ID but can be provided by the external ID)
default_shipping_address_id
string
Example: ca_1234
Default Billing Address ID (returned as ID but can be provided by the external ID)
available_shipping_addresses
string[]
Limit the shipping addresses to be selected
currency_code
string
Example: gbp
[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, not required if `price_lists` is specified
sales_agent_groups
string[]
Sales Agent Groups
If a sales agent/customer, access is only given to other sales agents/customers with one of the groups specified. If a customer, access is only given to other sales agents with one of the groups specified. If empty for a customer, only sales agents with an empty list can access the customer. If empty for a sales agent, any customer is accessible.
price_lists
string[]
Customer specifc price lists (overrides customer group settings)
vatin_numbers
string[]
Validated against [VAT identification numbers](https://en.wikipedia.org/wiki/VAT_identification_number)
discount_percentage
number<float>
Customer specific percentage discount
tax_exempt
boolean
Tax Exempt (overrides `vatin_numbers` and not recommended)
payment_by_invoice
boolean
Allow payments via invoice (overrides customer group settings)
payment_on_account
object
Allow payments on account when the order total meets available credit (overrides customer group settings)
metadata
object
Metadata
parent_customer
object
RESPONSES
200
Successful response
CustomerResponse-2
[All Of:CustomerBase-2object]id
string
Example: cu_123
SparkLayer Customer ID (always prefixed with cu_)
created_at
string<date-time>
updated_at
string<date-time>
addresses
Address-2[]
title
string
Example: Mr
Title
first_name
string
Example: Tom
First Name
last_name
string
Example: Jones
Last Name
email
string
Example: Tom.jones@climbing.com
Email Address (Unique)
company_name
string
Example: Tom Jones Climbing Ltd
Company Name
external_id
string
Example: XXXX00123
External Id (cannot start with cu_ and must be unique)
accounting_id
string
Example: XXXX00123
Accounting Id
status
undefined
Status - login is allowed only via the `active` status
group
string
Example: base
Customer Group
role
string<main | limited-customer | sales-agent | sales-admin>
Example: limited-customer
A role that represents the users permissions
default_billing_address_id
string
Example: ca_1234
Default Billing Address ID (returned as ID but can be provided by the external ID)
default_shipping_address_id
string
Example: ca_1234
Default Billing Address ID (returned as ID but can be provided by the external ID)
available_shipping_addresses
string[]
Limit the shipping addresses to be selected
currency_code
string
Example: gbp
[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, not required if `price_lists` is specified
sales_agent_groups
string[]
Sales Agent Groups
If a sales agent/customer, access is only given to other sales agents/customers with one of the groups specified. If a customer, access is only given to other sales agents with one of the groups specified. If empty for a customer, only sales agents with an empty list can access the customer. If empty for a sales agent, any customer is accessible.
price_lists
string[]
Customer specifc price lists (overrides customer group settings)
vatin_numbers
string[]
Validated against [VAT identification numbers](https://en.wikipedia.org/wiki/VAT_identification_number)
discount_percentage
number<float>
Customer specific percentage discount
tax_exempt
boolean
Tax Exempt (overrides `vatin_numbers` and not recommended)
payment_by_invoice
boolean
Allow payments via invoice (overrides customer group settings)
payment_on_account
object
Allow payments on account when the order total meets available credit (overrides customer group settings)
metadata
object
Metadata
parent_customer
object
default
Error Response
Updated 18 Sep 2023
Did this page help you?