Product Custom Field GET
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/product-service/product-custom-field/{IDSET}
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Get the custom data held against product(s).
An ID set is required in the request. The response does not distinguish between products which do not exist and products that do not have any custom fields associated with them: in both cases an empty object is returned for that product ID.
Example 1
Get the custom fields for product 3158
Request URI
/product-custom-field/3158
Response
{
"response": {
"3158": {
"PCF_CLNOTE": "This is a note",
"PCF_DESCRIPT": "This is a description",
"PCF_WIDTH": "100",
"PCF_TEXT": "This is text"
}
}
}
Example 2
Get the custom fields for products 3158-3160
Request URI
/product-custom-field/3158-3160
Response
{
"response": {
"3158": {
"PCF_CLNOTE": "This is a note",
"PCF_DESCRIPT": "This is a description",
"PCF_WIDTH": "100",
"PCF_TEXT": "This is text"
},
"3159": {
"PCF_CLNOTE": "This is another note",
"PCF_DESCRIPT": "This is another description",
"PCF_WIDTH": "200",
"PCF_TEXT": "This some more text"
},
"3160": {
"PCF_CLNOTE": "This is a third note",
"PCF_DESCRIPT": "This is a third description",
"PCF_WIDTH": "300",
"PCF_TEXT": "This some extra text"
}
}
}
Example 3
Get the custom fields for a product that does not exist
Request URI
/product-custom-field/6000
Response
{
"response": {
"6000": {
}
}
}
Example 4
Get the custom fields for a product that does not have custom fields set.
Request URI
/product-custom-field/3161
Response
{
"response": {
"3161": {
}
}
}