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

| attribute      | type   | description                                                                                                                                                     |
| ---------------| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| attributeID    | string | Unique identifier for the attribute                                                                                                                          |
| companyID      | string | Unique identifier for Zeal company                                                                                                                            |
| type           | string | Type of paperwork form. Holds one of the following values:<br>`boolean`, `options`, `string`                                                                   |
| description     | string | Description of the paperwork form                                                                                                                              |
| options        | array  | Array of options, represented as objects. Each option object includes `name` and `value`. **Only applicable if`type` is `options`**                        |
| constraints    | object | The constraints object includes `minLength` (minimum length of string), `maxLength` (minimum length of string) and `pattern` (regex constraint, if applicable). **Only applicable if`type` is `string`** |
| name           | string | Human-friendly name of the attribute (used and viewed by admins)                                                                                             |
| label          | string | The label of the field. This will show as the label to workers                                                                                               |
| value          | object | Value of the attribute                                                                                                                                        |
| defaultValue   | string | Default value                                                                                                                                                  |

## Example Custom Attribute Object

### Boolean Example

```json
{
  "companyID": "dcb3bd9403ad41c98bbc2b4d54d88a44",
  "attributeID": "694eb6b0-6441-4150-88a2-5bd0fae84171",
  "type": "boolean",
  "description": "",
  "name": "Acknowledge",
  "label": "Agree",
  "value": "false",
  "defaultValue": false
}
```

### String Example

```json
{
  "companyID": "6cb3b69463ad41c986bc2b6d64d68a46",
  "attributeID": "c3267432fa464fd8b9b79b0d53552562",
  "type": "string",
  "name": "test text",
  "label": "test text",
  "description": "",
  "constraints": {
    "minLength": 5,
    "maxLength": 10,
    "pattern": null
  },
  "value": " ",
  "defaultValue": " "
}
```

### Options Example

```json
{
  "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": " "
}
```
