Custom fields

Custom field definitions - what the flexible fields on this install are called, what they accept, and which resource each belongs to. Hand-built: the engine must not serve flexfield generically, because a generic read would return the definitions this endpoint deliberately hides.

The object#

FieldTypeDescription
idintegerNolaPro id of the definition.
keyrequest-onlystring(100)The name to use when reading or writing this field's value. Given, not derived. Published from flexfield.internalname, not a column of that name.
resourcerequest-onlystring(60)The API resource this field is attached to, e.g. customers. Published from flexfield.tablename, not a column of that name.
tablerequest-onlystring(100)The underlying table. Published from flexfield.tablename, not a column of that name.
labelrequest-onlytextWhat the screens call it. Published from flexfield.displayname, not a column of that name.
typerequest-onlystring(20)One of text, select, checkbox, date, radio, textarea, integer, number, file, url, phone. Published from flexfield.fieldtype, not a column of that name.
requiredbooleanThe screens refuse to save without it.
readonlybooleanDisplayed but not editable.
defaultrequest-onlystring(255)Value used when none is given. Published from flexfield.defaultvalue, not a column of that name.
sortorderintegerDisplay order.
notesstring(255)Help text shown beside the field.
optionsarray of objectAllowed values, for select and radio fields.

Endpoints#

GET/customfields 200422

The custom fields configured on this install.

What custom fields exist, what type each is, whether it is required, and - for a select - the values it accepts. Values alone are not usable: receiving {"warranty_code": "AX-9"} tells you nothing about whether that field is required or what it accepts, and you would find out by having a write rejected. Read this first. key is the name to use, and it is given rather than derived. Most fields carry an internal name; a few do not, and those get a stable custom_<id> instead. Do not build the key yourself. Fields NolaPro marks as hidden are excluded - the screens do not show them and neither does this.

Requires scope customers:read.

Parameters
NameInTypeNotes
resourcequerystringLimit to one resource, e.g. customers. An unknown name is refused rather than answered with an empty page.
When it fails
StatusCodeMeaning
422unknown_valueThe resource named does not exist.
curl \
  'https://acme.nolapro.com/!/api/v2/customfields' \
  -H 'Authorization: Bearer $NP_TOKEN'