curl --request GET \
--url https://api.staging.purplelabelmd.com/v1/account/question-library/facts \
--header 'Authorization: Bearer <token>' \
--header 'X-Brand-Id: <x-brand-id>'import requests
url = "https://api.staging.purplelabelmd.com/v1/account/question-library/facts"
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Brand-Id': '<x-brand-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.staging.purplelabelmd.com/v1/account/question-library/facts', 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://api.staging.purplelabelmd.com/v1/account/question-library/facts",
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>",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.staging.purplelabelmd.com/v1/account/question-library/facts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
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.staging.purplelabelmd.com/v1/account/question-library/facts")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.purplelabelmd.com/v1/account/question-library/facts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"brand_id": "<string>",
"facts": [
{
"cardinality": "single",
"code": "<string>",
"value_type": "boolean",
"options": [
{
"code": "<string>",
"exclusive": false
}
]
}
],
"mode": "initial",
"therapy": "<string>"
}{
"status": 123,
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"where": "<string>",
"already_asked": {
"asked_as": "dob",
"asked_by": "q_dob",
"prompt": "What is your date of birth?",
"section_id": "about_you",
"section_title": "About you"
},
"missing_values": [
"US-AL",
"US-AK"
],
"readers": [
{
"id": "<string>",
"kind": "rule"
}
],
"refresh_policy": "static",
"value_type": "string"
}
],
"landed_first": {
"actor": "<string>",
"at": "2023-11-07T05:31:56Z",
"bundle_hash": "<string>",
"source": "activation_history",
"action": "set_create",
"question_id": "<string>",
"section_id": "<string>"
},
"mdi_case_id": "<string>",
"prescriber_case_id": "<string>",
"required_role": "<string>",
"type": "<string>"
}{
"status": 123,
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"where": "<string>",
"already_asked": {
"asked_as": "dob",
"asked_by": "q_dob",
"prompt": "What is your date of birth?",
"section_id": "about_you",
"section_title": "About you"
},
"missing_values": [
"US-AL",
"US-AK"
],
"readers": [
{
"id": "<string>",
"kind": "rule"
}
],
"refresh_policy": "static",
"value_type": "string"
}
],
"landed_first": {
"actor": "<string>",
"at": "2023-11-07T05:31:56Z",
"bundle_hash": "<string>",
"source": "activation_history",
"action": "set_create",
"question_id": "<string>",
"section_id": "<string>"
},
"mdi_case_id": "<string>",
"prescriber_case_id": "<string>",
"required_role": "<string>",
"type": "<string>"
}List the facts a qualification question may bind
Lists the facts a qualification question may bind for your brand: the shared screening facts plus your brand’s own added facts (never another brand’s). Every fact is non-medical screening data. Optional q filters the list by a substring of the fact code.
curl --request GET \
--url https://api.staging.purplelabelmd.com/v1/account/question-library/facts \
--header 'Authorization: Bearer <token>' \
--header 'X-Brand-Id: <x-brand-id>'import requests
url = "https://api.staging.purplelabelmd.com/v1/account/question-library/facts"
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Brand-Id': '<x-brand-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.staging.purplelabelmd.com/v1/account/question-library/facts', 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://api.staging.purplelabelmd.com/v1/account/question-library/facts",
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>",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.staging.purplelabelmd.com/v1/account/question-library/facts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
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.staging.purplelabelmd.com/v1/account/question-library/facts")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.purplelabelmd.com/v1/account/question-library/facts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"brand_id": "<string>",
"facts": [
{
"cardinality": "single",
"code": "<string>",
"value_type": "boolean",
"options": [
{
"code": "<string>",
"exclusive": false
}
]
}
],
"mode": "initial",
"therapy": "<string>"
}{
"status": 123,
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"where": "<string>",
"already_asked": {
"asked_as": "dob",
"asked_by": "q_dob",
"prompt": "What is your date of birth?",
"section_id": "about_you",
"section_title": "About you"
},
"missing_values": [
"US-AL",
"US-AK"
],
"readers": [
{
"id": "<string>",
"kind": "rule"
}
],
"refresh_policy": "static",
"value_type": "string"
}
],
"landed_first": {
"actor": "<string>",
"at": "2023-11-07T05:31:56Z",
"bundle_hash": "<string>",
"source": "activation_history",
"action": "set_create",
"question_id": "<string>",
"section_id": "<string>"
},
"mdi_case_id": "<string>",
"prescriber_case_id": "<string>",
"required_role": "<string>",
"type": "<string>"
}{
"status": 123,
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"where": "<string>",
"already_asked": {
"asked_as": "dob",
"asked_by": "q_dob",
"prompt": "What is your date of birth?",
"section_id": "about_you",
"section_title": "About you"
},
"missing_values": [
"US-AL",
"US-AK"
],
"readers": [
{
"id": "<string>",
"kind": "rule"
}
],
"refresh_policy": "static",
"value_type": "string"
}
],
"landed_first": {
"actor": "<string>",
"at": "2023-11-07T05:31:56Z",
"bundle_hash": "<string>",
"source": "activation_history",
"action": "set_create",
"question_id": "<string>",
"section_id": "<string>"
},
"mdi_case_id": "<string>",
"prescriber_case_id": "<string>",
"required_role": "<string>",
"type": "<string>"
}Authorizations
Per-client API key (M2M). Presented as Authorization: Bearer <key>.
Headers
Your brand id (brd_...). It must be one of the brands your API key's account owns; with a publishable key it must be the one brand the key was issued for. A missing or malformed value is refused with 400, and an unknown or foreign brand with 404.
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Query Parameters
the therapy you are authoring for. The platform's therapy vocabulary is the committed roster the service serves, and grows when a new therapy's shared medical intake ships. An unknown therapy answers 404. NOTE, and it is a statement about decision-making rather than about content: walk carries a placeholder question set, and every therapy other than weight_loss carries a real question set but no qualification rulebook — those answers are recorded and no eligibility or qualification outcome is produced until per-rule review criteria are authored and approved by a medical director. A therapy appearing here says what the authoring surface resolves; it is never a statement of medical readiness.
weight_loss, walk, ed, anti_aging_b12, anti_aging_glutathione, anti_aging_nad_nasal, hair_loss, skin, premature_ejaculation, acid_reflux, performance_anxiety, birth_control, anti_aging_nad_injection, pt_141 initial for the first-visit intake, refill for the refill flow. Today only initial is served; a mode with no shared intake answers 404.
initial, refill optional case-insensitive substring filter over fact codes
Response
the qualification-authoring fact catalog for this brand