patient.subscribed
When Signals sends patient.subscribed, its payload and how to handle it in Node.js, Python and Java.
A patient is attached to the subscriber.
Payload
Every delivery is the envelope type, timestamp, sequence and data; the delivery's id is the webhook-id header. See Verify webhooks.
{
"type": "patient.subscribed",
"timestamp": "2026-10-25T08:00:02.000Z",
"sequence": 1054,
"data": {
"patient": "6f1c2a8e-3b7d-4c55-9a0e-2d4b8f6e1a90",
"subscriber": "ovok-sub-4f2a9c"
}
}subscriber is the subscriber the patient was attached to.
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 'patient.subscribed':
await trackPatient(data.patient);
break;
default:
break;
}
}Related
Last updated on