Create a custom field
Headers
-
Content-Type string
-
Accept string
Body Required
-
The custom field type. Available options: string, number, selection, boolean, datetime and longtext
-
The name of the custom field. Must be unique for the model_type.
-
Denotes if the custom field is required. If required, it must be specified when creating/updating a model.
-
is_visible_to_clients boolean
Denotes if the custom field is visible and editable to clients and their fact-finds.
-
The type of model the custom field applies for. Available options: client, board_task, case, plan, task
-
help_text string
Optional help text to aide the custom field. Will be displayed on Plannr.
-
selection_options array[string]
If the type is "selection" this array must be provided. This is the array of available options for the selection box.
POST /api/v1/custom-field
curl \
-X POST https://api.plannrcrm.com/api/v1/custom-field \
-H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"type":"string","name":"Favourite Drink","is_required":true,"is_visible_to_clients":true,"model_type":"clients","help_text":"This is the client's favourite drink. You should make it for them before they arrive for meetings.","selection_options":["Tea","Coffee","Water"]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
# Payload
{
"type": "string",
"name": "Favourite Drink",
"is_required": true,
"is_visible_to_clients": true,
"model_type": "clients",
"help_text": "This is the client's favourite drink. You should make it for them before they arrive for meetings.",
"selection_options": [
"Tea",
"Coffee",
"Water"
]
}
Response examples (200)
{
"firm": {
"tax": 17.5,
"logo": "https://api.plannrcrm.com/images/plannr.jpg",
"name": "Codepotato",
"slug": "codepotato",
"uuid": "23daada2-8888-46af-ba0f-aa3af6c0155b",
"county": "Hampshire",
"billing": {
"invoice_email": "gareth@codepotato.co.uk",
"invoice_county": "Hampshire",
"invoice_country": "United Kingdom",
"invoice_postcode": "PO7 7YH",
"invoice_address_1": "Suite E, 5 The Briars",
"invoice_address_2": "Waterberry Drive",
"invoice_town_city": "Waterlooville"
},
"country": "United Kingdom",
"postcode": "PO7 7YH",
"address_1": "Suite E, 5 The Briars",
"address_2": "Waterberry Drive",
"logo_icon": "https://api.plannrcrm.com/images/plannr-icon.jpg",
"month_end": 25,
"town_city": "Waterlooville",
"created_at": "2024-11-20T13:24:04+00:00",
"updated_at": "2024-11-20T13:24:04+00:00",
"ip_whitelist": [
"192.168.0.1",
"127.0.0.1"
],
"brand_colours": {
"sidebar_text": "#ffffff",
"sidebar_hover": "#0A0A42",
"email_sub_text": "#ffffff",
"sidebar_accent": "#36367E",
"sidebar_active": "#53DBB8",
"email_background": "#0E0E56",
"email_button_text": "#ffffff",
"sidebar_background": "#0E0E56",
"sidebar_title_primary": "#FFC634",
"email_button_background": "#36367E",
"sidebar_title_secondary": "#ffffff",
"sidebar_title_background": "#36367E",
"email_logo_background_panel": "#36367E",
"sidebar_title_secondary_hover": "#ffffff"
},
"is_subscribed": true,
"regulatory_text": "Regulatory text",
"addon_subscriptions": "App\\Http\\Resources\\Addons\\AddonSubscriptionResource",
"statement_frequency": "monthly",
"task_board_template": "App\\Http\\Resources\\Board\\BoardResource",
"keep_deleted_files_for": 30,
"welcome_paragraph_html": "<h1>Welcome.</h1>",
"email_welcome_paragraph_html": "Welcome to Plannr!"
},
"name": "Favourite Drink",
"type": "string",
"uuid": "4c58cfc8-d5f5-4701-8ae6-f0e622b4c9f0",
"position": 5,
"help_text": "This is the client's favourite drink.",
"reference": "favourite_drink",
"created_at": "2024-11-20T13:24:04+00:00",
"model_type": "client",
"updated_at": "2024-11-20T13:24:04+00:00",
"is_required": false,
"selection_options": [
"Coffee",
"Tea",
"Water"
],
"is_visible_to_clients": true
}