observation.created
When Signals sends observation.created, its payload and how to handle it in Node.js, Python and Java.
A reading is stored. One delivery per reading: subscribe only if you need them.
Payload
Every delivery is the envelope type, timestamp, sequence and data; the delivery's id is the webhook-id header. See Verify webhooks.
{
"type": "observation.created",
"timestamp": "2026-10-25T08:00:02.000Z",
"sequence": 1051,
"data": {
"patient": "6f1c2a8e-3b7d-4c55-9a0e-2d4b8f6e1a90",
"observation": {
"id": "a3e8f1c2-5d6b-4a7e-9c0f-1b2d3e4f5a6b",
"patient": "6f1c2a8e-3b7d-4c55-9a0e-2d4b8f6e1a90",
"refId": "reading-0001",
"status": "final",
"code": {
"coding": [
{
"code": "8867-4",
"system": "http://loinc.org",
"display": "Heart rate"
}
]
},
"valueQuantity": {
"value": 132,
"unit": "/min"
},
"component": [],
"observedAt": "2026-10-25T08:00:00.000Z",
"createdAt": "2026-10-25T08:00:02.000Z",
"updatedAt": "2026-10-25T08:00:02.000Z"
}
}
}| Field | Meaning |
|---|---|
patient | The patient's Signals id. |
observation | The stored reading, in FHIR shape: its refId, code, value or component list, and observedAt. |
Handle the event
Verify the delivery first (Verify webhooks), then act on the verified event as in Handle an event.
export async function handle(webhookId, event) {
if (!(await firstTime(webhookId))) return;
const { data } = event;
switch (event.type) {
case 'observation.created':
await storeReading(data.patient, data.observation);
break;
default:
break;
}
}Related
Last updated on