FormResponse
The FormResponse object
The FormResponse object looks like this in JSON:
{
"object": "form_response",
"id": 1,
"form_id": 1,
"form_version_id": 1,
"form_response_batch_id": null,
"person_id": 10,
"first_name": null,
"last_name": null,
"email": null,
"review": "review",
"status": "submitted",
"needs_review": null,
"needs_resubmit": null,
"fee_id": null,
"fee_amount": null,
"fee_discount": null,
"can_charge_to_account": false,
"fee_status": "unpaid",
"charge_method": null,
"sales_receipt_id": null,
"started_at": "2022-07-13T23:07:51+00:00",
"submitted_at": "2022-07-13T23:08:31+00:00",
"decision_by_id": null,
"decision_at": null,
"localization_id": null,
"requested_by_id": null,
"requested_at": null,
"added_at": "2022-07-13T23:07:51+00:00",
"respondent_url": "https:\/\/yourschool.populiweb.com\/router\/forms\/respond\/g795538da7a2293a0f77a7a697b178cc281eaf34e1c8ac6c5b784920d90c6944c03ac9ff54c31fc4b06ac3952ebc36969975080cc106f69f060ccb76abb9",
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| form_id | No | int |
| form_version_id | No | int |
| form_response_batch_id | No | int |
| person_id | No | int |
| first_name | No | text (50) |
| last_name | No | text (50) |
| No | text (100) | |
| review | Yes | enum (none, review, decision) |
| status | Yes | enum (pending, in_progress, submitted, processing, accepted, rejected, completed) |
| needs_review | No | int |
| needs_resubmit | No | int |
| fee_id | No | int |
| fee_amount | No | decimal |
| fee_discount | No | decimal |
| can_charge_to_account | Yes | bool |
| fee_status | Yes | enum (unpaid, paid, waived) |
| charge_method | No | enum (account, credit_card, paypal) |
| sales_receipt_id | No | int |
| started_at | No | datetime |
| submitted_at | No | datetime |
| decision_by_id | No | int |
| decision_at | No | datetime |
| localization_id | No | int |
| requested_by_id | No | int |
| requested_at | No | datetime |
| added_at | No | datetime |
| respondent_url | No | text |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/forms/(form)/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"filter": []
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/forms/(form)/responses"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/forms/(form)/responses');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 2,
"results": 2,
"results_per_page": 200,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "form_response",
"id": 2,
"form_id": 1,
"form_version_id": 1,
"form_response_batch_id": null,
"person_id": null,
"first_name": null,
"last_name": null,
"email": null,
"review": "review",
"status": "submitted",
"needs_review": null,
"needs_resubmit": null,
"fee_id": null,
"fee_amount": null,
"fee_discount": null,
"can_charge_to_account": false,
"fee_status": "unpaid",
"charge_method": null,
"sales_receipt_id": null,
"started_at": "2022-07-13T23:07:51+00:00",
"submitted_at": "2022-07-13T23:08:31+00:00",
"decision_by_id": null,
"decision_at": null,
"localization_id": null,
"requested_by_id": null,
"requested_at": null,
"added_at": "2022-07-13T23:07:51+00:00",
"report_data": {
"person_display_name": null,
"person_last_name": null,
"person_first_name": null,
"batch_name": null,
"respondent_person_id": null,
"respondent_display_name": null,
"respondent_last_name": null,
"respondent_first_name": null,
"discount_code": null,
"row_id": 2
},
"respondent_url": "https:\/\/yourschool.populiweb.com\/router\/forms\/respond\/g795538da7a2293a0f77a7a697b178cc281eaf34e1c8ac6c5b784920d90c6944c03ac9ff54c31fc4b06ac3952ebc36969975080cc106f69f060ccb76abb9"
}
],
"sandbox": true
}
Retrieves all FormResponse objects that match given filter conditions.
HTTP Request
GET /forms/(form)/responses
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| filter | No | mixed | See available filter conditions |
| page | No | int | The page of results to return if more than 200 records are found. |
Expandable Properties
- form
- form_version
- answers
- notes
Filter Condition Parameters
These conditions can be used to narrow the results returned.
| Name | Type |
|---|---|
| linked_person | object_id |
| respondent | object_id |
| batch | object id |
| discount_code | object id |
| status | enum |
| started_at | datetime |
| signed_at | datetime |
| submitted_at | datetime |
| decision_at | datetime |
| field | FormField |
| needs_review | bool |
| fields_to_review | integer |
| tag | tag |
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"expand": [
"form_version",
"answers"
]
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:expand => ['form_version', 'answers']
}.to_json
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'expand': ['form_version', 'answers']
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
expand = new List<string> {"form_version", "answers"}
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'expand' => ['form_version', 'answers']
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "form_response",
"id": 1,
"form_id": 1,
"form_version_id": 1,
"form_response_batch_id": null,
"person_id": 10,
"first_name": null,
"last_name": null,
"email": null,
"review": "review",
"status": "submitted",
"needs_review": null,
"needs_resubmit": null,
"fee_id": null,
"fee_amount": null,
"fee_discount": null,
"can_charge_to_account": false,
"fee_status": "unpaid",
"charge_method": null,
"sales_receipt_id": null,
"started_at": "2022-07-13T23:07:51+00:00",
"submitted_at": "2022-07-13T23:08:31+00:00",
"decision_by_id": null,
"decision_at": null,
"localization_id": null,
"requested_by_id": null,
"requested_at": null,
"form_version": {
"object": "form_version",
"id": 1,
"owner_type": "form",
"owner_id": 1,
"added_at": null,
"added_by_id": null,
"sections": [
{
"object": "form_heading",
"id": 8,
"content": "Heading",
"added_at": null,
"added_by_id": null,
"page_order_id": 1,
"order_id": 1,
"hidden": false
},
{
"object": "form_field",
"id": 9,
"reporting_id": 9,
"name": "Short Answer",
"description": null,
"input_type": "short_answer",
"model_type": null,
"model_id": null,
"min": null,
"max": null,
"added_at": null,
"added_by_id": null,
"is_required": false,
"page_order_id": 1,
"order_id": 2,
"hidden": false
},
{
"object": "form_field",
"id": 10,
"reporting_id": 10,
"name": "Paragraph",
"description": null,
"input_type": "long_answer",
"model_type": null,
"model_id": null,
"min": null,
"max": null,
"added_at": null,
"added_by_id": null,
"is_required": false,
"page_order_id": 1,
"order_id": 3,
"hidden": false
},
{
"object": "form_field",
"id": 11,
"reporting_id": 11,
"name": "Yes\/No",
"description": null,
"input_type": "boolean",
"model_type": null,
"model_id": null,
"min": null,
"max": null,
"added_at": null,
"added_by_id": null,
"is_required": false,
"page_order_id": 1,
"order_id": 4,
"hidden": false
},
{
"object": "form_field",
"id": 12,
"reporting_id": 12,
"name": "Number",
"description": null,
"input_type": "integer",
"model_type": null,
"model_id": null,
"min": null,
"max": null,
"added_at": null,
"added_by_id": null,
"is_required": false,
"page_order_id": 2,
"order_id": 1,
"hidden": false
},
{
"object": "form_field",
"id": 13,
"reporting_id": 13,
"name": "Date",
"description": null,
"input_type": "date",
"model_type": null,
"model_id": null,
"min": null,
"max": null,
"added_at": null,
"added_by_id": null,
"is_required": false,
"page_order_id": 2,
"order_id": 2,
"hidden": false
},
{
"object": "form_text",
"id": 14,
"content": "Text content",
"added_at": null,
"added_by_id": null,
"page_order_id": 2,
"order_id": 3,
"hidden": false
},
{
"object": "form_field",
"id": 15,
"reporting_id": 15,
"name": "Select",
"description": null,
"input_type": "multiple_choice_select",
"model_type": null,
"model_id": null,
"min": null,
"max": null,
"added_at": null,
"added_by_id": null,
"options": [
{
"object": "form_field_option",
"id": 5,
"display_value": "One",
"order_id": 1
},
{
"object": "form_field_option",
"id": 6,
"display_value": "Two",
"order_id": 2
},
{
"object": "form_field_option",
"id": 7,
"display_value": "Three",
"order_id": 3
},
{
"object": "form_field_option",
"id": 8,
"display_value": "Four",
"order_id": 4
}
],
"is_required": false,
"page_order_id": 2,
"order_id": 3,
"hidden": false
}
]
},
"answers": [
{
"object": "form_field_answer",
"id": 3,
"owner_type": "form_response",
"owner_id": 1,
"form_field_id": 9,
"subfield": null,
"text_value": "Short answer text...",
"integer_value": null,
"decimal_value": null,
"date_value": null,
"datetime_value": null,
"email_value": null,
"ip": null,
"added_at": null
},
{
"object": "form_field_answer",
"id": 4,
"owner_type": "form_response",
"owner_id": 1,
"form_field_id": 15,
"subfield": null,
"text_value": null,
"integer_value": 8,
"decimal_value": null,
"date_value": null,
"datetime_value": null,
"email_value": null,
"ip": null,
"added_at": null
}
],
"added_at": "2022-07-13T23:07:51+00:00",
"respondent_url": "https:\/\/yourschool.populiweb.com\/router\/forms\/respond\/g795538da7a2293a0f77a7a697b178cc281eaf34e1c8ac6c5b784920d90c6944c03ac9ff54c31fc4b06ac3952ebc36969975080cc106f69f060ccb76abb9",
"sandbox": true
}
Retrieves a specific FormResponse object. To match answers to form fields, you will need to expand form_version and answers.
HTTP Request
GET /forms/(form)/responses/(formresponse)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Expandable Properties
- form
- form_version
- answers
- notes
update_status
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/update_status" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X PUT
-d '{
"status": "COMPLETED"
}' \
require 'httparty'
response = HTTParty.put(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/update_status',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:status => 'COMPLETED'
}.to_json
)
puts response.body
import requests
response = requests.put(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/update_status',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'status': 'COMPLETED'
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/update_status"), Method.Put);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
status = "COMPLETED"
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/update_status');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'status' => 'COMPLETED'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "form_response",
"id": 1,
"form_id": 1,
"form_version_id": 1,
"form_response_batch_id": null,
"person_id": 10,
"first_name": null,
"last_name": null,
"email": null,
"review": "review",
"status": "completed",
"needs_review": null,
"needs_resubmit": null,
"fee_id": null,
"fee_amount": null,
"fee_discount": null,
"can_charge_to_account": false,
"fee_status": "unpaid",
"charge_method": null,
"sales_receipt_id": null,
"started_at": "2022-07-13T23:07:51+00:00",
"submitted_at": "2022-07-13T23:08:31+00:00",
"decision_by_id": 22,
"decision_at": "2026-07-25T16:24:08+00:00",
"localization_id": null,
"requested_by_id": null,
"requested_at": null,
"added_at": "2022-07-13T23:07:51+00:00",
"respondent_url": "https:\/\/yourschool.populiweb.com\/router\/forms\/respond\/g795538da7a2293a0f77a7a697b178cc281eaf34e1c8ac6c5b784920d90c6944c03ac9ff54c31fc4b06ac3952ebc36969975080cc106f69f060ccb76abb9",
"sandbox": true
}
The status of a FormReponse can only be set to certain states, depending on the context. A form must be submitted before the status can be updated. A form in the review state can be set to submitted, processing, or completed. A form in the decision state can be set to submitted, processing, accepted, or rejected.
HTTP Request
PUT /forms/(form)/responses/(formresponse)/update_status
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| status | Yes | enum (pending, in_progress, submitted, processing, accepted, rejected, completed) |
link_to_person
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/link_to_person" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"person_id": 2
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/link_to_person',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:person_id => 2
}.to_json
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/link_to_person',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'person_id': 2
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/link_to_person"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
person_id = 2
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/link_to_person');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'person_id' => 2
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "form_response",
"id": 2,
"form_id": 1,
"form_version_id": 1,
"form_response_batch_id": null,
"person_id": 2,
"first_name": null,
"last_name": null,
"email": null,
"review": "review",
"status": "submitted",
"needs_review": null,
"needs_resubmit": null,
"fee_id": null,
"fee_amount": null,
"fee_discount": null,
"can_charge_to_account": false,
"fee_status": "unpaid",
"charge_method": null,
"sales_receipt_id": null,
"started_at": "2022-07-13T23:07:51+00:00",
"submitted_at": "2022-07-13T23:08:31+00:00",
"decision_by_id": null,
"decision_at": null,
"localization_id": null,
"requested_by_id": null,
"requested_at": null,
"added_at": "2022-07-13T23:07:51+00:00",
"respondent_url": "https:\/\/yourschool.populiweb.com\/router\/forms\/respond\/g795538da7a2293a0f77a7a697b178cc281eaf34e1c8ac6c5b784920d90c6944c03ac9ff54c31fc4b06ac3952ebc36969975080cc106f69f060ccb76abb9",
"sandbox": true
}
HTTP Request
GET /forms/(form)/responses/(formresponse)/link_to_person
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| person_id | Yes | int |
unlink_person
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/unlink_person" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/unlink_person',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/unlink_person',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/unlink_person"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/forms/(form)/responses/(formresponse)/unlink_person');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "form_response",
"id": 2,
"form_id": 1,
"form_version_id": 1,
"form_response_batch_id": null,
"person_id": null,
"first_name": null,
"last_name": null,
"email": null,
"review": "review",
"status": "submitted",
"needs_review": null,
"needs_resubmit": null,
"fee_id": null,
"fee_amount": null,
"fee_discount": null,
"can_charge_to_account": false,
"fee_status": "unpaid",
"charge_method": null,
"sales_receipt_id": null,
"started_at": "2022-07-13T23:07:51+00:00",
"submitted_at": "2022-07-13T23:08:31+00:00",
"decision_by_id": null,
"decision_at": null,
"localization_id": null,
"requested_by_id": null,
"requested_at": null,
"added_at": "2022-07-13T23:07:51+00:00",
"respondent_url": "https:\/\/yourschool.populiweb.com\/router\/forms\/respond\/g795538da7a2293a0f77a7a697b178cc281eaf34e1c8ac6c5b784920d90c6944c03ac9ff54c31fc4b06ac3952ebc36969975080cc106f69f060ccb76abb9",
"sandbox": true
}
HTTP Request
GET /forms/(form)/responses/(formresponse)/unlink_person
Parameters
None