Product Price OPTIONS

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/product-service/product-price/{PRODUCT-ID-SET}/price-list/{PRICE-LIST-ID-SET}

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

Description

The product price OPTIONS messages allows you to programmatically request a set of URIs you need to call if you would like to retrieve a large set of product prices.

  • The method takes an optional ID set of product IDs.
  • If you do not specify an ID set then you are requesting all products.
  • You can optionally request the prices for products on particular price lists by adding '/price-list/{PriceList-Id-Set}' to the URI.
  • If you wish to filter by price list on all products you need to add the wild card '*' in the place of the product ID set. i.e.
    • /product-price/*/price-list/1-5

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

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

Example 1

Requesting the Minimal set of URIs for all product prices.

Request URI

/product-price/

Response

{
	"response": {
		"getUris": [
			"/product-price/1000-1199",
			"/product-price/1200-1399",
			"/product-price/1400-1599"
		]
	}
}

Example 2

Requesting the minimal set of URIs for product prices for products with IDs in range 100-500.

Request URI

/product-price/100-500

Response

{
	"response": {
		"getUris": [
			"/product-price/100-299",
			"/product-price/300-499",
			"/product-price/500"
		]
	}
}

Example 3

Requesting the Minimal set of URIs for product prices for products with IDs in range 100-500 on price list 2 and 3.

Request URI

/product-price/100-500/price-list/2-3

Response

{
	"response": {
		"getUris": [
			"/product-price/100-299/price-list/2-3",
			"/product-price/300-499/price-list/2-3",
			"/product-price/500/price-list/2-3"
		]
	}
}

Example 4

Requesting the Minimal set of URIs for product prices for all products on price lists 2 and 3.

Request URI

/product-price/*/price-list/2-3

Response

{
	"response": {
		"getUris": [
			"/product-price/1000-1199/price-list/2-3",
			"/product-price/1200-1399/price-list/2-3",
			"/product-price/1400-1599/price-list/2-3"
		]
	}
}