Get Custom Field values of a record

GET/api/custom-fields/values/{relatedTo}/{id}

Returns every custom field defined for the given context together with the value stored for the given record. Fields that have no stored value yet are returned with a null value.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
relatedTo String Context the record belongs to
id Number Unique ID of the record inside that context (e.g. the client id when relatedTo is clients)
curl -X GET "https://yoursite.com/api/custom-fields/values/lead/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
  {
    "custom_field_id": "3",
    "title": "Region",
    "title_language_key": "",
    "placeholder": "",
    "placeholder_language_key": "",
    "field_type": "select",
    "options": "North,South",
    "required": "0",
    "sort": "1",
    "related_to": "clients",
    "template_variable_name": "",
    "visible_to_admins_only": "0",
    "hide_from_clients": "0",
    "disable_editing_by_clients": "0",
    "show_on_kanban_card": "0",
    "custom_field_value_id": "17",
    "value": "North"
  },
  {
    "custom_field_id": "4",
    "title": "Renewal date",
    "field_type": "date",
    "options": "",
    "required": "0",
    "sort": "2",
    "related_to": "clients",
    "custom_field_value_id": null,
    "value": null
  }
]

Unknown-Record:

HTTP/1.1 404 Not Found
{ "status": false, "messages": { "error": "No data were found" } }

Invalid-Context:

HTTP/1.1 400 Bad Request
{ "status": false, "messages": { "related_to": "Invalid context. Allowed values: clients, client_contacts, ..." } }
MethodGET
Path/api/custom-fields/values/{relatedTo}/{id}
GroupCustom Fields
Sincev1.0.0
Defined inRestApi/Controllers/CustomFieldsController.php