List questionnaires
curl --request GET \
--url https://{your-prod-endpoint}/api/v1/questionnaires \
--header 'X-Api-Key: <api-key>'import requests
url = "https://{your-prod-endpoint}/api/v1/questionnaires"
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/questionnaires', 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/questionnaires",
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/questionnaires"
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/questionnaires")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/api/v1/questionnaires")
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": [
{
"title": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"questions": [
{
"questionText": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clarificationText": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"externalId": "<string>",
"options": [
{
"value": "<string>",
"label": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"score": 123
}
],
"isRequired": true,
"displayOrder": 123,
"metadata": {},
"questionnaireId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"description": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"defaultLanguage": "en",
"version": 123,
"externalId": "<string>",
"metadata": {},
"templateVariables": [
{
"key": "<string>",
"label": "<string>",
"required": true
}
],
"edges": [
{
"id": "<string>",
"questionnaireId": "<string>",
"sourceQuestionId": "<string>",
"targetQuestionId": "<string>",
"conditionValue": "<string>",
"edgeOrder": 123,
"label": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"scoreClasses": [
{
"min": 123,
"max": 123,
"level": 123,
"label": "<string>"
}
],
"webhooks": {},
"scheduling": {
"startDate": "<string>",
"endDate": "<string>",
"frequency": {
"every": 2
},
"timeSlots": [
{
"key": "<string>",
"label": "<string>",
"startTime": "<string>",
"endTime": "<string>"
}
],
"allowedDaysOfWeek": [
3
],
"maxInstances": 2,
"maxRetries": 1,
"retryWindow": {
"every": 2
},
"frequencyOverrides": [
{
"every": 2,
"scoreLevel": 123
}
]
},
"protocolActions": [
{
"title": "<string>",
"displayOrder": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Content - Questionnaires
List questionnaires
Lists all questionnaires available for the authenticated API key. Supports filtering by status.
GET
/
api
/
v1
/
questionnaires
List questionnaires
curl --request GET \
--url https://{your-prod-endpoint}/api/v1/questionnaires \
--header 'X-Api-Key: <api-key>'import requests
url = "https://{your-prod-endpoint}/api/v1/questionnaires"
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/questionnaires', 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/questionnaires",
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/questionnaires"
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/questionnaires")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/api/v1/questionnaires")
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": [
{
"title": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"questions": [
{
"questionText": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clarificationText": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"externalId": "<string>",
"options": [
{
"value": "<string>",
"label": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"score": 123
}
],
"isRequired": true,
"displayOrder": 123,
"metadata": {},
"questionnaireId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"description": {
"es": "Seguimiento postconsulta",
"en": "Post-visit follow up"
},
"defaultLanguage": "en",
"version": 123,
"externalId": "<string>",
"metadata": {},
"templateVariables": [
{
"key": "<string>",
"label": "<string>",
"required": true
}
],
"edges": [
{
"id": "<string>",
"questionnaireId": "<string>",
"sourceQuestionId": "<string>",
"targetQuestionId": "<string>",
"conditionValue": "<string>",
"edgeOrder": 123,
"label": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"scoreClasses": [
{
"min": 123,
"max": 123,
"level": 123,
"label": "<string>"
}
],
"webhooks": {},
"scheduling": {
"startDate": "<string>",
"endDate": "<string>",
"frequency": {
"every": 2
},
"timeSlots": [
{
"key": "<string>",
"label": "<string>",
"startTime": "<string>",
"endTime": "<string>"
}
],
"allowedDaysOfWeek": [
3
],
"maxInstances": 2,
"maxRetries": 1,
"retryWindow": {
"every": 2
},
"frequencyOverrides": [
{
"every": 2,
"scoreLevel": 123
}
]
},
"protocolActions": [
{
"title": "<string>",
"displayOrder": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
API Key provided by Omniloy. The same key is used for inbound and outbound calls.
Query Parameters
Available options:
draft, active, archived ⌘I