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 A field the brand keeps on its customers, services or products
DELETE /api/v1/orgs/{org_slug}/custom-fields/{field_id} Delete a 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

A field the brand keeps on its customers, services or products

Section titled A field the brand keeps on its customers, services or products

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

A field the brand keeps on its customers, services or products. Admins and the owner. 400 Invalid field_type or Invalid applies_to value for a word outside the lists; 409 when the organization already has a field of that name on the same records, since values are stored under the name. Audited as custom_field.created.

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}

Delete a custom field. The values records hold under its name stay, and a field made again with that name shows them. Admins and the owner; 404 for another organization's field. Audited as custom_field.deleted.

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.