You are viewing an old version of the API
Update customer

Updates the details of an existing customer

When two profiles are merged into a single profile, that profile is assigned a new customer_id. You must use the new customer_id to update merged profiles.

You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the DeleteCustomerCard endpoint, then create a new one with the CreateCustomerCard endpoint.

Required permissions CUSTOMERS_WRITE

Path Parameters

Name Description
customer_id
string

Required

The ID of the customer to update.

Request Body

Name Description
address
Address

The physical address associated with the customer profile.

birthday
string

The birthday associated with the customer profile, in RFC-3339 format. Year is optional, timezone and times are not allowed. For example: 0000-09-01T00:00:00-00:00 indicates a birthday on September 1st. 1998-09-01T00:00:00-00:00 indications a birthday on September 1st 1998.

company_name
string

A business name associated with the customer profile.

email_address
string

The email address associated with the customer profile.

family_name
string

The family (i.e., last) name associated with the customer profile.

given_name
string

The given (i.e., first) name associated with the customer profile.

nickname
string

A nickname for the customer profile.

note
string

A custom note associated with the customer profile.

phone_number
string

The 11-digit phone number associated with the customer profile.

reference_id
string

An optional, second ID used to associate the customer profile with an entity in another system.

Response Fields

Name Description
customer
Customer

The updated customer.

errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
PUT /v2/customers/{customer_id}
cURL
  • cURL
  • Ruby
  • Python
curl https://connect.squareup.com/v2/customers/{customer_id} \
  -X PUT \
  -H 'Square-Version: 2019-11-20' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -d '{
    "phone_number": "",
    "email_address": "New.Amelia.Earhart@example.com",
    "note": "updated customer note"
  }'
Response JSON
{
  "customer": {
    "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4",
    "created_at": "2016-03-23T20:21:54.859Z",
    "updated_at": "2016-03-25T20:21:55Z",
    "given_name": "Amelia",
    "family_name": "Earhart",
    "email_address": "New.Amelia.Earhart@example.com",
    "address": {
      "address_line_1": "500 Electric Ave",
      "address_line_2": "Suite 600",
      "locality": "New York",
      "administrative_district_level_1": "NY",
      "postal_code": "10003",
      "country": "US"
    },
    "reference_id": "YOUR_REFERENCE_ID",
    "note": "updated customer note",
    "groups": [
      {
        "id": "16894e93-96eb-4ced-b24b-f71d42bf084c",
        "name": "Aviation Enthusiasts"
      }
    ]
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?