Product option value GET

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

This message enables you to fetch the option values for a given set of products. You can also optionally supply a set of values to fetch the options for. This allows you to make requests like:

  • fetch all the option values for a product or set of products,
  • obtain all the product IDs with a specific option value, e.g. the color red.

The product ID set provided with the request is limited to a potential size of 200 IDs. You can use the OPTIONS method on this resource to aid in constructing bulk requests. There is currently no restriction on the size of the option value ID set.

Example 1

Retrieve values for product 1000

Request URI

/product/1000/option-value

Response

{
	"response": [
		{
			"productId": 1000,
			"optionId": 1,
			"optionName": "Size",
			"optionValueId": 1,
			"optionValue": "Small"
		},
		{
			"productId": 1000,
			"optionId": 2,
			"optionName": "Color",
			"optionValueId": 4,
			"optionValue": "Red"
		}
	]
}

Example 2

Retrieve values for all red products in the given product ID range

Request URI

/product/1000-1010/option-value/4

Response

{
	"response": [
		{
			"productId": 1000,
			"optionId": 2,
			"optionName": "Color",
			"optionValueId": 4,
			"optionValue": "Red"
		},
		{
			"productId": 1001,
			"optionId": 2,
			"optionName": "Color",
			"optionValueId": 4,
			"optionValue": "Red"
		}
	]
}