Complete reference of all webhook events sent by Parchment, including payload structures and examples.
Event Structure
All webhooks follow this standard structure:
{
"event_type" : "prescription.created" ,
"event_id" : "evt_4e2ba4c9ed6b0a849c41f5bd8d526273" ,
"timestamp" : "2025-12-16T19:13:09.468Z" ,
"data" : {
"organization_id" : "7fa84d2b-26d7-4c71-9b5b-e591eff97e7d" ,
"patient_id" : "f03b972b-53ea-452d-ae48-024817f6c3b0" ,
"partner_patient_id" : "1523402100149593750" ,
"user_id" : "8e1c9bab-6614-4723-8981-87c8fa026dae" ,
// Event-specific fields
}
}
Root Event Fields
Field Type Description event_typestring Event type (e.g., prescription.created) event_idstring Unique event identifier (format: evt_xxx) timestampstring ISO 8601 timestamp when event was created dataobject Event data including context and event-specific information
Data Object (Common Fields)
Field Type Description organization_idstring Parchment organization ID (UUID) patient_idstring Parchment patient ID (UUID) partner_patient_idstring Your internal patient ID user_idstring ID of the user (prescriber) who triggered the event (UUID)
Prescription Events
prescription.created
Sent when a new prescription is created in Parchment.
Example Payload
TypeScript Type
{
"event_type" : "prescription.created" ,
"event_id" : "evt_4e2ba4c9ed6b0a849c41f5bd8d526273" ,
"timestamp" : "2025-12-16T19:13:09.468Z" ,
"data" : {
"organization_id" : "7fa84d2b-26d7-4c71-9b5b-e591eff97e7d" ,
"patient_id" : "f03b972b-53ea-452d-ae48-024817f6c3b0" ,
"partner_patient_id" : "1523402100149593750" ,
"user_id" : "8e1c9bab-6614-4723-8981-87c8fa026dae" ,
"scid" : "2TM1XV0RP246R1WG45"
}
}
Data Fields:
Field Type Description organization_idstring UUID of the organization where the prescription was created patient_idstring Parchment’s internal patient ID (UUID) partner_patient_idstring Your system’s patient ID (as provided during patient creation) user_idstring UUID of the user (prescriber) who created the prescription scidstring Script Control Identifier - the unique identifier for the prescription in the eRx system
When to expect:
After a prescription is successfully created via the Parchment portal or iFrame
Sent immediately after prescription creation is complete
Common use cases:
Update your system with the new prescription SCID
Use the SCID to fetch full prescription details via the Get Patient Prescriptions API endpoint
Sync prescription data to your platform
Trigger follow-up workflows (e.g., patient notifications)
The webhook provides the SCID (Script Control Identifier) which you can use to retrieve the complete prescription details by calling the Get Patient Prescriptions API endpoint with the partner_patient_id.
Event Filtering
By Event Type
Process only specific event types:
app . post ( '/webhook' , ( req , res ) => {
const event = req . body ;
switch ( event . event_type ) {
case 'prescription.created' :
handlePrescriptionCreated ( event );
break ;
case 'prescription.dispensed' :
handlePrescriptionDispensed ( event );
break ;
case 'prescription.cancelled' :
handlePrescriptionCancelled ( event );
break ;
// Handle other events...
}
res . status ( 200 ). json ({ received: true });
});
Idempotency
Always use event_id to prevent duplicate processing: