This documentation provides comprehensive guidance for writing (POSTing) ClientDTO.Extensions
data to the AlayaCare Residential API. The Extensions property allows you to submit dynamic form field data for a client, supporting various field types and answer formats.
[
{
"formFieldLinkID": 288,
"fieldName": "Boolean-FF",
"recordState": 1,
"field": {
"carePlanMode": 2,
"fieldID": 298,
"fieldName": "Boolean-FF",
"version": "v1.0",
"versionMajor": 1,
"versionMinor": 0,
"type": 300,
"subType": 600,
"caption": "Boolean-FF",
"validationType": 2,
"formFieldLinkID": 288,
"formSectionID": 43,
"formSectionName": "General",
"sortOrder": 33,
"formSectionSortOrder": 1,
"formSortOrder": 1256,
"isPartialData": false,
"hasAnswer": false,
"hasChanged": false,
"isVisible": true,
"isReadOnly": false,
"checkedValue": "Yes",
"isValidForParameters": false,
"uncheckedValue": "No",
"layout": {
"size": 4,
"sizeValue": 4,
"startNewRow": false
},
"selectedFocus": "",
"selectedGoal": "",
"carePlanItemName": "",
"deployedParentForms": [],
"recordState": 1,
"created": {
"dateUtc": "2025-07-21T02:00:07.29Z",
"userName": "Administrator, System (SA) - System Administrator"
},
"lastUpdated": {
"dateUtc": "2025-07-22T01:43:31.0533333Z",
"userName": "Administrator, System (SA) - System Administrator"
},
"answer": true
}
},
{
"formFieldLinkID": 289,
"fieldName": "Choice-FF",
"recordState": 1,
"field": {
"codeTableFilterType": 1,
"carePlanMode": 2,
"fieldID": 299,
"fieldName": "Choice-FF",
"version": "v1.0",
"versionMajor": 1,
"versionMinor": 0,
"type": 500,
"subType": 500,
"caption": "Choice-FF",
"choices": [
{ "formFieldChoiceID": 452, "fieldID": 299, "choiceName": "choice 1", "caption": "choice 1", "defaultType": 1, "exceptionType": 1, "sortOrder": 1, "extraInformationType": 1, "props": [], "recordState": 1, "isPartialData": false, "created": { "dateUtc": "2025-07-21T02:00:59.28Z", "userName": "Administrator, System (SA) - System Administrator" }, "lastUpdated": { "dateUtc": "2025-07-21T02:00:59.28Z", "userName": "Administrator, System (SA) - System Administrator" }, "summary": "choice 1" },
{ "formFieldChoiceID": 453, "fieldID": 299, "choiceName": "Choice2", "caption": "Choice2", "defaultType": 1, "exceptionType": 1, "sortOrder": 2, "extraInformationType": 1, "props": [], "recordState": 1, "isPartialData": false, "created": { "dateUtc": "2025-07-21T02:01:25.8833333Z", "userName": "Administrator, System (SA) - System Administrator" }, "lastUpdated": { "dateUtc": "2025-07-21T02:01:25.8833333Z", "userName": "Administrator, System (SA) - System Administrator" }, "summary": "Choice2" }
],
"formFieldLinkID": 289,
"formSectionID": 43,
"formSectionName": "General",
"sortOrder": 33,
"formSectionSortOrder": 1,
"formSortOrder": 1256,
"isPartialData": false,
"hasAnswer": false,
"hasChanged": false,
"answer": { "k": 452, "v": "choice 1" },
"isVisible": true,
"defaultValue": {},
"isReadOnly": false,
"max": 100,
"isValidForParameters": false,
"source": 2,
"layout": { "size": 4, "sizeValue": 4, "startNewRow": false },
"choiceLayout": 2,
"isFreeForm": false,
"selectedFocus": "",
"sourcePropertyName": "Caption",
"selectedGoal": "",
"carePlanItemName": "",
"deployedParentForms": [],
"recordState": 1,
"created": { "dateUtc": "2025-07-21T02:00:59.28Z", "userName": "Administrator, System (SA) - System Administrator" },
"lastUpdated": { "dateUtc": "2025-07-21T02:00:59.28Z", "userName": "Administrator, System (SA) - System Administrator" }
}
},
// ... (other extension objects as in your sample)
]
validationType
is set to Required
(i.e., "validationType": 2
), the answer
(or answers
for multiple choice fields) property is mandatory and must be provided. Omitting this property for required fields will result in a validation error.
Type | SubType | Field Type | Answer Property | Answer DataType |
---|---|---|---|---|
100 | 100 | Text Box | answer | string |
100 | 101 | Text Area | answer | string |
101 | 100 | String with Expiry | answer | object |
200 | 200 | Numeric | answer | number |
201 | 200 | Numeric Range | answer | object |
300 | 600 | Boolean | answer | boolean |
400 | 400 | Date | answer | string |
400 | 402 | DateTime | answer | string |
400 | 403 | Time | answer | string |
401 | 400 | Date Range | answer | object |
401 | 402 | DateTime Range | answer | object |
401 | 403 | Time Range | answer | object |
500 | 500 | Choice Dropdown | answer | object |
500 | 501 | Radio Button | answer | object |
600 | 500 | Multiple Dropdown | answers | array |
600 | 600 | Checkboxes | answers | array |
field": {
"type": 100,
"subType": 100, (for TextArea "subType": 101),
"validationType": 2,
"answer": "Sample string value",
"isReadOnly": false,
"max": 100
...
}
answer
.answer
must be a non-empty string if the validationType
property is defined and equal to Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
field should have a maximum length based on max
field property.isReadOnly
field property.validationType
is Script
."field": {
"type": 101,
"subType": 100,
"validationType": 2,
"answer": {
"value": "License123",
"expiryYear": 2025,
"expiryMonth": 8
},
...
}
answer
answer
must be present if validationType
property is defined and equal to Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be an object with value
(string), expiryYear
(number), and expiryMonth
(1-12).expiryMonth
must be 1-12, expiryYear
must be a valid year.validationType
is Script
."field": {
"type": 200,
"subType": 200,
"validationType": 2,
"max": 5000,
"min": 500,
"isIntegerOnly": true,
"answer": 42,
...
}
answer
answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.min
and max
range if defined.isIntegerOnly
is true, only integers are allowed else decimals are permitted.validationType
is Script
."field": {
"type": 201,
"subType": 200,
"validationType": 2,
"maxStart": 10,
"maxStop": 1000,
"minStart": 5,
"minStop": 900,
"isIntegerOnly": true,
"answer": {
"start": 10,
"stop": 20
},
...
}
answer
.answer
(both start
and stop
) must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be an object with start
and stop
(numbers).start
must be less than or equal to stop
.minStart
, maxStart
, minStop
, or maxStop
are present in the field definition, then:
start
must be between minStart
and maxStart
(inclusive).stop
must be between minStop
and maxStop
(inclusive).isIntegerOnly
is true, only integers are allowed else decimals are permitted.validationType
is Script
.minStart=5
, maxStart=15
, minStop=10
, maxStop=25
, then valid values are 5 ≤ start ≤ 15
and 10 ≤ stop ≤ 25
.
"field": {
"type": 300,
"subType": 600,
"validationType": 2,
"answer": true,
...
}
answer
.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.true
or false
allowed."field": {
"type": 400,
"subType": 400,
"validationType": 1,
"answer": "2025-07-25T00:00:00",
...
}
answer
with zero time component.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be valid ISO 8601 date/time strings.answer
must not include a non-zero time component. The time part is only allowed if it is exactly T00:00:00."field": {
"type": 400,
"subType": 402,
"validationType": 2,
"answer": "2025-07-22T18:00:00",
...
}
answer
.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be valid ISO 8601 date/time strings."field": {
"type": 400,
"subType": 403,
"validationType": 1,
"answer": "13:30:00",
...
}
answer
.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be valid ISO 8601 time strings in 24-hour format (HH:mm:ss)."field": {
"type": 401,
"subType": 400,
"validationType": 2,
"answer": {
"start": "2025-07-20T00:00:00",
"stop": "2025-07-25T00:00:00"
},
...
}
answer
.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be an object with start
and stop
(ISO 8601 date strings).start
and stop
dates must not include a non-zero time component. The time part is only allowed if it is exactly T00:00:00.start
must be before or equal to stop
."field": {
"type": 401,
"subType": 402,
"validationType": 1,
"answer": {
"start": "2025-07-15T16:00:00",
"stop": "2025-07-17T18:00:00"
},
...
}
answer
.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be an object with start
and stop
(ISO 8601 date strings).start
and stop
dates must include a time component.start
must be before or equal to stop
."field": {
"type": 500,
"subType": 500,
"validationType": 2,
"source": 2,
"answer": {
"k": 564,
"v": "Business",
},
...
}
k
) and value (v
) in answer
.answer
must be present if validationType
is Required
.validationType
is undefined or set to None
, answer
is not mandatory.answer
must be a valid object with both k
and v
present and non-empty.source
= 1 (choiceFormFieldChoiceType : CodeTable)"answer": {
"k": entryID property of the code table entry,
"v": value property of the code table entry
}
source
= 2 (choiceFormFieldChoiceType : FormFieldChoice)"answer": {
"k": formFieldChoiceID property of the choice,
"v": caption property of the choice
}
answers
property instead of answer
"field": {
"type": 600,
"subType": 500,
"validationType": 2,
"answers": [
{"k": 461, "v": "choice 1"},
{"k": 462, "v": "Is Vegan"}
],
...
}
k
) and value (v
) in answers
.validationType
is Required
, answers
must be a non-empty array of valid objects (each with k
and v
).validationType
is set or is None
, answers
array may be empty if no choices selected.source
= 1 (choiceFormFieldChoiceType : CodeTable)"answers": [{
"k": entryID property of the code table entry,
"v": value property of the code table entry
},
{
"k": entryID property of the code table entry,
"v": value property of the code table entry
}...]
source
= 2 (choiceFormFieldChoiceType : FormFieldChoice)"answers": [{
"k": formFieldChoiceID property of the choice,
"v": caption property of the choice
},
{
"k": formFieldChoiceID property of the choice,
"v": caption property of the choice
}...]
The following enums are referenced throughout the form field definitions:
Defines the data source type for choice-based fields:
ChoiceFormFieldChoiceType
{
CodeTable = 1,
Custom = 2,
SQL = 3
}
CodeTableEntriesService
Defines validation requirements for form fields:
FormFieldValidationType
{
None = 1,
Required = 2,
Script = 3
}
For fields using source
= choiceFormFieldChoiceType (such as Choice Dropdown, Radio Button, Multiple Dropdown, and Checkboxes), the available choices are determined by the source
property and are retrieved as follows:
{{BaseUrl}}/Setup/CodeTableEntry?includePayload=false&tableID={{tableID}}
where the tableID query parameter is the codeTableID property in the field body (refer to the example below)
"field": {
"fieldName": "Choice-FF",
"type": 500,
"subType": 501,
"validationType": 2,
"source": 1,
"codeTableID": 1100,
"answer": {
"k": 455,
"v": "choice 1"
},
...
}
field.choices
property of the form field definition.
"field": {
"fieldName": "Choice-FF",
"type": 500,
"subType": 500,
"choices": [
{
"formFieldChoiceID": 452,
"choiceName": "choice 1",
"caption": "choice 1",
...
},
{
"formFieldChoiceID": 453,
"choiceName": "Choice2",
"caption": "Choice2",
...
}
],
"source": 2,
...
}
AlayaCare Resi API Documentation