Update Customer

This endpoint can be used to update a Customer profile with additional information after creation (name, email address, phone number, etc.). If you wish to fully overwrite a customer record, see the PUT Customer endpoint. Not all combinations of paths and operations and values are allowed, even if both values are valid. Please keep in mind:

  • Individual values can be removed, but it is not possible to remove a whole customer entry collection. For example, {"op": "remove", "path" : "/emails"} is not allowed
  • type fields only accept predefined values - you can find the details in the documentation of the customer entries: Address, Chat Handles, Emails, Phones, Social Profile, Websites

Example payloads

Add new email

[
  {
    "op" : "add",
    "path" : "/emails",
    "value" : {
      "type" : "other",
      "value" : "bear@acme.com"
    } 
  }
]

Delete email

[
  {
    "op" : "remove",
    "path" : "/emails/1001"
  }
]

Update chat

[
  {
    "op" : "replace",
    "path" : "/chats/1002/value",
    "value" : "aim"
  }
]

Update multiple fields

[
  {
    "op" : "replace",
    "path" : "/firstName",
    "value" : "Vernon"
  },
  {
    "op" : "replace",
    "path" : "/lastName",
    "value" : "Bear"
  },
  {
    "op" : "add",
    "path" : "/emails",
    "value" : {
      "type" : "other",
      "value" : "bear@acme.com"
    } 
  } 
]

Request

PATCH /v2/customers/100 HTTP/1.1
Authorization: Bearer oauth_token
Content-Type: application/json; charset=UTF-8

[ {
  "op" : "replace",
  "path" : "/firstName",
  "value" : "Karl"
} ]

Path Parameters

/v2/customers/{customerId}

Request fields

Path Type Required Description
[].op String Y patch operation, one of
add
remove
replace
Not all combinations of path and operations are allowed.
[].path String Y path to field - both top level customer fields and customer entries are supported. Supported patch paths are:
/address/city
/address/country
/address/lines
/address/postalCode
/address/state
/age
/background
/chats
/chats/{chatId}
/chats/{chatId}/type
/chats/{chatId}/value
/emails
/emails/{emailId}
/emails/{emailId}/type
/emails/{emailId}/value
/firstName
/gender
/jobTitle
/lastName
/location
/organization
/phones
/phones/{phoneId}
/phones/{phoneId}/type
/phones/{phoneId}/value
/photoType
/photoUrl
/social-profiles
/social-profiles/{socialProfileId}
/social-profiles/{socialProfileId}/value
/social-profiles/{socialProfile}/type
/websites
/websites/{websiteId}
/websites/{websiteId}/value
[].value Varies N property value - different fields expect different formats

Response

HTTP/1.1 204 No Content
Keep-Alive: timeout=60
Connection: keep-alive