Custom Field PATCH

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/contact-service/contact/{contact-id}/custom-field

Refer to our documentation on URI syntax for more information on how to construct URIs.

Description

This message enables you to edit custom fields for an existing customer or supplier. You do not need to specify if the contact is a customer or supplier. The fields available to a contact are defined from within the application and cannot be altered here (but you can get a list of them with a custom field metadata GET request).

You can use a single PATCH call to execute a batch of operations. Please refer to the HTTP PATCH documentation for a more detailed explanation of the operations and syntax of HTTP PATCH.

If successful, this endpoint returns the new state of the contacts's custom fields as if you had performed a custom field GET.

Example

Updating Contact 513: replace PCF_BESTALBUM value, add PCF_DEBUTALBUM value.

Request URI

/contact/513/custom-field

Request body

[
	{
		"op": "replace",
		"path": "/PCF_BESTALBUM",
		"value": "Hail to the Thief"
	},
	{
		"op": "add",
		"path": "/PCF_DEBUTALBUM",
		"value": "Pablo Honey"
	}
]

Response

{
	"response": {
		"PCF_BESTALBUM": "Hail to the Thief",
		"PCF_DEBUTALBUM": "Pablo Honey",
		"PCF_NUMBEROFALBUMS": 8
	}
}