Contact PATCH

URI

https://{DATACENTER}.brightpearl.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 HTTP PATCH documentation to see the benefits of PATCH over PUT and learn more about the unique syntax.

Field Path (JSON pointer) Data type Supported operations
Salutation /salutation String
  • test
  • add
  • replace
  • remove
First name /firstName String
  • test
  • add
  • replace
Last name /lastName String
  • test
  • add
  • replace
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
  • test
  • replace
Lead time /leadTime Integer
  • replace
Company Id /companyId Integer
  • replace

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"
	}
]