It is common use to be able to fetch form submissions from a given interaction to some external system. This API allows you to fetch form submissions with optional filter parameters.
Endpoint:
1
GET https://interactionbuilder.giosg.com/api/orgs/<organization_id>/forms/data?interactionUuid=<interaction_uuid>
Endpoint with optional filtering parameters:
1
GET https://interactionbuilder.giosg.com/api/orgs/<organization_id>/forms/data?interactionUuid=<interaction_uuid>&from=<start_time>&to=<end_time>&jsonEq=<json_equals_filter>&jsonLike=<json_like_filter>&orderDesc=<ordering>
You may get interaction ID (interactionUuid) either by using Interactions API or from the Interaction Designer UI by clicking the name of the interaction in the design view and copying the interaction ID from opened popup.
Form data API returns formdata attribute when you fetch submitted data. This attribute is always object but it's attributes depend on the fields that you have in your interaction. Objects attributes may also change between submissions. If interaction data was submitted first time with input field myField and on later stage this field was removed, it won't be included in the formdata object. Types of attributes depend on the input type's you have in your interaction.
Element type
Formdata attribute type
description
Checkbox
boolean
true if checkbox selected, false otherwise
Radio button
string
Value of the radio button, for example "Yes" or "No"
Select
string
Value of the select, for example "Yes" or "No"
Text input
string
Value of the input, for example "John Doe"
For example if you have fields text input named "name" and a checkbox named "accept terms" in your interaction, formdata would look like below:
To delete form data row, first use form data listing API to get rows and their respective ID's and then make DELETE request to above endpoint. HTTP 200 OK response will be returned when request is successful.
If you only need the count of form submissions it is better to use the dedicated API instead of manually counting rows in returned data. The count API allows filtering data in the same way as the listing of form submissions API does.
Endpoint:
1
GET https://interactionbuilder.giosg.com/api/orgs/<organization_id>/forms/count?interactionUuid=<interaction_id>
Endpoint with optional filtering parameters:
1
GET https://interactionbuilder.giosg.com/api/orgs/<organization_id>/forms/count?interactionUuid=<interaction_id>&from=<start_time>&to=<end_time>&jsonEq=<json_equals_filter>&jsonLike=<json_like_filter>
Form submissions can be also downloaded as a CSV file for easy filtering, moving to another systems or for analysis purposes.
Endpoint:
1
POST https://interactionbuilder.giosg.com/api/orgs/<organization_id>/forms/csv
Downloading form submissions can be filtered also. This endpoint however uses the POST request method and so the payload should be a JSON object. The attribute interactionUuidis required, other filters are optional.
Response will be data in CSV format. Response will contain your interaction form fields much like the form data listing API, however in this case all rows will have all columns even if the interaction did not have the field defined at the time of submission. If field did not exist when form submission was made, it's value will be empty. The CSV data will also contain headers to indicate what every column represents.