Contact OPTIONS

URI

https://{DATACENTER}.brightpearl.com/public-api/{ACCOUNT}
/contact-service/contact/{ID-SET}

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

Description

The contact OPTIONS message allows you to programmatically request a set of URIs you need to call if you would like to retrieve a large set of contacts.

The method takes an optional ID set of contact IDs. If you do not specify an ID set then you are requesting all contacts.

This method exists as we limit the number of contacts you can request using the GET message to ease the load on our servers. The limit for one request is currently set to 200 contacts.

A typical scenario is that your Brightpearl account contains 20,000 contacts and you would like to request them all. You would make a call to the /contact/ URI using OPTIONS. The response of the request will be a series of URIs. You will need to perform a Contact GET on each of these to retrieve all your contacts.

Example 1

Requesting URIs for all contacts.

Request URI

/contact/

Response

{
	"response": {
		"getUris": [
			"/contact/1-4,200-209,250-435",
			"/contact/436-500"
		]
	}
}

Example 2

Requesting required URIs for contacts in the range of 250 to 500.

Request URI

/contact/250-500

Response

{
	"response": {
		"getUris": [
			"/contact/250-449",
			"/contact/450-500"
		]
	}
}