Fetching Form Responses

Fetches submitted response data for a specific form (form_id).

[GET] https://api.moaform.com/v1/forms/{form_id}/responses

 

REQUEST

Path Parameters

KeyDescription
form_idRequired. Unique ID of the form

 

Query Parameters

KeyTypeDescription
pageintegerPage of the list to be fetched. Default is 1
page_sizeintegerNumber of items per page. Default is 25, maximum is 1000
sincestringLimit requests to responses submitted after a specified date and time (e.g., 2020-03-20T14:00:59Z)
untilstringLimit requests to responses submitted before a specified date and time (e.g., 2020-03-20T14:00:59Z)
afterstringLimit to responses submitted after a specified response_id. Excludes the specified response_id
beforestringLimit to responses submitted before a specified response_id. Excludes the specified response_id
included_response_idsstringLimit to responses that include specified response_id(s). For multiple IDs, separate with commas
excluded_response_idsstringLimit to responses excluding specified response_id(s). For multiple IDs, separate with commas
sort_bystringField for list sorting. Default is 'submitted_at' (currently only 'submitted_a't is allowed)
order_bystringSorting order. Default is 'asc' (either ascending 'asc' or descending 'desc')

 

RESPONSE

KeyTypeDescription
total_itemsintegerTotal number of items in the result list
page_countintegerNumber of pages
items[object] 
↳ hiddenobject 
     ↳ d[n]stringIf hidden fields are present, display all hidden fields at the same hierarchy level. n=1~100
↳ response_idstringUnique ID of the response
↳ response_codestringResponse code (The code used when utilizing the 'Restrict to response code and URL' option in Multiple responses settings; only sent when a code value is present)
↳ started_atstringTimestamp of the response start
↳ submitted_atstringTimestamp of the response submission
↳ metadataobject 
     ↳ browserstringRespondent's browser information
     ↳ operating_systemstringRespondent's operating system information
     ↳ devicestringRespondent's device information
     ↳ user_agentstringRespondent's User Agent
↳ answers[object] 
     ↳ blockobject 
          ↳ idstringUnique ID of the block
          ↳ typestringblock type
     ↳ typestringType of the response (continuously described in a separate table below. Include this KEY to replace the position marked as ... for each type)
.........
↳ thankyouobject 
     ↳ idstringUnique ID of the thank you page
     ↳ urlstringURL of the thank you page

 

answers type details

choice (choose one among many choices)

KeyTypeDescription
     ↳ typestringchoice
     ↳ choiceobject 
          ↳ idstringUnique ID of the choice
          ↳ labelstringContent of the choice
          ↳ scoreintegerAssigned score (appears only when score is assigned)
          ↳ otherstringComments for 'Other' choice (appears only when the response is 'Other' choice)

 

choices (choose many among many choices)

KeyTypeDescription
     ↳ typestringchoices
     ↳ choices[object] 
          ↳ idstringUnique ID of the choice
          ↳ labelstringContent of the choice
          ↳ scoreintegerAssigned score (appears only when score is assigned)
          ↳ otherstringComments for 'Other' choice (appears only when the response is 'Other' choice)

For ranking questions, the order in which the answers are listed represents their ranking.

 

media_choice (choose one among many media choices)

KeyTypeDescription
     ↳ typestringmedia_choice
     ↳ media_choiceobject 
          ↳ idstringUnique ID of the choice
          ↳ labelstringContent of the choice
          ↳ scoreintegerAssigned score (appears only when score is assigned)
          ↳ otherstringComments for 'Other' choice (appears only when the response is 'Other' choice)
          ↳ mediaobject 
               ↳ typestringMedia type (currenty returns only 'image')
               ↳ urlstringMedia URL

 

media_choices (choose many among many media choices)

KeyTypeDescription
     ↳ typestringmedia_choices
     ↳ media_choices[object] 
          ↳ idstringUnique ID of the choice
          ↳ labelstringContent of the choice
          ↳ scoreintegerAssigned score (appears only when score is assigned)
          ↳ otherstringComments for 'Other' choice (appears only when the response is 'Other' choice)
          ↳ mediaobject 
               ↳ typestringMedia type (currenty returns only 'image')
               ↳ urlstringMedia URL

For ranking questions, the order in which the answers are listed represents their ranking.

 

text (text answers)

KeyTypeDescription
     ↳ typestringtext
     ↳ textstringText input
     ↳ encryptedbooleanResponse data encrypted or not (appears only when it is "true")

 

email (email address)

KeyTypeDescription
     ↳ typestringemail
     ↳ emailstringEmail address
     ↳ encryptedbooleanResponse data encrypted or not (appears only when it is "true")

 

url (url)

KeyTypeDescription
     ↳ typestringurl
     ↳ urlstringWebsite URL
     ↳ encryptedbooleanResponse data encrypted or not (appears only when it is "true")

 

number (answers in numbers such as Point Scale, Star rating, Numeric Value)

KeyTypeDescription
     ↳ typestringnumber
     ↳ numbernumberNumber
     ↳ encryptedbooleanResponse data encrypted or not (only for Numeric Value block, appears only when it is "true")

 

address (address)

KeyTypeDescription
     ↳ typestringaddress
     ↳ address[object] 
          ↳ streetstringstreet input (appears only when defined as visibile_fields)
          ↳ detailstringdetail input (appears only when defined as visibile_fields)
          ↳ citystringcity input (appears only when defined as visibile_fields)
          ↳ regionstringregion input (appears only when defined as visibile_fields)
          ↳ postal_codestringpostal_code input (appears only when defined as visibile_fields)
          ↳ countrystringcountry input (appears only when defined as visibile_fields)
     ↳ encryptedboolean Response data encrypted or not (appears only when it is "true")

 

files (attachment files)

KeyTypeDescription
     ↳ typestringfiles
     ↳ files[object] 
          ↳ namestringFile name
          ↳ sizeintegerFile size
          ↳ url[object] 
               ↳ apistringFile download API URL
               ↳ reportstringFile download web URL