Product option value OPTIONS

URI

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

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

Description

Using the OPTIONS HTTP method on the product option values resource allows you to generate a set of URIs for use with the GET method. This is useful when you want to request more product values than the GET limit of 200.

You can provide a wildcard (*) product ID set to generate the URIs to query every product.

As there is no limit on the number of option value IDs that can be requested, it is not necessary to provide them. However, if you will be using the GET with this ID set, you should supply it, as:

  1. the provided ID set will automatically be appended to the generated URIs, so you can use them directly without needing modifications,
  2. a restriction to the number of option value IDs may be introduced in future, in which case the generated URIs may have variable option value ID sets.

Example 1

Obtain a set of GET URIs for a product ID set

Request URI

/product/1000-2000/option-value

Response

{
	"response": {
		"getUris": [
			"/product/1000-1199/option-value",
			"/product/1200-1250,1251-1350/option-value"
		]
	}
}

Example 2

Obtain a set of GET URIs for a product ID set and option value ID set

Request URI

/product/1000-2000/option-value/1-20

Response

{
	"response": {
		"getUris": [
			"/product/1000-1199/option-value/1-20",
			"/product/1200-1250,1251-1350/option-value/1-20"
		]
	}
}

Example 3

Generate all the GET URIs required to find all products in this account with the color red (option value ID 4)

Request URI

/product/*/option-value/4

Response

{
	"response": {
		"getUris": [
			"/product/1000-1199/option-value/4",
			"/product/1200-1399/option-value/4",
			"/product/1400-1599/option-value/4",
			"/product/1600-1605/option-value/4"
		]
	}
}