Custom Field Metadata GET

URI

https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/order-service/{sale|purchase}/custom-field-meta-data/{ID-SET}

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

Description

Get the custom fields defined for an order. This message accepts an optional ID-Set to allow you to request only a limited amount of custom field definitions.

Example 1

Get all custom fields defined for purchases

Request URI

/purchase/custom-field-meta-data

Response

{
	"response": [
		{
			"id": 5,
			"code": "PCF_IDREF",
			"name": "id-ref",
			"customFieldType": "TEXT",
			"required": false
		},
		{
			"id": 6,
			"code": "PCF_ONOFFER",
			"name": "on-offer",
			"customFieldType": "YES_NO",
			"required": false
		},
		{
			"id": 7,
			"code": "PCF_COLOR",
			"name": "color",
			"customFieldType": "SELECT",
			"required": false,
			"options": {
				"7": {
					"id": 7,
					"value": "black"
				},
				"8": {
					"id": 8,
					"value": "white"
				}
			}
		}
	]
}

Example 2

Get custom fields for sales using an ID-set

Request URI

/sale/custom-field-meta-data/5,7

Response

{
	"response": [
		{
			"id": 5,
			"code": "PCF_IDREF",
			"name": "id-ref",
			"customFieldType": "TEXT",
			"required": false
		},
		{
			"id": 7,
			"code": "PCF_COLOR",
			"name": "color",
			"customFieldType": "SELECT",
			"required": false,
			"options": {
				"7": {
					"id": 7,
					"value": "black"
				},
				"8": {
					"id": 8,
					"value": "white"
				}
			}
		}
	]
}