Custom Attribute Object

The Custom Attribute object represents an attribute that can be set on an employee or contractor.

attributetypedescription
attributeIDstringUnique identifier for the attribute
companyIDstringUnique identifier for Zeal company
typestringType of paperwork form. Holds one of the following values:
boolean, options, string
descriptionstringDescription of the paperwork form
optionsarrayArray of options, represented as objects. Each option object includes name and value. Only applicable iftype is options
constraintsobjectThe constraints object includes minLength (minimum length of string), maxLength (minimum length of string) and pattern (regex constraint, if applicable). Only applicable iftype is string
namestringHuman-friendly name of the attribute (used and viewed by admins)
labelstringThe label of the field. This will show as the label to workers
valueobjectValue of the attribute
defaultValuestringDefault value

Example Custom Attribute Object

{
  "companyID": "dcb3bd9403ad41c98bbc2b4d54d88a44",
  "attributeID": "694eb6b0-6441-4150-88a2-5bd0fae84171",
  "type": "boolean",
  "description": "",
  "name": "Acknowledge",
  "label": "Agree",
  "value": "false",
  "defaultValue": false
}
{
  "companyID": "6cb3b69463ad41c986bc2b6d64d68a46",
	"attributeID": "c3267432fa464fd8b9b79b0d53552562",
  "type": "string",
  "name": "test text",
  "label": "test text",
  "description": "",
  "constraints": {
  	"minLength": 5,
  	"maxLength": 10,
  	"pattern": null
  },
  "value": " ",
  "defaultValue": " "
}
{
  "companyID": "6cb3b69463ad41c986bc2b6d64d68a46",
  "attributeID": "9ecd856e8b3c4337a6330dcadf2a8fc4",
  "type": "options",
  "name": "T-shirt size",
  "label": "T-shirt size",
  "description": "",
  "options": [
        {
          "value": "S",
          "name": "S"
        },
        {
          "value": "M",
          "name": "M"
        },
        {
          "value": "L",
          "name": "L"
        },
        {
          "value": "XL",
          "name": "XL"
        }
  ],
  "value": "XS",
  "defaultValue": " "
}