Deze referentie is alleen in het Engels. Naar het Nederlandse REST API-overzicht

Diese Referenz gibt es nur auf Englisch. Zur deutschen REST-API-Übersicht

Cette référence existe uniquement en anglais. Aller à la présentation de l'API REST en français

Esta referencia solo está en inglés. Ir a la introducción de la API REST en español

Custom fields

Custom fields

Read and write the fields your organisation added to projects, customers, contacts, users, work items and agenda events, and look up what each field takes.

View as Markdown

An organisation can add its own fields to its record types under Settings > Modules > Custom fields in plnnrly. Over the API, those values sit in one object on the record, custom_fields, keyed by each field's code. These resources carry it:

ResourceReadWrite
ProjectsGET /projects/{project}POST /projects, PATCH /projects/{project}
CustomersGET /customers/{customer}POST /customers, PATCH /customers/{customer}
ContactsGET /contacts/{contact}POST /contacts, PATCH /contacts/{contact}, for a customer's contacts only
UsersGET /users/{user} and GET /menot over the API
Work itemsGET /work-items/{work_item}POST /work-items, PATCH /work-items/{work_item}
Agenda eventsGET /events/{event}POST /events, PATCH /events/{event}
Note:

Custom fields are there only while your organisation has added the Custom fields module and switched it on. Without it, GET /custom-fields answers 404 endpoint-not-found and every record's custom_fields is {}.

Reading values

custom_fields is part of a record's detail view: one record (GET /customers/{customer}) or a list with view=detail. It lists every active field of that record type, with null for a field that has no value:

JSON
{
  "id": 3107,
  "name": "Acme Logistics",
  "custom_fields": {
    "licence_plate": "AB-12-CD",
    "fleet_size": 4,
    "fuel_type": 12,
    "regions": [31, 33],
    "contract_value": "12500.00",
    "renewal_date": "2027-01-31",
    "notes": null
  }
}

Each value has the shape of its field's type:

typeValue
text, textarea, color-picker, markdown-editora string
rich-editorHTML, sanitised the way plnnrly shows it
email, phone, link, tags-inputa list of strings
numberan integer
currencya decimal string, such as "12500.00"
dateYYYY-MM-DD
date-timea UTC date-time with a Z, such as 2026-11-04T09:30:00Z
checkbox, toggletrue or false
select, radio, toggle-buttonsthe id of the chosen option
multi-select, checkbox-lista list of option ids

A contact only takes custom fields while it belongs to a customer: a user's emergency contact always has {}. On a recurring agenda event, the values belong to the whole series. An occurrence that was edited on its own keeps its own copy, so a later change to the series does not reach it.

What each field means

GET /custom-fields lists the active fields, and GET /custom-fields/{custom_field} reads one. Narrow the list to one record type with filter[entity_type]=customer:

JSON
{
  "id": 41,
  "code": "fuel_type",
  "name": "Fuel type",
  "description": "What most of the fleet runs on.",
  "type": "select",
  "entity_type": "customer",
  "section": { "id": 6, "name": "Fleet" },
  "required": false,
  "api_writable": true,
  "sort_order": 3,
  "options": [
    { "id": 12, "name": "Diesel" },
    { "id": 13, "name": "Electric" }
  ]
}
  • The code is the key in custom_fields. It never changes once the field exists, so store code rather than name.
  • Options are the ids a choice takes, in order, in options. A value is always an option id, never its name.
  • A required field (required is true) may be left out of a write, but not cleared.
  • A read-only field has api_writable set to false: the API cannot set it.
  • entity_type is one of project, customer, contact, user, work_item and event.

You only see the fields of record types you may read, with a token that reaches them. The endpoints need no permission of their own, and any token with a read ability reaches them.

Writing values

Send custom_fields with a record's POST or PATCH, holding only the codes you change. A code you leave out keeps its value, and null clears one:

HTTP
PATCH /api/v2/customers/3107
Content-Type: application/json

{
  "custom_fields": {
    "fleet_size": 5,
    "notes": null
  }
}

This sets fleet_size, clears notes and leaves licence_plate, fuel_type and the others as they were. The record's updated_at and ETag move even when only custom fields changed, so conditional requests and sync see the change. On a work item, a changed value raises version once, together with any other field in the same PATCH.

A write is refused with 422 validation-failed, its error pointing at the field, such as /custom_fields/fuel_type, when:

  • the code is not an active field of that record type, or the field is not api_writable (prohibited);
  • the value does not fit the field, such as an option id of another field, or a date in another format;
  • a required field is sent as null (required);
  • the organisation does not use custom fields, or the record takes none, such as a user's emergency contact, and custom_fields is not empty (prohibited).

What is not supported yet

  • No filtering or sorting by a custom field. Lists cannot be narrowed or ordered by a value in custom_fields. Read the records and filter them yourself.
  • Fields are managed in plnnrly only. The API reads field definitions but cannot add, change or remove them.

See What the API cannot do for the rest.