Customers
UpdateCustomer
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.
put/v2/customers/{customer_id}
Path parameters
customer_idstring required
The ID of the customer to update.
Request body
Example request
{
"request_body": {
"email_address": "New.Amelia.Earhart@example.com",
"note": "updated customer note",
"phone_number": "",
"version": 2
}
}Response
Success
Example response
{
"customer": {
"address": {
"address_line_1": "500 Electric Ave",
"address_line_2": "Suite 600",
"administrative_district_level_1": "NY",
"country": "US",
"locality": "New York",
"postal_code": "10003"
},
"created_at": "2016-03-23T20:21:54.859Z",
"creation_source": "THIRD_PARTY",
"email_address": "New.Amelia.Earhart@example.com",
"family_name": "Earhart",
"given_name": "Amelia",
"id": "JDKYHBWT1D4F8MFH63DBMEN8Y4",
"note": "updated customer note",
"preferences": {
"email_unsubscribed": false
},
"reference_id": "YOUR_REFERENCE_ID",
"updated_at": "2016-05-15T20:21:55Z",
"version": 3
}
}