Import a retry-safe batch of normalized utility readings
LogsPOST /reading-imports
Each source-file row is independently idempotent and follows the canonical Meter validation and review lifecycle.
Body application/json
batch_idsource_file_referencerowsShow child attributes
row_idmeter_idvalueunitmeasured_atevidence_idsestimate_reason
Returns
202 Per-row import outcomes
Permissions business:readings:import · Roles: admin, operations, owner
curl -X POST "$BUSINESS_API/reading-imports" \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"batch_id": "bat_2swXfESzjWaTZQE1poyvHAq9hCY",
"source_file_reference": "SOU-2026-000142",
"rows": [
{
"row_id": "row_2aIpfIwzRychTEcDNge7JkW5Ryw",
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"value": "value",
"unit": "unit",
"measured_at": "2026-11-19T09:30:00Z",
"evidence_ids": [
"evi_2N98GhhgsvHGkNNqQ3LICnXai7r"
],
"estimate_reason": "estimate reason"
}
]
}'
# No matching CLI command; use cURL or direct HTTP.
const res = await fetch("$BUSINESS_API/reading-imports", {
method: "POST",
headers: {
Authorization: "Bearer sk_test_...",
"Content-Type": "application/json"
},
body: JSON.stringify({
"batch_id": "bat_2swXfESzjWaTZQE1poyvHAq9hCY",
"source_file_reference": "SOU-2026-000142",
"rows": [
{
"row_id": "row_2aIpfIwzRychTEcDNge7JkW5Ryw",
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"value": "value",
"unit": "unit",
"measured_at": "2026-11-19T09:30:00Z",
"evidence_ids": [
"evi_2N98GhhgsvHGkNNqQ3LICnXai7r"
],
"estimate_reason": "estimate reason"
}
]
})
});
const data = await res.json();
import requests
res = requests.post(
"$BUSINESS_API/reading-imports",
headers={
"Authorization": "Bearer sk_test_..."
},
json={
"batch_id": "bat_2swXfESzjWaTZQE1poyvHAq9hCY",
"source_file_reference": "SOU-2026-000142",
"rows": [
{
"row_id": "row_2aIpfIwzRychTEcDNge7JkW5Ryw",
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"value": "value",
"unit": "unit",
"measured_at": "2026-11-19T09:30:00Z",
"evidence_ids": [
"evi_2N98GhhgsvHGkNNqQ3LICnXai7r"
],
"estimate_reason": "estimate reason"
}
]
}
)
data = res.json()
body := strings.NewReader(`{
"batch_id": "bat_2swXfESzjWaTZQE1poyvHAq9hCY",
"source_file_reference": "SOU-2026-000142",
"rows": [
{
"row_id": "row_2aIpfIwzRychTEcDNge7JkW5Ryw",
"meter_id": "mtr_21F02THKOD7uMpvUalZKsBv64nN",
"value": "value",
"unit": "unit",
"measured_at": "2026-11-19T09:30:00Z",
"evidence_ids": [
"evi_2N98GhhgsvHGkNNqQ3LICnXai7r"
],
"estimate_reason": "estimate reason"
}
]
}`)
req, _ := http.NewRequest("POST", "$BUSINESS_API/reading-imports", body)
req.Header.Set("Authorization", "Bearer sk_test_...")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
Response 202
Per-row import outcomes