Product Type GET
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}/product-service/product-type/{ID-SET} Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Returns the id, name, createdOn and updatedOn of a product type along with any associatedOptions.
Each response entry includes createdOn and updatedOn.
Historically, Product Type 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 Types. Note product type with id 2 has some associated
options.
Request URI
/product-type/
Response
{
"response": [
{
"id": 1,
"name": "Default",
"createdOn": "2020-01-01T01:02:03.000Z",
"updatedOn": "2020-01-02T03:04:05.000Z"
},
{
"id": 2,
"name": "Clothes",
"createdOn": "2020-01-03T01:02:03.000Z",
"updatedOn": "2020-01-04T03:04:05.000Z",
"associations": {
"options": [
{
"id": 3,
"name": "Color"
},
{
"id": 4,
"name": "Size"
}
]
}
},
{
"id": 3,
"name": "Other",
"createdOn": "2020-01-05T01:02:03.000Z",
"updatedOn": "2020-01-06T03:04:05.000Z"
}
]
}
Example 2
Requesting Product Types using an Id Set.
Request URI
/product-type/1,3
Response
{
"response": [
{
"id": 1,
"name": "Default",
"createdOn": "2020-01-01T01:02:03.000Z",
"updatedOn": "2020-01-02T03:04:05.000Z"
},
{
"id": 3,
"name": "Other",
"createdOn": "2020-01-05T01:02:03.000Z",
"updatedOn": "2020-01-06T03:04:05.000Z"
}
]
}
