Log a weight for a day
curl --request POST \
--url https://api.hi-doctor.ai/v1/users/journal/weight-entries/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weight_kg": 79.9,
"logged_on": "2026-07-27",
"note": "Weekly progress check-in"
}
'import requests
url = "https://api.hi-doctor.ai/v1/users/journal/weight-entries/"
payload = {
"weight_kg": 79.9,
"logged_on": "2026-07-27",
"note": "Weekly progress check-in"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({weight_kg: 79.9, logged_on: '2026-07-27', note: 'Weekly progress check-in'})
};
fetch('https://api.hi-doctor.ai/v1/users/journal/weight-entries/', 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/journal/weight-entries/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'weight_kg' => 79.9,
'logged_on' => '2026-07-27',
'note' => 'Weekly progress check-in'
]),
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/journal/weight-entries/"
payload := strings.NewReader("{\n \"weight_kg\": 79.9,\n \"logged_on\": \"2026-07-27\",\n \"note\": \"Weekly progress check-in\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hi-doctor.ai/v1/users/journal/weight-entries/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weight_kg\": 79.9,\n \"logged_on\": \"2026-07-27\",\n \"note\": \"Weekly progress check-in\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/journal/weight-entries/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"weight_kg\": 79.9,\n \"logged_on\": \"2026-07-27\",\n \"note\": \"Weekly progress check-in\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0a1b2c3d-4e5f-4a6b-8c9d-000000000007",
"created_at": "2026-08-02T11:43:49.842252Z",
"updated_at": "2026-08-02T11:43:49.842253Z",
"weight_kg": 79.9,
"logged_on": "2026-07-27",
"note": "Weekly progress check-in"
}{
"weight_kg": [
"This field is required."
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid"
}
]
}Progress
Log a weight for a day
Upserts by logged_on — one entry per day, so logging again for the same date replaces it.
Always send logged_on explicitly. It is a model default, not a serializer default: omitting it takes the plain-create path and violates the one-per-day constraint with a 500. Derive the date in the patient’s own timezone, not the server’s.
POST
/
v1
/
users
/
journal
/
weight-entries
/
Log a weight for a day
curl --request POST \
--url https://api.hi-doctor.ai/v1/users/journal/weight-entries/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weight_kg": 79.9,
"logged_on": "2026-07-27",
"note": "Weekly progress check-in"
}
'import requests
url = "https://api.hi-doctor.ai/v1/users/journal/weight-entries/"
payload = {
"weight_kg": 79.9,
"logged_on": "2026-07-27",
"note": "Weekly progress check-in"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({weight_kg: 79.9, logged_on: '2026-07-27', note: 'Weekly progress check-in'})
};
fetch('https://api.hi-doctor.ai/v1/users/journal/weight-entries/', 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/journal/weight-entries/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'weight_kg' => 79.9,
'logged_on' => '2026-07-27',
'note' => 'Weekly progress check-in'
]),
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/journal/weight-entries/"
payload := strings.NewReader("{\n \"weight_kg\": 79.9,\n \"logged_on\": \"2026-07-27\",\n \"note\": \"Weekly progress check-in\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hi-doctor.ai/v1/users/journal/weight-entries/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weight_kg\": 79.9,\n \"logged_on\": \"2026-07-27\",\n \"note\": \"Weekly progress check-in\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/journal/weight-entries/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"weight_kg\": 79.9,\n \"logged_on\": \"2026-07-27\",\n \"note\": \"Weekly progress check-in\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0a1b2c3d-4e5f-4a6b-8c9d-000000000007",
"created_at": "2026-08-02T11:43:49.842252Z",
"updated_at": "2026-08-02T11:43:49.842253Z",
"weight_kg": 79.9,
"logged_on": "2026-07-27",
"note": "Weekly progress check-in"
}{
"weight_kg": [
"This field is required."
]
}{
"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
⌘I