curl
set -eu
umask 077
# Path values must be URL-encoded; query string excludes the leading question mark.
url="${HD_BASE_URL:?Set API origin}/v1/users/questionnaires/${HD_PATH_SLUG:?Set the path fixture}/progress/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}"
printf 'X-Brand-Slug: hi-doctor\nAccept: application/json\n' > "${HD_REQUEST_HEADERS_FILE:?Private header file}"
printf 'Authorization: Bearer %s\n' "${HD_ACCESS_TOKEN:?Set backend JWT}" >> "$HD_REQUEST_HEADERS_FILE"
curl --silent --show-error --max-time 30 --request GET \
--header "@$HD_REQUEST_HEADERS_FILE" \
--dump-header "${HD_HEADERS_FILE:?Private response header file}" \
--output "${HD_RESPONSE_FILE:?Private response file}" \
--write-out '%{http_code}\n%{content_type}\n' \
"$url"import os, json
from pathlib import Path
from urllib.parse import quote
import requests
os.umask(0o077)
url = os.environ["HD_BASE_URL"].rstrip("/") + '/v1/users/questionnaires/{slug}/progress/'
url = url.replace('{slug}', quote(os.environ['HD_PATH_SLUG'], safe=""))
if os.environ.get("HD_QUERY_STRING"): url += "?" + os.environ["HD_QUERY_STRING"]
headers = {"X-Brand-Slug": "hi-doctor", "Accept": 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["HD_ACCESS_TOKEN"]
kwargs = {}
response = requests.request('GET', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)
Path(os.environ["HD_RESPONSE_FILE"]).write_bytes(response.content)
Path(os.environ["HD_HEADERS_FILE"]).write_text(json.dumps(dict(response.headers)))
print(response.status_code)
print(response.headers.get("Content-Type", ""))
import { readFileSync, writeFileSync } from "node:fs";
const env = process.env;
let url = env.HD_BASE_URL.replace(/\/$/, "") + "/v1/users/questionnaires/{slug}/progress/";
url = url.replace("{slug}", encodeURIComponent(env.HD_PATH_SLUG));
if (env.HD_QUERY_STRING) url += "?" + env.HD_QUERY_STRING;
const headers = { "X-Brand-Slug": "hi-doctor", "Accept": "application/json" };
headers.Authorization = "Bearer " + env.HD_ACCESS_TOKEN;
const options = { method: "GET", headers, redirect: "manual", signal: AbortSignal.timeout(30000) };
const response = await fetch(url, options);
writeFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});
writeFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});
console.log(response.status);
console.log(response.headers.get("content-type") ?? "");
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/",
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://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/"
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://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/")
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{
"progress": {
"id": "2050fe0f-ea16-59d0-99f2-6c6051bb8351",
"category": "b438fff3-4ce5-5352-a17d-718c51491d94",
"version": "5d7dac75-8ba8-533d-a3ae-ebd2f6b21778",
"data": [
{
"value": "ESP",
"step_id": 1,
"question_key": "weight_loss-01-country"
},
{
"value": "male",
"step_id": 2,
"question_key": "weight_loss-02-gender"
},
{
"values": {
"Height (cm)": 175,
"Weight (kg)": 95
},
"step_id": 3,
"question_key": "weight_loss-03-height_weight"
},
{
"value": [
"none"
],
"step_id": 4,
"question_key": "weight_loss-04-height_weight"
},
{
"value": [
"none"
],
"step_id": 6,
"question_key": "weight_loss-06-height_weight"
},
{
"value": [
"none"
],
"step_id": 7,
"question_key": "weight_loss-07-height_weight"
},
{
"value": "never_used",
"step_id": 8,
"question_key": "weight_loss-08-height_weight"
},
{
"value": [
"none"
],
"step_id": 15,
"question_key": "weight_loss-currentmedications"
},
{
"value": [
"none"
],
"step_id": 10,
"question_key": "weight_loss-10-height_weight"
},
{
"value": [
"none"
],
"step_id": 11,
"question_key": "weight_loss-11-height_weight"
},
{
"value": [
"none"
],
"step_id": 12,
"question_key": "weight_loss-12-height_weight"
},
{
"value": [
"none"
],
"step_id": 20,
"question_key": "weight_loss-allergies"
},
{
"value": [
"none"
],
"step_id": 13,
"question_key": "weight_loss-13-height_weight"
},
{
"value": "understood",
"step_id": 14,
"question_key": "weight_loss-14-height_weight"
}
],
"is_completed": true,
"started_at": "2026-10-05T17:56:21.670103Z",
"submitted_at": "2026-10-05T17:56:21.671781Z",
"updated_at": "2026-10-05T17:56:21.671881Z"
},
"answer_status": {
"weight_loss-01-country": "answered_current_form",
"weight_loss-02-gender": "answered_current_form",
"weight_loss-03-height_weight": "answered_current_form",
"weight_loss-04-height_weight": "answered_current_form",
"weight_loss-05-height_weight": "missing",
"weight_loss-07-height_weight": "answered_current_form",
"weight_loss-08-height_weight": "answered_current_form",
"weight_loss-previous-medication-which": "missing",
"weight_loss-previous-medication-dose-wegovy": "missing",
"weight_loss-previous-medication-dose-mounjaro": "missing",
"weight_loss-previous-medication-dose-saxenda": "missing",
"weight_loss-09-height_weight": "missing",
"weight_loss-10-height_weight": "answered_current_form",
"weight_loss-11-height_weight": "answered_current_form",
"weight_loss-12-height_weight": "answered_current_form",
"weight_loss-allergies": "answered_current_form",
"weight_loss-06-height_weight": "answered_current_form",
"weight_loss-currentmedications": "answered_current_form",
"weight_loss-13-height_weight": "answered_current_form",
"weight_loss-14-height_weight": "answered_current_form",
"glp1RenewalAdverseEffects": "missing"
},
"reusable_prefill": [
{
"question_key": "weight_loss-01-country",
"step_id": 1,
"value": "ESP"
},
{
"question_key": "weight_loss-02-gender",
"step_id": 2,
"value": "male"
},
{
"question_key": "weight_loss-04-height_weight",
"step_id": 4,
"value": [
"none"
]
},
{
"question_key": "weight_loss-07-height_weight",
"step_id": 7,
"value": [
"none"
]
},
{
"question_key": "weight_loss-08-height_weight",
"step_id": 8,
"value": "never_used"
},
{
"question_key": "weight_loss-10-height_weight",
"step_id": 10,
"value": [
"none"
]
},
{
"question_key": "weight_loss-11-height_weight",
"step_id": 11,
"value": [
"none"
]
},
{
"question_key": "weight_loss-12-height_weight",
"step_id": 12,
"value": [
"none"
]
},
{
"question_key": "weight_loss-allergies",
"step_id": 20,
"value": [
"none"
]
},
{
"question_key": "weight_loss-06-height_weight",
"step_id": 6,
"value": [
"none"
]
},
{
"question_key": "weight_loss-currentmedications",
"step_id": 15,
"value": [
"none"
]
},
{
"question_key": "weight_loss-13-height_weight",
"step_id": 13,
"value": [
"none"
]
},
{
"question_key": "weight_loss-14-height_weight",
"step_id": 14,
"value": "understood"
}
]
}Questionnaires
Get saved answers
Partial answers saved so far. Nothing here has been submitted for review.
Access, effects and retries
Ownership: Patient own category/version progress.
Prerequisites: An authenticated patient account is required.
Effects: GET get_or_create can insert empty progress.
Retries: Treat as stateful; capture prestate through schema when possible.
GET
/
v1
/
users
/
questionnaires
/
{slug}
/
progress
/
curl
set -eu
umask 077
# Path values must be URL-encoded; query string excludes the leading question mark.
url="${HD_BASE_URL:?Set API origin}/v1/users/questionnaires/${HD_PATH_SLUG:?Set the path fixture}/progress/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}"
printf 'X-Brand-Slug: hi-doctor\nAccept: application/json\n' > "${HD_REQUEST_HEADERS_FILE:?Private header file}"
printf 'Authorization: Bearer %s\n' "${HD_ACCESS_TOKEN:?Set backend JWT}" >> "$HD_REQUEST_HEADERS_FILE"
curl --silent --show-error --max-time 30 --request GET \
--header "@$HD_REQUEST_HEADERS_FILE" \
--dump-header "${HD_HEADERS_FILE:?Private response header file}" \
--output "${HD_RESPONSE_FILE:?Private response file}" \
--write-out '%{http_code}\n%{content_type}\n' \
"$url"import os, json
from pathlib import Path
from urllib.parse import quote
import requests
os.umask(0o077)
url = os.environ["HD_BASE_URL"].rstrip("/") + '/v1/users/questionnaires/{slug}/progress/'
url = url.replace('{slug}', quote(os.environ['HD_PATH_SLUG'], safe=""))
if os.environ.get("HD_QUERY_STRING"): url += "?" + os.environ["HD_QUERY_STRING"]
headers = {"X-Brand-Slug": "hi-doctor", "Accept": 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["HD_ACCESS_TOKEN"]
kwargs = {}
response = requests.request('GET', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)
Path(os.environ["HD_RESPONSE_FILE"]).write_bytes(response.content)
Path(os.environ["HD_HEADERS_FILE"]).write_text(json.dumps(dict(response.headers)))
print(response.status_code)
print(response.headers.get("Content-Type", ""))
import { readFileSync, writeFileSync } from "node:fs";
const env = process.env;
let url = env.HD_BASE_URL.replace(/\/$/, "") + "/v1/users/questionnaires/{slug}/progress/";
url = url.replace("{slug}", encodeURIComponent(env.HD_PATH_SLUG));
if (env.HD_QUERY_STRING) url += "?" + env.HD_QUERY_STRING;
const headers = { "X-Brand-Slug": "hi-doctor", "Accept": "application/json" };
headers.Authorization = "Bearer " + env.HD_ACCESS_TOKEN;
const options = { method: "GET", headers, redirect: "manual", signal: AbortSignal.timeout(30000) };
const response = await fetch(url, options);
writeFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});
writeFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});
console.log(response.status);
console.log(response.headers.get("content-type") ?? "");
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/",
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://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/"
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://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/questionnaires/{slug}/progress/")
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{
"progress": {
"id": "2050fe0f-ea16-59d0-99f2-6c6051bb8351",
"category": "b438fff3-4ce5-5352-a17d-718c51491d94",
"version": "5d7dac75-8ba8-533d-a3ae-ebd2f6b21778",
"data": [
{
"value": "ESP",
"step_id": 1,
"question_key": "weight_loss-01-country"
},
{
"value": "male",
"step_id": 2,
"question_key": "weight_loss-02-gender"
},
{
"values": {
"Height (cm)": 175,
"Weight (kg)": 95
},
"step_id": 3,
"question_key": "weight_loss-03-height_weight"
},
{
"value": [
"none"
],
"step_id": 4,
"question_key": "weight_loss-04-height_weight"
},
{
"value": [
"none"
],
"step_id": 6,
"question_key": "weight_loss-06-height_weight"
},
{
"value": [
"none"
],
"step_id": 7,
"question_key": "weight_loss-07-height_weight"
},
{
"value": "never_used",
"step_id": 8,
"question_key": "weight_loss-08-height_weight"
},
{
"value": [
"none"
],
"step_id": 15,
"question_key": "weight_loss-currentmedications"
},
{
"value": [
"none"
],
"step_id": 10,
"question_key": "weight_loss-10-height_weight"
},
{
"value": [
"none"
],
"step_id": 11,
"question_key": "weight_loss-11-height_weight"
},
{
"value": [
"none"
],
"step_id": 12,
"question_key": "weight_loss-12-height_weight"
},
{
"value": [
"none"
],
"step_id": 20,
"question_key": "weight_loss-allergies"
},
{
"value": [
"none"
],
"step_id": 13,
"question_key": "weight_loss-13-height_weight"
},
{
"value": "understood",
"step_id": 14,
"question_key": "weight_loss-14-height_weight"
}
],
"is_completed": true,
"started_at": "2026-10-05T17:56:21.670103Z",
"submitted_at": "2026-10-05T17:56:21.671781Z",
"updated_at": "2026-10-05T17:56:21.671881Z"
},
"answer_status": {
"weight_loss-01-country": "answered_current_form",
"weight_loss-02-gender": "answered_current_form",
"weight_loss-03-height_weight": "answered_current_form",
"weight_loss-04-height_weight": "answered_current_form",
"weight_loss-05-height_weight": "missing",
"weight_loss-07-height_weight": "answered_current_form",
"weight_loss-08-height_weight": "answered_current_form",
"weight_loss-previous-medication-which": "missing",
"weight_loss-previous-medication-dose-wegovy": "missing",
"weight_loss-previous-medication-dose-mounjaro": "missing",
"weight_loss-previous-medication-dose-saxenda": "missing",
"weight_loss-09-height_weight": "missing",
"weight_loss-10-height_weight": "answered_current_form",
"weight_loss-11-height_weight": "answered_current_form",
"weight_loss-12-height_weight": "answered_current_form",
"weight_loss-allergies": "answered_current_form",
"weight_loss-06-height_weight": "answered_current_form",
"weight_loss-currentmedications": "answered_current_form",
"weight_loss-13-height_weight": "answered_current_form",
"weight_loss-14-height_weight": "answered_current_form",
"glp1RenewalAdverseEffects": "missing"
},
"reusable_prefill": [
{
"question_key": "weight_loss-01-country",
"step_id": 1,
"value": "ESP"
},
{
"question_key": "weight_loss-02-gender",
"step_id": 2,
"value": "male"
},
{
"question_key": "weight_loss-04-height_weight",
"step_id": 4,
"value": [
"none"
]
},
{
"question_key": "weight_loss-07-height_weight",
"step_id": 7,
"value": [
"none"
]
},
{
"question_key": "weight_loss-08-height_weight",
"step_id": 8,
"value": "never_used"
},
{
"question_key": "weight_loss-10-height_weight",
"step_id": 10,
"value": [
"none"
]
},
{
"question_key": "weight_loss-11-height_weight",
"step_id": 11,
"value": [
"none"
]
},
{
"question_key": "weight_loss-12-height_weight",
"step_id": 12,
"value": [
"none"
]
},
{
"question_key": "weight_loss-allergies",
"step_id": 20,
"value": [
"none"
]
},
{
"question_key": "weight_loss-06-height_weight",
"step_id": 6,
"value": [
"none"
]
},
{
"question_key": "weight_loss-currentmedications",
"step_id": 15,
"value": [
"none"
]
},
{
"question_key": "weight_loss-13-height_weight",
"step_id": 13,
"value": [
"none"
]
},
{
"question_key": "weight_loss-14-height_weight",
"step_id": 14,
"value": "understood"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Questionnaire category slug returned by the categories endpoint.