Skip to content
Coritan Docs

Organization API: Customers: Custom fields

The 3 Organization API operations for custom fields.

View as Markdown

Part of Customers.

Method Path Summary
GET /api/v1/orgs/{org_slug}/custom-fields List custom fields
POST /api/v1/orgs/{org_slug}/custom-fields Create custom field
DELETE /api/v1/orgs/{org_slug}/custom-fields/{field_id} Delete custom field

GET /api/v1/orgs/{org_slug}/custom-fields

Name In Type Required
org_slug path string yes
applies_to query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

A 200 response is a list; each item has these fields:

Field Type
[].id integer
[].org_id integer
[].field_name string
[].label string
[].field_type string
[].applies_to string
[].validation_rules object or null
[].options array of any or null
[].default_value string or null
[].required boolean
[].is_indexed boolean
[].sort_order integer
[].created_at string (date-time) or null

POST /api/v1/orgs/{org_slug}/custom-fields

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
field_name string yes
label string yes
field_type string yes
applies_to string yes
validation_rules object or null no
options array of any or null no
default_value string or null no
required boolean no
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

Fields of a 201 response:

Field Type
id integer
org_id integer
field_name string
label string
field_type string
applies_to string
validation_rules object or null
options array of any or null
default_value string or null
required boolean
is_indexed boolean
sort_order integer
created_at string (date-time) or null

DELETE /api/v1/orgs/{org_slug}/custom-fields/{field_id}

Name In Type Required
field_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.