POST
/
v2
/
custom-field
curl --request POST \
  --url https://api.sonderplan.com/v2/custom-field \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Booking Type",
  "description": "Select the type of booking",
  "type": "select",
  "options": [
    {
      "id": "4934",
      "name": "Video Editing",
      "order": "2"
    }
  ],
  "module": "booking",
  "order": 3,
  "required": true,
  "update_key": "2_1_8942"
}'
{
  "success": {
    "id": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Custom Field object that needs to be added

The default custom field schema

name
string
required

Name of the custom field

Example:

"Booking Type"

type
enum<string>
required

The type of the custom field

Available options:
text,
textarea,
select
Example:

"select"

module
enum<string>
required

The module that this custom field is linked to

Available options:
booking,
project,
people,
organization,
quote,
invoice,
quote_invoice,
billable_item
Example:

"booking"

description
string

Description of the custom field, shown in the UI at the help icon

Example:

"Select the type of booking"

options
object[]

The default custom field option schema

order
integer

Relative order id of this field in relation to other custom fields in the same module

Example:

3

required
boolean

Marks this field as required, enforced by the API and UI

Example:

true

update_key
string
deprecated

The update key to pass back when updating this field

Example:

"2_1_8942"

Response

200
application/json
Successful Operation
success
object