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
Request URI
/product-price/
Response
{
"response": {
"getUris": [
"/product-price/1000-1199",
"/product-price/1200-1399",
"/product-price/1400-1599"
]
}
}
Example 2
Request URI
/product-price/100-500
Response
{
"response": {
"getUris": [
"/product-price/100-299",
"/product-price/300-499",
"/product-price/500"
]
}
}
Example 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
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"
]
}
}