Skip to navigation

Update Customer

Deprecated

Updates a Customer.

Read Only Fields

  • id
  • date_created
  • date_modified
  • accepts_marketing
  • addresses
  • form_fields

Notes

The _authentication object exposes functionality associated with the customer’s ability to log in to the store. All properties of the _authentication object are optional. When the _authentication object is not supplied with an update request, then the existing customer password remains the same.

Updating Passwords

To manually update a customer password in the same way as the control panel, supply a value for the password field:

showLineNumbers copy
{
"_authentication": {
"password": "12w69Y217PYR96J"
}
}

Confirming Passwords

An additional optional password_confirmation field can also be sent, providing password confirmation as a service:

showLineNumbers copy
{
"_authentication": {
"password": "12w69Y217PYR96J"
"password_confirmation": "12w69Y217PYR96J"
}
}

Forcing Password Resets

To force a customer to reset their password upon their next login attempt, give the force_reset field a value of true, as shown here:

showLineNumbers copy
{
"_authentication": {
"force_reset": true
}
}

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Customersmodifystore_v2_customers
Customersread-onlystore_v2_customers_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

customer_idintegerRequired
Unique numeric ID of the customer.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
_authenticationobjectOptional

Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation.

companystringOptional
The name of the company for which the customer works.
first_namestringOptional
First name of the customer.
last_namestringOptional
Last name of the customer.
emailstringOptional
Email address of the customer.
phonestringOptional
Phone number of the customer.
store_creditstringOptional

The amount of credit the customer has. (Float, Float as String, Integer)

registration_ip_addressstringOptional

The customer’s IP address when they signed up.

customer_group_idintegerOptional
The group to which the customer belongs.
notesstringOptional

Store-owner notes on the customer.

tax_exempt_categorystringOptional

If applicable, the tax-exempt category of the shopper’s customer account. You can apply a tax-exempt category to multiple customers. This code should match the exemption codes provided by the third-party integration.

addressesobjectOptional
reset_pass_on_loginbooleanOptional
Force a password change on next login.

Response

OK
first_namestring
First name of the customer.
last_namestring
Last name of the customer.
emailstring
Email address of the customer.
_authenticationobjectOptional

Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation.

companystringOptional
The name of the company for which the customer works.
phonestringOptional
Phone number of the customer.
store_creditstringOptional

The amount of credit the customer has. (Float, Float as String, Integer)

registration_ip_addressstringOptional

The customer’s IP address when they signed up.

customer_group_idintegerOptional
The group to which the customer belongs.
notesstringOptional

Store-owner notes on the customer.

tax_exempt_categorystringOptional

If applicable, the tax-exempt category of the shopper’s customer account. You can apply a tax-exempt category to multiple customers. This code should match the exemption codes provided by the third-party integration.

accepts_marketingbooleanOptionalRead-only

Describes whether the customer accepts product review emails or abandon cart emails. Read-Only.

addressesobjectOptional
form_fieldslist of objects or nullOptionalRead-only

Array of custom fields. This is a Read-Only field; do not set or modify its value in a POST or PUT request.

reset_pass_on_loginbooleanOptional
Force a password change on next login.