Repeatable Group
The Repeatable Group Answer is used for a field whose inner fields can be filled in more than once — for example a list of phone numbers, e-mail addresses, or beneficiaries. Each repetition is a group; each group holds one answer per inner field.
Finding the ids
Call Get Form Fields. The group itself is returned with "fieldType": "RepeatableGroup", and after it, in form order, each of its inner fields, marked with "parentRelation": "RepeatableGroup" and "parentFieldId" set to the group's fieldId.
- Use the group's
fieldIdas the top-levelfieldIdof the answer. - Use each inner field's
fieldIdasfieldIDinside the nested answers.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
fieldTypeId | string | Yes | Must be set to "RepeatableGroup" (from FieldTypeEnum) |
groups | array | Yes | One object per repetition, see below |
Group Object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Id of an existing group. Omit to create a new group |
order | integer | No | Position of the group. Defaults to its position in the array |
answers | array | Yes | One entry per inner field, see below |
Entry Object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Id of an existing entry. Omit to create a new entry |
answerId | string | No | Id of the stored inner answer. Only needed together with id when updating an existing entry |
order | integer | Yes | Position of the entry within the group |
answer | object | Yes | The inner field's answer, in that field type's own model (e.g. Phone Number, Text), plus fieldID = the inner field's id. When updating an existing entry, also set id = answerId |
Example Usage
Two phone numbers, where a78ac250-… is the Phone Number group and fd066a9b-… its inner Phone Number field:
{
"fieldId": "a78ac250-bd49-4737-895b-e96ab547bcc7",
"answer": {
"fieldTypeId": "RepeatableGroup",
"groups": [
{
"order": 0,
"answers": [
{
"order": 0,
"answer": {
"fieldTypeId": "PhoneNumber",
"fieldID": "fd066a9b-05da-4204-9a0f-20a2caf7db25",
"phoneNumber": "+96550000001"
}
}
]
},
{
"order": 1,
"answers": [
{
"order": 0,
"answer": {
"fieldTypeId": "PhoneNumber",
"fieldID": "fd066a9b-05da-4204-9a0f-20a2caf7db25",
"phoneNumber": "+96550000002"
}
}
]
}
]
}
}
Saving replaces the list
The groups you send are the complete list for that field:
- A group or entry without an
idis created. - A group or entry with an
idis kept (and updated from what you send). - An existing group or entry you leave out is removed.
The simplest integration is therefore to always send the full list without ids — each save replaces the previous entries. Only send ids if you need to update entries in place.
Reading it back
Get Submission returns the group with each entry's value included as answer:
{
"id": "e33ec9d5-c467-44e1-ac7d-ee044674ab71",
"fieldID": "a78ac250-bd49-4737-895b-e96ab547bcc7",
"fieldTypeId": "RepeatableGroup",
"field": { "id": "a78ac250-bd49-4737-895b-e96ab547bcc7", "name": "Phone Number", "fieldTypeId": "RepeatableGroup", "...": "..." },
"groups": [
{
"id": "4966e1df-f514-4687-8bb3-220f3d3c6083",
"order": 0,
"answers": [
{
"id": "33360dba-10e1-4b1a-8fce-aef3e1a36d17",
"answerId": "fe5b5b2e-2efd-425c-a04e-616ed6e08c55",
"order": 0,
"answer": {
"id": "fe5b5b2e-2efd-425c-a04e-616ed6e08c55",
"fieldID": "fd066a9b-05da-4204-9a0f-20a2caf7db25",
"fieldTypeId": "PhoneNumber",
"field": { "id": "fd066a9b-05da-4204-9a0f-20a2caf7db25", "name": "Phone Number", "fieldTypeId": "PhoneNumber", "...": "..." },
"phoneNumber": "+96550000001"
}
}
]
}
]
}
Notes
- Every nested
answerneeds its ownfieldTypeId, exactly as a top-level answer does. - A group's inner fields are answered only inside the group, never as top-level answers.
- Each entry's
fieldIDmust be one of that group's inner fields; otherwise the whole save is rejected with a 400 listing the offendinggroupFieldId/fieldIDpairs. - If the group field is optional you may send
"groups": [], which removes any saved entries.