Form Response
A form response is a collection of answers to a form.
The form response model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the form response.
- Name
object
- Type
- string
- Description
Always 'form_response'.
- Name
form
- Type
- string
- Description
Form this is a response to.
- Name
form_version
- Type
- string
- Description
Form version this is a response to.
- Name
patient
- Type
- string
- Description
Patient this form response is for.
- Name
sections
- Type
- array of objects
- Description
All the contents in the form response.
- Name
score
- Type
- number
- Description
Total score of the form response.
- Name
status_history
- Type
- array of objects
- Description
- Status history of the form_response.
- Name
created_by
- Type
- string
- Description
Creator of the form response.
- Name
created_at
- Type
- date-time
- Description
Timestamp (in ISO 8601 format) of when the form response was created.
- Name
last_updated_at
- Type
- date-time
- Description
Timestamp (in ISO 8601 format) of when the form response was last updated.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
Create a form response
Creates a new form response.
Required attributes
- Name
form
- Type
- string
- Description
Form this is a response to.
- Name
patient
- Type
- string
- Description
Patient this form response is for.
Optional attributes
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
Retrieve a form response
Retrieves the specified form response.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
Update a form response answer
Updates the specified form response answer object by setting the values of the parameters passed. Any other parameters not provided will not be modified.
Required attributes
Optional attributes
- Name
response
- Type
- string
- Description
Response to the question.
Response
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"response": "Sally Chen"
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
}
],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
}
List all form responses
Returns a list of all form responses.
Optional query parameters
- Name
form
- Type
- string
- Description
Form to filter by.
- Name
form_version
- Type
- string
- Description
Form version to filter by.
- Name
patient
- Type
- string
- Description
Patient to filter by.
Request
curl https://{{base_subdomain}}.avonhealth.com/v2/form_responses?form={{form}}&form_version={{form_version}}&patient={{patient}} \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}"
Response
{
"object": "list",
"data": [
{
"id": "fres_2UxtAULYUrX7GVsTKePy",
"object": "form_response",
"form": "form_NOIYLBGOBNhSwTWCUzfu",
"form_version": "fver_1JtjV1QEY84Fv395Hl7h",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"sections": [{
"id": "frsc_1JtjV1QEY84Fv395Hl7h",
"name": "Section 1",
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
],
"answers": [
{
"id": "fras_U8xtAULYUrX7GVsTKePy",
"object": "form_response_answer",
"name": "What is your name?",
"type": "short_answer",
"show_on_summary_card": true,
"required": true,
"logic": [
[
{
"field": "fqst_3951JtjV1QEY84FvHl7h",
"condition": "equal_to",
"value": "Yes"
}
]
]
}
]
}],
"score": 10,
"status_history": [
{
"status": "in_progress",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": "2024-04-10T13:20:21.724Z"
},
{
"status": "completed",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1753798303000
}
],
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-04-10T13:20:21.724Z",
"last_updated_at": "2024-04-10T13:20:21.724Z"
},
]
}