curl --request GET \
--url https://apiv2.vodex.ai/v1/surveys/template.csv \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiv2.vodex.ai/v1/surveys/template.csv"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiv2.vodex.ai/v1/surveys/template.csv', 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://apiv2.vodex.ai/v1/surveys/template.csv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://apiv2.vodex.ai/v1/surveys/template.csv"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiv2.vodex.ai/v1/surveys/template.csv")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/surveys/template.csv")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<string>A CSV template for the survey importer
The columns the survey CSV importer recognises (design 0035 §8):
section, id, text, type, options, min, max, show_if,
repeat, scope, volunteered, read_back, instructions. Any
other header is a hard error on import — unlike the contacts importer,
an unrecognised column here is not quietly turned into an attribute,
because a questionnaire’s shape is meaningful in a way a contact’s
extra column is not.
type is yes_no, choice, multi_choice, number, text,
email, phone or address (the last three are stored as text,
with a note telling the agent what the answer is, and are read back
to the respondent before they are recorded), or closing for a
last row whose text the agent says once the survey is done.
read_back is yes or no: yes has the agent read the answer back
and record it only once the respondent confirms, for a name, say;
no turns that off for an email, phone or address question.
options are separated by |, and code=label stores the code with
each answer: 1=Own|2=Rent|98=Don't know|99=Refused, where Don’t know
and Refused become the built-in non-answers (on yes_no, number
and text, without a code too). On
multi_choice, max is how many answers it takes, at most the number
of options. show_if reads works = 1,
person_age >= 16 and works = yes or (age > 64 and home != 1); a
value can be the answer or its code. repeat, on a section’s first
question, asks the whole section once per person:
for each person (people), up to 10, starting with the respondent: person_name = first_name.
The importer also reads a survey laid out the way survey teams write
them (design 0035), picked when the header has a Question ID column:
Section, Order, Question ID, Item type, Question text,
Response options, Skip / repeat logic, Programming instructions.
Response options are coded lines (1. Yes); the codes travel with each
answer, and Don't Know / Refuse lines become the built-in
non-answers. Skip logic is read from forms like
Show X IF tenure <> "10 or more years", If status = 1-4 then ask X
and Only ask 16 and over. A section row whose skip logic says
Repeat for each person (number_persons) is asked once per person,
as many times as that answer says; its answers then carry an
instance (1 for the first person, 2 for the second, and so on).
curl --request GET \
--url https://apiv2.vodex.ai/v1/surveys/template.csv \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiv2.vodex.ai/v1/surveys/template.csv"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiv2.vodex.ai/v1/surveys/template.csv', 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://apiv2.vodex.ai/v1/surveys/template.csv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://apiv2.vodex.ai/v1/surveys/template.csv"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiv2.vodex.ai/v1/surveys/template.csv")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/surveys/template.csv")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<string>Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Response
A CSV file, with a worked example that uses every column.
The response is of type string.