Sales Order OPTIONS

URI

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

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

Description

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

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

The main use case for this message is that you have a large quantity of sales orders 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 orders you require will return a list of URIs you need to call.

Example 1

Request all sales orders in the system.

Request URI

/sales-order/

Response

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

Example 2

Request a subset of sales orders.

Request URI

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

Response

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