Create a custom field (create)
The create Ortto endpoint of the custom-field entity is used to create one or more custom contact (person) or account (previously organization) fields in Ortto’s customer data platform (CDP).
Most field types are supported when creating a custom field, and follow the same rules/limits seen when creating a field the Ortto app. The field type not supported is aggregate.
NOTE: Up to 100 custom fields can be added to an Ortto account/instance.
This page provides descriptions of this endpoint’s:
- the response payload.
HTTP method and request resources
Custom contact field endpoint
POST https://api.ap3api.com/v1/person/custom-field/createCustom accounts (previously organization) field endpoint
POST https://api.ap3api.com/v1/accounts/custom-field/createNOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
Path and query parameters
This endpoint takes no additional path and/or query parameters.
Headers
This endpoint requires a custom API key and content type (
application/jsonfor the request body) in the header of the request:
X-Api-Key: CUSTOM-PRIVATE-API-KEYContent-Type: application/jsonRequest body
The request body consists of a JSON object with the valid elements listed in the table below.
The following JSON objects are examples of requests to create custom fields in your Ortto account’s CDP.
NOTE:
Onlysingle_selectandmulti_selectfield types require thevalueskey. Duplicatenamevalues are not allowed.Example create text field request body
{ "type": "text", "name": "apiCreateTextField" "track_changes": false }Example create single-select field request body
{ "type":"single_select", "name":"apiCreateSingleSelectField", "values": ["option1", "option 2"] }Valid request body elements
Element
Type
Description
type
stringSpecify the type of field to create. See the table below for a list of all possible field types.
name
stringThe name of the field.
valuesarray of strings
Provide the options available when using a single-select or multi-select field.
track_changes
boolTurn On or Off field change tracking. Learn more about field update tracking.
Available field types:
Field type
Input
Description
Text
textAny combination of letters and numbers whose length is 500 characters or fewer, irrespective of the language used.
Long text
large_textA text field type whose length is 500 characters or more, irrespective of the language used.
Number
integerA whole (integer) number.
Decimal number
decimalA decimal (floating point) number.
Currency
currencyA decimal number displayed as currency.
The currency symbol used to represent this field’s values in person and account record data is based on the Default currency settings (accessible through the General settings page).
Multi currency
priceA decimal number displayed as international currency.
The currency symbol used to represent this field’s values in person and account record data is based on the ISO currency code supplied with the field data. See also List of currencies.
Date
dateA specific day, month and year.
Time and date
timeA specific time and date.
Boolean
boolA
true(on) orfalse(off) value.Phone number
phoneA local or international phone number.
Single select
single_selectA list of values you define from which a single item can be selected.
When choosing this field type, use
valuesto specify each value from which multiple items can be selected.Multi select
multi_selectA list of values you define from which multiple items can be selected.
When choosing this field type, use
valuesto specify each value from which multiple items can be selected.Link
linkThe URL of a webpage or file.
Object
objectA JSON object containing custom data.
Response payload
The response payload consists of a JSON object with the elements listed in the table below.
The following JSON object is an example of people’s data that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.
Example create text field response payload from Ortto’s CDP
json
{ "name": "apiCreateTextField", "field_id": "str:cm:apicreatetextfield", "display_type": "text", "track_changes": false }Example create single select field response payload from Ortto’s CDP
json
{ "name": "apiCreateSingleSelectField", "field_id": "str:cm:apicreatesingleselectfield", "display_type": "single_select" "values": [ "option1", "option 2" ], "track_changes": false }Response payload elements
The following table lists all elements (arrays, objects, or fields) in the response from a request to this endpoint.
Element
Type
Description
name
stringThe
namefor the custom field specified in the request body.
field_id
stringThe person field ID for the custom field. Learn more about Ortto’s person fields.
display_type
stringThe name for the field
typespecified in the request body.
valuesarray of strings
The names of the values specified in the request body.
track_changes
boolWhether field updates are being tracked or not.