Ingest a scale reading
curl --request POST \
--url https://app.skcal.fit/api/ingest/weight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weightKg": 72.6,
"bodyFatPct": 17.4,
"userEmail": "nick@mintlify.com",
"raw": {
"device": "withings-body+",
"battery": 82
}
}
'import requests
url = "https://app.skcal.fit/api/ingest/weight"
payload = {
"weightKg": 72.6,
"bodyFatPct": 17.4,
"userEmail": "nick@mintlify.com",
"raw": {
"device": "withings-body+",
"battery": 82
}
}
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({
weightKg: 72.6,
bodyFatPct: 17.4,
userEmail: 'nick@mintlify.com',
raw: {device: 'withings-body+', battery: 82}
})
};
fetch('https://app.skcal.fit/api/ingest/weight', 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://app.skcal.fit/api/ingest/weight",
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([
'weightKg' => 72.6,
'bodyFatPct' => 17.4,
'userEmail' => 'nick@mintlify.com',
'raw' => [
'device' => 'withings-body+',
'battery' => 82
]
]),
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://app.skcal.fit/api/ingest/weight"
payload := strings.NewReader("{\n \"weightKg\": 72.6,\n \"bodyFatPct\": 17.4,\n \"userEmail\": \"nick@mintlify.com\",\n \"raw\": {\n \"device\": \"withings-body+\",\n \"battery\": 82\n }\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://app.skcal.fit/api/ingest/weight")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weightKg\": 72.6,\n \"bodyFatPct\": 17.4,\n \"userEmail\": \"nick@mintlify.com\",\n \"raw\": {\n \"device\": \"withings-body+\",\n \"battery\": 82\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.skcal.fit/api/ingest/weight")
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 \"weightKg\": 72.6,\n \"bodyFatPct\": 17.4,\n \"userEmail\": \"nick@mintlify.com\",\n \"raw\": {\n \"device\": \"withings-body+\",\n \"battery\": 82\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}Ingest
Ingest a scale reading
Machine endpoint for the Bluetooth scale listener. Authenticated with the ingest bearer token and attributed to a configured owner rather than the Access identity.
POST
/
api
/
ingest
/
weight
Ingest a scale reading
curl --request POST \
--url https://app.skcal.fit/api/ingest/weight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weightKg": 72.6,
"bodyFatPct": 17.4,
"userEmail": "nick@mintlify.com",
"raw": {
"device": "withings-body+",
"battery": 82
}
}
'import requests
url = "https://app.skcal.fit/api/ingest/weight"
payload = {
"weightKg": 72.6,
"bodyFatPct": 17.4,
"userEmail": "nick@mintlify.com",
"raw": {
"device": "withings-body+",
"battery": 82
}
}
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({
weightKg: 72.6,
bodyFatPct: 17.4,
userEmail: 'nick@mintlify.com',
raw: {device: 'withings-body+', battery: 82}
})
};
fetch('https://app.skcal.fit/api/ingest/weight', 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://app.skcal.fit/api/ingest/weight",
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([
'weightKg' => 72.6,
'bodyFatPct' => 17.4,
'userEmail' => 'nick@mintlify.com',
'raw' => [
'device' => 'withings-body+',
'battery' => 82
]
]),
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://app.skcal.fit/api/ingest/weight"
payload := strings.NewReader("{\n \"weightKg\": 72.6,\n \"bodyFatPct\": 17.4,\n \"userEmail\": \"nick@mintlify.com\",\n \"raw\": {\n \"device\": \"withings-body+\",\n \"battery\": 82\n }\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://app.skcal.fit/api/ingest/weight")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weightKg\": 72.6,\n \"bodyFatPct\": 17.4,\n \"userEmail\": \"nick@mintlify.com\",\n \"raw\": {\n \"device\": \"withings-body+\",\n \"battery\": 82\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.skcal.fit/api/ingest/weight")
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 \"weightKg\": 72.6,\n \"bodyFatPct\": 17.4,\n \"userEmail\": \"nick@mintlify.com\",\n \"raw\": {\n \"device\": \"withings-body+\",\n \"battery\": 82\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}{
"error": "weightKg must be 9-320 kg",
"detail": "upstream model returned 500"
}Authorizations
Shared secret carried as Authorization: Bearer <token>, used only by the scale-ingest route.
Body
application/json
The scale reading to ingest.
Body for a machine-submitted scale reading.
Scale-reported body weight in kilograms.
Required range:
9 <= x <= 320Example:
72.6
Optional scale-reported body-fat percentage.
Example:
17.4
Owner to attribute the reading to; falls back to the configured ingest user.
Example:
"nick@mintlify.com"
Opaque raw payload from the scale, stored for debugging.
Example:
{ "device": "withings-body+", "battery": 82 }
Response
The scale reading was ingested and stored.
Minimal success acknowledgement for write operations.
Always true.
Example:
true