Sales Credit OPTIONS

URI

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

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

Description

The sales credit OPTIONS message allows you to programmatically request URIs you need to call in order to request a set of sales credits in the fewest requests possible.

This message takes an optional ID set of sales credit IDs. If no sales credit IDs are specified then the URIs needed to fetch all sales credit will be returned.

The main use case for this message is that you have a large quantity of sales credits you need to request which exceeds our single request limit (currently set at 200). You want to retrieve all the orders in the fewest calls possible. Calling the OPTIONS message with all the IDs of the sales credits you require will return a list of URIs you need to call.

Example 1

Request all sales credits in the system.

Request URI

/sales-credit/

Response

{
	"response": {
		"getUris": [
			"/sales-credit/1-14,18-203",
			"/sales-credit/204-403",
			"/sales-credit/404-603",
			"/sales-credit/604-803"
		]
	}
}

Example 2

Request a subset of sales credits.

Request URI

/sales-credit/1-50,56,75-82,55,120,500-750

Response

{
	"response": {
		"getUris": [
			"/sales-credit/1-50,55,56,75-82,120,500-639",
			"/sales-credit/640-750"
		]
	}
}