> For the complete documentation index, see [llms.txt](https://knowledge.out-smart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledge.out-smart.com/openapi/freefields.md).

# Freefields

## Get freefields

> Get a list of freefields created in the account. This endpoint gets the settings for each freefield, not the values from the fields on an entity.  \
> Each freefield record can contain the following data:\
> \
> \| Parameter | Description | Possible values |\
> \| --- | --- | --- |\
> \| fld\_entity | The entity the freefield is added to. For example to add a freefield on a workorder: WORKORDER | WORKORDER, PROJECT, INVOICE, QUOTE, OBJECT, CLIENT, CONTACTPERSON, MATERIAL, HOUR |\
> \| fld\_name | The displayed name of the freefield |  |\
> \| fld\_type | Data type of the freefield | TEXT, NUMBER, DROPDOWN, CHECKBOX, DATE, DATETIME |\
> \| fld\_values | Freefield assigned value |  |\
> \| fld\_reference\_name | Reference name used for referencing the freefield in form or email layouts |  |\
> \| fld\_order | Number and positioning of the freefield. For each entity 50 freefields can exist, numbered 1-50 | Numbered: 1-50 |\
> \| fld\_required | Marks whether this field is required on the entity it is added to. | BIT - 1=required, 0=not required |

```json
{"openapi":"3.1.0","info":{"title":"OpenApi","version":"1.0.0"},"servers":[{"url":"{{api_url}}"},{"url":"https://www.werkbonapp.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/freefields/":{"get":{"summary":"Get freefields","parameters":[{"name":"token","in":"query","schema":{"type":"string"}},{"name":"software_token","in":"query","schema":{"type":"string"}},{"name":"operator[]","in":"query","schema":{"type":"string"}},{"name":"key[]","in":"query","schema":{"type":"string"}},{"name":"value[]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Get freefields","headers":{"Date":{"schema":{"type":"string"}},"Server":{"schema":{"type":"string"}},"X-Frame-Options":{"schema":{"type":"string"}},"X-XSS-Protection":{"schema":{"type":"string"}},"X-Content-Type-Options":{"schema":{"type":"string"}},"Strict-Transport-Security":{"schema":{"type":"string"}},"Referrer-Policy":{"schema":{"type":"string"}},"Content-Security-Policy":{"schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"messages":{"type":"array"},"response":{"type":"array","items":{"type":"object","properties":{"fld_entity":{"type":"string"},"fld_name":{"type":"string"},"fld_type":{"type":"string"},"fld_values":{"type":"string"},"fld_reference_name":{"type":"string"},"fld_order":{"type":"string","format":"utc-millisec"},"fld_required":{"type":"string","format":"utc-millisec"}}}}}}}}}},"tags":["Freefields"],"description":"Get a list of freefields created in the account. This endpoint gets the settings for each freefield, not the values from the fields on an entity.  \nEach freefield record can contain the following data:\n\n| Parameter | Description | Possible values |\n| --- | --- | --- |\n| fld_entity | The entity the freefield is added to. For example to add a freefield on a workorder: WORKORDER | WORKORDER, PROJECT, INVOICE, QUOTE, OBJECT, CLIENT, CONTACTPERSON, MATERIAL, HOUR |\n| fld_name | The displayed name of the freefield |  |\n| fld_type | Data type of the freefield | TEXT, NUMBER, DROPDOWN, CHECKBOX, DATE, DATETIME |\n| fld_values | Freefield assigned value |  |\n| fld_reference_name | Reference name used for referencing the freefield in form or email layouts |  |\n| fld_order | Number and positioning of the freefield. For each entity 50 freefields can exist, numbered 1-50 | Numbered: 1-50 |\n| fld_required | Marks whether this field is required on the entity it is added to. | BIT - 1=required, 0=not required |"}}}}
```

## Add freefields

> Use this endpoint to register new freefields in the Outsmart account.  \
> Add freefields to a given entity. Note that setting the \`fld\_order\` with a number that already has freefield set to it, overwrites the existing freefield setting. Use the GET request to know which freefields have been set first, to avoid overwriting an existing field.\
> \
> For adding a dropdown freefield, fill the \`fld\_values\` with semicolon seperated values: \`value1;value2;value3\` etc. The values set will be the displayed options in the dropdown field.\
> \
> \| Parameter | Description | Possible values |\
> \| --- | --- | --- |\
> \| fld\_entity | The entity the freefield is added to. For example to add a freefield on a workorder: WORKORDER | WORKORDER, PROJECT, INVOICE, QUOTE, OBJECT, CLIENT, CONTACTPERSON, MATERIAL, HOUR |\
> \| fld\_name | The displayed name of the freefield |  |\
> \| fld\_type | Data type of the freefield | TEXT, NUMBER, DROPDOWN, CHECKBOX, DATE, DATETIME |\
> \| fld\_values | Freefield assigned value |  |\
> \| fld\_reference\_name | Reference name used for referencing the freefield in form or email layouts |  |\
> \| fld\_order | Number and positioning of the freefield. For each entity 50 freefields can exist, numbered 1-50 | Numbered: 1-50 |\
> \| fld\_required | Marks whether this field is required on the entity it is added to. | BIT - 1=required, 0=not required |

```json
{"openapi":"3.1.0","info":{"title":"OpenApi","version":"1.0.0"},"servers":[{"url":"{{api_url}}"},{"url":"https://www.werkbonapp.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/freefields/":{"post":{"summary":"Add freefields","parameters":[{"name":"token","in":"query","schema":{"type":"string"}},{"name":"software_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Response_200"}},"tags":["Freefields"],"description":"Use this endpoint to register new freefields in the Outsmart account.  \nAdd freefields to a given entity. Note that setting the `fld_order` with a number that already has freefield set to it, overwrites the existing freefield setting. Use the GET request to know which freefields have been set first, to avoid overwriting an existing field.\n\nFor adding a dropdown freefield, fill the `fld_values` with semicolon seperated values: `value1;value2;value3` etc. The values set will be the displayed options in the dropdown field.\n\n| Parameter | Description | Possible values |\n| --- | --- | --- |\n| fld_entity | The entity the freefield is added to. For example to add a freefield on a workorder: WORKORDER | WORKORDER, PROJECT, INVOICE, QUOTE, OBJECT, CLIENT, CONTACTPERSON, MATERIAL, HOUR |\n| fld_name | The displayed name of the freefield |  |\n| fld_type | Data type of the freefield | TEXT, NUMBER, DROPDOWN, CHECKBOX, DATE, DATETIME |\n| fld_values | Freefield assigned value |  |\n| fld_reference_name | Reference name used for referencing the freefield in form or email layouts |  |\n| fld_order | Number and positioning of the freefield. For each entity 50 freefields can exist, numbered 1-50 | Numbered: 1-50 |\n| fld_required | Marks whether this field is required on the entity it is added to. | BIT - 1=required, 0=not required |"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledge.out-smart.com/openapi/freefields.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
