PUT /v2/customers/{customer_id}
Updates a customer profile. To change an attribute, specify the new value. To remove an attribute, specify the value as an empty string or empty object.
As a best practice, you should include the version
field in the request to enable optimistic concurrency control. The value must be set to the current version of the customer profile.
To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
You cannot use this endpoint to change cards on file. To make changes, use the Cards API or Gift Cards API.
Servers
- https://connect.squareup.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
customer_id |
String | Yes |
The ID of the customer to update. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
family_name |
String | No |
The family name (that is, the last name) associated with the customer profile. |
given_name |
String | No |
The given name (that is, the first name) associated with the customer profile. |
email_address |
String | No |
The email address associated with the customer profile. |
note |
String | No |
A custom note associated with the customer profile. |
nickname |
String | No |
A nickname for the customer profile. |
company_name |
String | No |
A business name associated with the customer profile. |
version |
Integer | No |
The current version of the customer profile. As a best practice, you should include this field to enable optimistic concurrency control. For more information, see Update a customer profile. |
address |
Object | No |
Represents a postal address in a country. The address format is based
on an open-source library from Google. For more information,
see AddressValidationMetadata.
This format has dedicated fields for four address components: postal code,
locality (city), administrative district (state, prefecture, or province), and
sublocality (town or village). These components have dedicated fields in the
For the remaining address components, the Note that, in the current implementation, all other When it comes to localization, the seller's language preferences (see Language preferences) are ignored for addresses. Even though Square products (such as Square Point of Sale and the Seller Dashboard) mostly use a seller's language preference in communication, when it comes to addresses, they will use English for a US address, Japanese for an address in Japan, and so on. |
address.address_line_3 |
String | No |
The third line of the address, if any. |
address.first_name |
String | No |
Optional first name when it's representing recipient. |
address.postal_code |
String | No |
The address's postal code. |
address.organization |
String | No |
Optional organization name when it's representing recipient. |
address.address_line_2 |
String | No |
The second line of the address, if any. |
address.address_line_1 |
String | No |
The first line of the address. Fields that start with |
address.administrative_district_level_3 |
String | No |
A civil entity within the address's |
address.sublocality_2 |
String | No |
A civil region within the address's |
address.administrative_district_level_2 |
String | No |
A civil entity within the address's |
address.locality |
String | No |
The city or town of the address. |
address.sublocality |
String | No |
A civil region within the address's |
address.last_name |
String | No |
Optional last name when it's representing recipient. |
address.administrative_district_level_1 |
String | No |
A civil entity within the address's country. In the US, this is the state. |
address.sublocality_3 |
String | No |
A civil region within the address's |
address.country |
String | No |
The address's country, in ISO 3166-1-alpha-2 format. |
birthday |
String | No |
The birthday associated with the customer profile, in RFC 3339 format. The year is optional. The timezone and time are not allowed.
For example, |
phone_number |
String | No |
The 11-digit phone number associated with the customer profile. |
reference_id |
String | No |
An optional second ID used to associate the customer profile with an entity in another system. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.