Entity Results Retrieving entity questionnaire answers When an entity has finished processing, you can retrieve the answers from the questionnaire, product, and plan selection logic blocks.
If your flow contains a questionnaire or product and plan logic block using Flow Logic , use this endpoint to retrieve the answers inputted by the entity during the verification process.
Retrieving questionnaire answers
POST
/api-entity-questionnaire
Retrieve entity questionnaire, product, and plan selection answers.
Body
Unique applicantId generated on entity creation (required)
Request
cURL Node.js Javascript Ruby Python
Copy curl --location 'https://enterprise.personr.co/api/1.1/wf/api-entity-questionnaire' \
--form 'applicantId="4242424242424x424242424242424242"'
Copy var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
data.append('applicantId', '4242424242424x424242424242424242');
var config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://enterprise.personr.co/api/1.1/wf/api-entity-questionnaire',
headers: {
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Copy var form = new FormData();
form.append("applicantId", "4242424242424x424242424242424242");
var settings = {
"url": "https://enterprise.personr.co/api/1.1/wf/api-entity-questionnaire",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Copy require "uri"
require "net/http"
url = URI("https://enterprise.personr.co/api/1.1/wf/api-entity-questionnaire")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
form_data = [['applicantId', '4242424242424x424242424242424242']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
Copy import requests
url = "https://enterprise.personr.co/api/1.1/wf/api-entity-questionnaire"
payload={'applicantId': '4242424242424x424242424242424242'}
files=[
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Response
200 400
Copy {
"applicantId": "1726733114679x00000000000",
"flow": "Example Flow",
"sourceKey": "Example Source Key",
"externalUserId": [
"Example External User ID",
"Another External User ID"
],
"selectedProducts": [
"Product A"
],
"selectedProductIds": [
"ProductA-20394"
],
"selectedPlans": [
"Plan A"
],
"selectedPlanIds": [
"Plan A-20394"
],
"questionnaire": [
{
"flowQuestion": "Example Question",
"questionId": "1724124467705x000000000000",
"internalQuestionId": "Example Internal Question ID",
"flowAnswer": [
"No",
"Yes"
]
},
{
"flowQuestion": "Another Example Question",
"questionId": "1724124485940x00000000000",
"internalQuestionId": "Example Internal Question ID",
"flowAnswer": "Yes"
}
]
}
Copy {
"statusCode": 400,
"message": "Error: incorrect applicantId provided"
}
Last updated 5 months ago