Dealing with custom fields
Custom fields can be added to a lot of different types. See GET custom-fields.json
and similar endpoints. These are custom field “definitions”. Let’s say you added a “favourite colour” custom field to contacts. If you were then to GET contacts/1.json
, you’d see that custom field listed with no value, like:
{
"contact": {
"id": 1,
...,
"custom": {
"favouriteColour_1542273270122674764": null,
},
...
}
}
To update this custom field, you can do it via PATCH contacts/1.json
like so:
{
"contact": {
"custom": {
"favouriteColour_1542273270122674764": "teal",
},
}
}
Note: custom fields can vary in type (e.g. text, dropdown, URL, etc.) and have validation (e.g. mandatory or not). The API will validate against this.
Feedback
If you have any feedback or suggestions, feel free to contact us at api@teamwork.com.