Contact PATCH
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/contact-service/contact/{id}
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
This method allows you to modify specific contact fields while leaving others unmodified. Refer
to our
Field | Path (JSON pointer) | Data type | Supported operations |
---|---|---|---|
Salutation | /salutation | String |
|
First name | /firstName | String |
|
Last name | /lastName | String |
|
Telephone numbers | /communication/telephones/{PRI or SEC or MOB or FAX} | String | All operations |
Email addresses | /communication/emails/{PRI or SEC or TER}/email | String | All operations |
Receive email newsletter | /marketingDetails/isReceiveEmailNewsletter | Boolean |
|
Lead time | /leadTime | Integer |
|
Company Id | /companyId | Integer |
|
All patchable fields follow the same validation constraints as the contact POST method.
The response to a successful request will be the modified contact resource.
Example 1
Update the first name and primary email address of a contact
Request URI
/contact/205
Request body
[
{
"op": "replace",
"path": "/firstName",
"value": "Steve"
},
{
"op": "replace",
"path": "/communication/emails/PRI/email",
"value": "steve@email.com"
}
]
Example 2
Move the primary telephone number to the secondary telephone number, then provide
a new primary number
Request URI
/contact/205
Request body
[
{
"op": "move",
"from": "/communication/telephones/PRI",
"path": "/communication/telephones/SEC"
},
{
"op": "add",
"path": "/communication/telephones/PRI",
"value": "01234 567890"
}
]