Get questionnaire instance
curl --request GET \
--url https://{your-prod-endpoint}/api/v1/questionnaire-status \
--header 'X-Api-Key: <api-key>'import requests
url = "https://{your-prod-endpoint}/api/v1/questionnaire-status"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://{your-prod-endpoint}/api/v1/questionnaire-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{your-prod-endpoint}/api/v1/questionnaire-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{your-prod-endpoint}/api/v1/questionnaire-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{your-prod-endpoint}/api/v1/questionnaire-status")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/api/v1/questionnaire-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "<string>",
"questionnaireId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"externalId": "<string>",
"metadata": {},
"isReviewed": true,
"score": 123,
"userName": "<string>",
"userPhone": "<string>",
"calls": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKeyId": "<string>",
"endUserId": "<string>",
"questionnaireInstanceId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"schedulingWindow": {
"date": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"allowedDaysOfWeek": [
3
]
},
"transcription": [
{
"content": "<string>",
"time": "2023-11-07T05:31:56Z"
}
],
"summary": "<string>",
"transferReason": "<string>",
"userIntent": "<string>",
"callResult": "<string>"
}
],
"answers": [
{
"question": {
"id": "<string>",
"externalId": "<string>",
"questionType": "<string>",
"questionText": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
}
},
"value": "<string>"
}
]
}
}{
"status": "error",
"code": 123,
"error_code": "<string>",
"message": "<string>"
}Questionnaire Instances
Get questionnaire instance
Finds an instance by questionnaireInstanceId or externalId. At least one of the two parameters must be supplied.
GET
/
api
/
v1
/
questionnaire-status
Get questionnaire instance
curl --request GET \
--url https://{your-prod-endpoint}/api/v1/questionnaire-status \
--header 'X-Api-Key: <api-key>'import requests
url = "https://{your-prod-endpoint}/api/v1/questionnaire-status"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://{your-prod-endpoint}/api/v1/questionnaire-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{your-prod-endpoint}/api/v1/questionnaire-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{your-prod-endpoint}/api/v1/questionnaire-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{your-prod-endpoint}/api/v1/questionnaire-status")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/api/v1/questionnaire-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "<string>",
"questionnaireId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"externalId": "<string>",
"metadata": {},
"isReviewed": true,
"score": 123,
"userName": "<string>",
"userPhone": "<string>",
"calls": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKeyId": "<string>",
"endUserId": "<string>",
"questionnaireInstanceId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"schedulingWindow": {
"date": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"allowedDaysOfWeek": [
3
]
},
"transcription": [
{
"content": "<string>",
"time": "2023-11-07T05:31:56Z"
}
],
"summary": "<string>",
"transferReason": "<string>",
"userIntent": "<string>",
"callResult": "<string>"
}
],
"answers": [
{
"question": {
"id": "<string>",
"externalId": "<string>",
"questionType": "<string>",
"questionText": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
}
},
"value": "<string>"
}
]
}
}{
"status": "error",
"code": 123,
"error_code": "<string>",
"message": "<string>"
}Authorizations
API Key provided by Omniloy. The same key is used for inbound and outbound calls.
Query Parameters
UUID of the questionnaire instance. Required if externalId is not provided.
External identifier of the instance. Required if questionnaireInstanceId is not provided.
⌘I