Custom Fields
Custom Fields allow organizations to attach additional metadata to dimension records at the time of scanning.
Before Custom Fields can be used, they must first be created and configured for your organization on the Spectre Licensing Server. Only an organization admin can manage custom fields. Once configured, they can be retrieved via the API and submitted alongside dimension requests.
The examples seen here will have sample authentication methods. For more details on how to authenticate with these APIs, please see the Authentication Methods page.
The Licensing Server is separate from Spectre Dimensioner API calls and uses a different endpoint. For security, requests to https://spectre-licensing.com MUST use HTTPS (local Spectre device requests may still use HTTP).
CustomFields
Retrieving Custom Fields
Fetch the list of custom fields configured for your organization. Use the field definitions returned here to build your custom field payload when commanding a dimension.
Endpoint
Response
The response contains two arrays:
customFieldValues— The custom fields configured for the organization, including their type, name, and validation rules.customFieldDropDownValues— The selectable values for any Dropdown fields, matched to a parent field viacustomFieldID.
{
"customFieldValues": [
{
"customFieldID": 2143,
"name": "BoxID",
"fieldType": 3,
"required": false,
"regex": null,
"aiEnabled": false
},
{
"customFieldID": 2263,
"name": "Shipping address",
"fieldType": 0,
"required": false,
"regex": null,
"aiEnabled": true
},
{
"customFieldID": 2264,
"name": "Packed",
"fieldType": 2,
"required": false,
"regex": null,
"aiEnabled": false
},
{
"customFieldID": 2265,
"name": "Consignee",
"fieldType": 0,
"required": false,
"regex": null,
"aiEnabled": true
},
{
"customFieldID": 2270,
"name": "Carrier",
"fieldType": 3,
"required": false,
"regex": null,
"aiEnabled": true
}
],
"customFieldDropDownValues": [
{
"customFieldDropDownValueID": 1,
"value": "Test One",
"customFieldID": 233
},
{
"customFieldDropDownValueID": 269,
"value": "CRATE",
"customFieldID": 2143
},
{
"customFieldDropDownValueID": 270,
"value": "PALLET",
"customFieldID": 2143
},
{
"customFieldDropDownValueID": 271,
"value": "SELFPACK",
"customFieldID": 2143
},
{
"customFieldDropDownValueID": 272,
"value": "UPS",
"customFieldID": 2270
},
{
"customFieldDropDownValueID": 273,
"value": "FEDEX",
"customFieldID": 2270
}
]
}
Field Types
fieldType | Type | Notes |
|---|---|---|
0 | Text | Free-form string value |
1 | Number | Numeric value |
2 | Checkbox | Boolean (true / false) |
3 | Dropdown | Only functional in Licensing and Spectre-Link; treated as a text field when submitting CustomFields values. Use customFieldDropDownValues for reference only. |
4 | AutoIncrement | Only functional in Licensing and Spectre-Link; treated as a number when submitting CustomFields values. |
fieldType 3 (Dropdown) and fieldType 4 (AutoIncrement) are not enforced when submitting CustomFields values. Dropdown fields will accept any string value, and AutoIncrement fields will accept any number. The customFieldDropDownValues array is provided for informational purposes.