Option GET
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}/product-service Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Returns the ID, name, sort order, createdOn and updatedOn of an option.
Each response entry includes createdOn and updatedOn.
Historically, Option GET responses did not include the createdOn and updatedOn fields. Older records may have newer dates (from when the fields were introduced), however this is intended for change detection rather than for a historical audit trail.
Example 1
Requesting all product options
Request URI
/option/
Response
{
"response": [
{
"id": 2,
"name": "Apples",
"sortOrder": 0,
"createdOn": "2020-01-01T01:02:03.000Z",
"updatedOn": "2020-01-02T03:04:05.000Z"
},
{
"id": 1,
"name": "Default",
"sortOrder": 0,
"createdOn": "2020-01-03T01:02:03.000Z",
"updatedOn": "2020-01-04T03:04:05.000Z"
},
{
"id": 4,
"name": "Oranges",
"sortOrder": 5,
"createdOn": "2020-01-05T01:02:03.000Z",
"updatedOn": "2020-01-06T03:04:05.000Z"
},
{
"id": 3,
"name": "Bananas",
"sortOrder": 100,
"createdOn": "2020-02-01T02:03:04.000Z",
"updatedOn": "2020-02-02T04:05:06.000Z"
}
]
}
Example 2
Requesting options using an ID set
Request URI
/option/1,4
Response
{
"response": [
{
"id": 1,
"name": "Default",
"sortOrder": 0,
"createdOn": "2020-01-03T01:02:03.000Z",
"updatedOn": "2020-01-04T03:04:05.000Z"
},
{
"id": 4,
"name": "Oranges",
"sortOrder": 5,
"createdOn": "2020-01-05T01:02:03.000Z",
"updatedOn": "2020-01-06T03:04:05.000Z"
}
]
}
