Field definitions
get
https://app.iteras.dk/api/fields/
The /api/fields/ endpoint enables you to retrieve
information about the fields defined in Iteras.
Parameters
All parameters are optional.
-
id stringField ids, e.g.
?id=birthday&id=:Cancellation reason. Can be repeated. The id is either the field name with a colon prepended or if defined the external identifier of the field. Remember to URL encode the ids.
Return value
The data returned is an object with an array of field definitions,
possibly empty, like this {"fields": [{"id": "birthday", ...}]}.
Each field definition object may contain the following attributes:
-
name stringThe field name, e.g.
Birthday. -
id stringThe field id, either the field name with a colon prepended or the external identifier of the field, e.g.
birthday. Use it to refer to the field, e.g. as a key indata. -
type stringThe field type, e.g.
text,choice,number,date,bool. -
choices array
The choices the field accepts, e.g.
[{"name": "Personal", "customer_facing": true}]. Included only for fields with choices.-
customer_facing boolWhether the choice is shown to customers in self-service, e.g.
true. -
name stringThe choice name, e.g.
Personal. -
help_text stringExplanatory text shown next to the choice, e.g.
Choose this if you subscribe yourself. Included if set. -
identifier stringThe external identifier of the choice, used when setting the field, e.g.
personal. Included if set.
-
{
"fields": [
{
"name": "Title",
"id": ":Title",
"type": "text"
},
{
"name": "Subscription type",
"id": ":Subscription type",
"type": "choice",
"choices": [
{
"customer_facing": true,
"name": "Personal"
},
{
"customer_facing": true,
"name": "Business"
}
]
}
]
}