Custom Fields

Create a custom field definition

Define a new custom field on jobs, customers or resources for your whole organisation. Requires create:custom_field_definitions.

entity_type, field_key and field_type are fixed once created. is_required defaults to false; is_searchable and is_filterable default to true. The new field appears in the layout and form builder palettes; placing it on a form is done in the web app.

Returns 409 when a field with the same key already exists on that entity.

post/v1/custom-field-definitions

Request

  • Base URL: https://api.workwing.io
  • URL: https://api.workwing.io/v1/custom-field-definitions
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

Unique per write, 1-256 printable ASCII characters. Retrying with the same key and the same request replays the original response for 24 hours. See Idempotency.

Request body

entity_type'T_JOB' | 'T_CUSTOMER' | 'T_RESOURCE' required
field_keystring required

Stable key the value is stored against (lowercase letters, digits, underscores)

field_type'T_TEXT' | 'T_TEXTAREA' | 'T_NUMBER' | 'T_DATE' | 'T_DATETIME' | 'T_BOOLEAN' | 'T_SELECT' | 'T_MULTISELECT' | 'T_URL' | 'T_EMAIL' | 'T_PHONE' | 'T_SCANNER' required
field_labelstring required
field_descriptionstring nullable
display_sectionstring nullable
is_requiredboolean
is_searchableboolean
is_filterableboolean
field_configobject

Type-specific settings: minLength/maxLength/pattern for text, min/max/step/unit for numbers, minDate/maxDate for dates, options for select and multiselect, allowedBarcodeTypes/scannerHint for scanner.

Response

Default Response

Changes

No recorded changes to this operation across all 1 revision of this API.