Update profile
curl --request PATCH \
--url https://api.hi-doctor.ai/v1/users/profile/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date_of_birth": "1985-04-12",
"country_of_residence": "ESP"
}
'import requests
url = "https://api.hi-doctor.ai/v1/users/profile/"
payload = {
"date_of_birth": "1985-04-12",
"country_of_residence": "ESP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({date_of_birth: '1985-04-12', country_of_residence: 'ESP'})
};
fetch('https://api.hi-doctor.ai/v1/users/profile/', 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.hi-doctor.ai/v1/users/profile/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'date_of_birth' => '1985-04-12',
'country_of_residence' => 'ESP'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hi-doctor.ai/v1/users/profile/"
payload := strings.NewReader("{\n \"date_of_birth\": \"1985-04-12\",\n \"country_of_residence\": \"ESP\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hi-doctor.ai/v1/users/profile/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"date_of_birth\": \"1985-04-12\",\n \"country_of_residence\": \"ESP\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/profile/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date_of_birth\": \"1985-04-12\",\n \"country_of_residence\": \"ESP\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0a1b2c3d-4e5f-4a6b-8c9d-000000000001",
"email": "patient@example.com",
"first_name": "Alex",
"last_name": "Moreno",
"date_of_birth": "1985-04-12",
"gender": "1",
"country_of_residence": "ESP",
"timezone": "Europe/Madrid",
"locale": "en",
"city": null,
"postal_code": null,
"issuing_state": "ESP",
"document_number": "X0000000X",
"document_type": "ID_CARD",
"addresses": [],
"is_doctor": false,
"is_backoffice_admin": false,
"is_marketer": false,
"is_referrer": false,
"forms_completed": {
"hair_growth": true,
"weight_loss": true,
"sexual_health": false,
"premature_ejaculation": false,
"chlamydia": false,
"urinary_tract_infection": false,
"emergency_contraception": false,
"hiv_prep": false
},
"orders": []
}{
"date_of_birth": [
"Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid"
}
]
}Account
Update profile
Self-scoped partial update.
PATCH
/
v1
/
users
/
profile
/
Update profile
curl --request PATCH \
--url https://api.hi-doctor.ai/v1/users/profile/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date_of_birth": "1985-04-12",
"country_of_residence": "ESP"
}
'import requests
url = "https://api.hi-doctor.ai/v1/users/profile/"
payload = {
"date_of_birth": "1985-04-12",
"country_of_residence": "ESP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({date_of_birth: '1985-04-12', country_of_residence: 'ESP'})
};
fetch('https://api.hi-doctor.ai/v1/users/profile/', 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.hi-doctor.ai/v1/users/profile/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'date_of_birth' => '1985-04-12',
'country_of_residence' => 'ESP'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hi-doctor.ai/v1/users/profile/"
payload := strings.NewReader("{\n \"date_of_birth\": \"1985-04-12\",\n \"country_of_residence\": \"ESP\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hi-doctor.ai/v1/users/profile/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"date_of_birth\": \"1985-04-12\",\n \"country_of_residence\": \"ESP\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/profile/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date_of_birth\": \"1985-04-12\",\n \"country_of_residence\": \"ESP\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0a1b2c3d-4e5f-4a6b-8c9d-000000000001",
"email": "patient@example.com",
"first_name": "Alex",
"last_name": "Moreno",
"date_of_birth": "1985-04-12",
"gender": "1",
"country_of_residence": "ESP",
"timezone": "Europe/Madrid",
"locale": "en",
"city": null,
"postal_code": null,
"issuing_state": "ESP",
"document_number": "X0000000X",
"document_type": "ID_CARD",
"addresses": [],
"is_doctor": false,
"is_backoffice_admin": false,
"is_marketer": false,
"is_referrer": false,
"forms_completed": {
"hair_growth": true,
"weight_loss": true,
"sexual_health": false,
"premature_ejaculation": false,
"chlamydia": false,
"urinary_tract_infection": false,
"emergency_contraception": false,
"hiv_prep": false
},
"orders": []
}{
"date_of_birth": [
"Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Maximum string length:
150Maximum string length:
150Patient gender is required
Available options:
0, 1, 2, 3 Maximum string length:
64Available options:
de, en, es, fr, it, nl, pt Patient city used to recommend nearby pharmacies.
Maximum string length:
120Patient postal code used to recommend nearby pharmacies.
Maximum string length:
20Maximum string length:
200Maximum string length:
50Available options:
PASSPORT, ID_CARD Response
Patient gender is required
Available options:
0, 1, 2, 3 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Can manage configuration surfaces such as questionnaires, templates, automations, and audiences.
Can access aggregated revenue and funnel analytics without patient or doctor PII.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
150Maximum string length:
150Maximum string length:
64Available options:
de, en, es, fr, it, nl, pt Patient city used to recommend nearby pharmacies.
Maximum string length:
120Patient postal code used to recommend nearby pharmacies.
Maximum string length:
20Maximum string length:
200Maximum string length:
50Available options:
PASSPORT, ID_CARD