Edit Customer Details
Description
Updates the detailed information for any customers to which users have access. In general, account users can update any customers within their account. However, users in an account group can update the customers associated with every account in the group, while users in a customer group can update only the customers in the group.
Resource URL
PUT rws/api/v{apiVersion}/customers/{customerId}
Request Parameters
Caution. This function overwrites existing customer information using parameter values you supply. Control Center uses default values for any parameters that are missing from the call. To avoid losing data, make sure to provide existing values for any unchanged parameters.
Parameter | Description |
---|---|
apiVersion |
The version number for this API. The current version for all functions is 1. |
name | The name of the customer that you want to update. |
accountName | The account name for the customer. |
securityAnswer | The answer to the security question. If a securityAnswer is used, the securityQuestion is required. The string allows a maximum of 100 characters. A null value is acceptable |
securityQuestion | A security question. If a securityAnswer is used, the securityQuestion is required. The string allows a maximum of 100 characters. A null value is acceptable. |
shipToBillAddress | Set this value to true if you want to to use the customer's billing address as the shipping address. |
contacts | See the Contact Parameters table below. A null value is acceptable. |
billingAddress | See the Address Parameters table below. |
shippingAddress | See the Address Parameters table below. |
Contact Parameters
Each customer can have a maximum of four contacts.
Parameter | Description |
---|---|
name | The name of the contact. The string allows 0 to 40 characters. |
title |
The title of the contact. The string allows 0 to 40 characters. |
phone | The phone number of the contact. The string allows 0 to 25 characters. |
mobile | The mobile number of the contact. The string allows 0 to 25 characters. |
The email address of the contact. The string allows 0 to 320 characters. |
Address Parameters
The following parameters are used for both billingAddress and shippingAddress.
Parameter | Description |
---|---|
addressLine1 | The first line of the contact's billing/shipping address. This is typically a street number and a street name. The string allows 0 to 40 characters. |
addressLine2 |
The second line of the contact's billing/shipping address. The string allows 0 to 40 characters. |
city |
The city of the contact. The string allows 0 to 40 characters. |
state | The state or province of the contact. The string allows 0 to 40 characters. |
country | The country of the contact. The string allows 0 to 150 characters. |
postalCode | The postal code of the contact. The string allows 0 to 15 characters. |
Response Parameters
Return Value | Description |
---|---|
customerId | The customer identification number associated with the customer name. |
timestamp | The date and time when the customer was updated. The timestamp displays in UNIX Epoch clock format. See Date/Time Formats for more information. |
Request Example
Make sure to use your own user credentials. See Authentication for information about creating an authorization header.
Response Example
Errors
Error Code | HTTP Code | Error Message |
---|---|---|
10000004 | 400 | Invalid accountId. |
10000024 | 400 | Invalid apiVersion. |
10000580 | 400 | Customer details required. |
10000581 | 400 | Customer name is required. |
10000582 | 400 | Invalid customer name. Number of characters allowed 1 - 60. |
10000583 | 400 | Account Id is required. |
10000584 | 400 | Security answer missing. |
10000585 | 400 | Security question missing. |
10000586 | 400 | Invalid security question. Number of characters allowed 0 - 100. |
10000587 | 400 | Invalid security answer. Number of characters allowed 0 - 100. |
10000588 | 400 | Maximum 4 contacts can be associated with a customer. |
10000589 | 400 | Invalid contact name. Number of characters allowed 0 - 40. |
10000590 | 400 | Invalid contact title. Number of characters allowed 0 - 40. |
10000591 | 400 | Invalid contact phone. Number of characters allowed 0 - 25. |
10000592 | 400 | Invalid contact mobile. Number of characters allowed 0 - 40. |
10000593 | 400 | Invalid contact email. Number of characters allowed 0 - 320. |
10000594 | 400 | Invalid address line1. Number of characters allowed 0 - 40. |
10000595 | 400 | Invalid address line2. Number of characters allowed 0 - 40. |
10000596 | 400 | Invalid city. Number of characters allowed 0 - 40. |
10000597 | 400 | Invalid state/region. Number of characters allowed 0 - 40. |
10000598 | 400 | Invalid country. Number of characters allowed 0 - 100. |
10000599 | 400 | Invalid postal code. Number of characters allowed 0 - 15. |
10000602 | 400 | Duplicate customer name. |
10000603 | 400 | Invalid account. Account erasure request is in progress for the account. |
20000003 | 404 | Resource not found - Invalid accountId. |