Receive Nabla Connect events
POST/callback
This is the endpoint you need to implement on your server to receive callbacks. This page references the format of all the possible callbacks.
Request
Responses
- 200
Respond with 200 to acknowledge the handling of this event.
Operation spec
{
"method": "post",
"path": "/callback",
"operationId": "callback",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"title": "NOTE_EXPORT",
"x-sensitive-medical-data": true,
"allOf": [
{
"type": "object",
"properties": {
"request_uuid": {
"description": "The unique identifier of this webhook event",
"type": "string",
"format": "uuid",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
},
"type": {
"description": "Type of this event, serves as a discriminator between the different possible webhook types.",
"type": "string",
"enum": [
"NOTE_EXPORT",
"PATIENT_INSTRUCTIONS_EXPORT"
],
"title": "callback_type"
}
},
"required": [
"request_uuid",
"type"
],
"title": "base_callback"
},
{
"type": "object",
"description": "Event sent when a note is exported.",
"properties": {
"data": {
"type": "object",
"properties": {
"external_patient_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"external_encounter_id": {
"type": "string",
"description": "External encounter ID from your app, that you provided at launch"
},
"external_provider_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"note": {
"description": "The exported note.",
"type": "object",
"properties": {
"sections": {
"type": "array",
"description": "Content of the note structured in multiple sections.",
"items": {
"type": "object",
"description": "A note section.",
"properties": {
"category": {
"type": "string",
"description": "A category identifying a section of a note.\nThe set of possible categories depend on the template that is used.",
"example": "CHIEF_COMPLAINT",
"enum": [
"CHIEF_COMPLAINT",
"HISTORY_OF_PRESENT_ILLNESS",
"PAST_HISTORY",
"CURRENT_MEDICATIONS",
"VITALS",
"IMMUNIZATIONS",
"ASSESSMENT_AND_PLAN",
"EXAMINATION",
"RESULTS",
"PRESCRIPTIONS",
"APPOINTMENTS"
],
"title": "note_section_type"
},
"title": {
"type": "string",
"description": "The section title.",
"example": "Chief complaint"
},
"content": {
"type": "string",
"deprecated": true,
"description": "Content of the note section, flattened as text. Deprecated: replace your usage with `structured_content`, which carries the same content in a structured form.",
"example": "Sleep disorder"
}
},
"required": [
"content"
],
"title": "note_section"
}
},
"free_text": {
"type": "string",
"description": "Free-form text written by the practitioner, alongside the note sections."
}
},
"required": [
"sections"
],
"title": "note"
},
"transcript": {
"description": "The exported note transcript.",
"type": "array",
"items": {
"type": "object",
"description": "A portion of the transcribed consultation.",
"properties": {
"text": {
"type": "string",
"description": "The transcribed text.",
"example": "Also, I’m allergic to peanuts."
},
"speaker_type": {
"type": "string",
"enum": [
"DOCTOR",
"PATIENT",
"UNSPECIFIED"
],
"description": "Who said the text in this transcript item.",
"example": "DOCTOR",
"title": "speaker"
},
"locale": {
"description": "Locale for this transcript item, detected by the speech-to-text engine from the list of locales in the input.",
"type": "string",
"enum": [
"ENGLISH_US",
"ENGLISH_UK",
"SPANISH_ES",
"SPANISH_MX",
"FRENCH_FR",
"ARABIC_EG",
"ARABIC_LB",
"ARABIC_MA",
"ARABIC_SA",
"ARMENIAN_AM",
"BENGALI_IN",
"CANTONESE_CN",
"CROATIAN_HR",
"FILIPINO_PH",
"GERMAN_DE",
"GREEK_GR",
"GUJARATI_IN",
"HEBREW_IL",
"HINDI_IN",
"ITALIAN_IT",
"JAPANESE_JP",
"KHMER_KH",
"KOREAN_KR",
"MANDARIN_CN",
"PERSIAN_IR",
"POLISH_PL",
"PORTUGUESE_PT",
"PUNJABI_IN",
"RUSSIAN_RU",
"SERBIAN_RS",
"TAMIL_IN",
"TELUGU_IN",
"THAI_TH",
"URDU_IN",
"VIETNAMESE_VN",
"HAITIAN_HT"
],
"example": "ENGLISH_US",
"title": "speech_locale"
},
"start_offset_ms": {
"type": "integer",
"description": "Start time of this transcription item as the offset, in milliseconds, from the start of the audio file.",
"example": 65100
},
"end_offset_ms": {
"type": "integer",
"description": "End time of this transcription item as the offset, in milliseconds, from the start of the audio file. Equals the `start_time_ms` plus the duration of the related transcribed audio portion.",
"example": 69300
}
},
"required": [
"text",
"speaker_type",
"start_offset_ms",
"end_offset_ms"
],
"title": "transcript_item"
},
"title": "transcript"
}
},
"required": [
"external_patient_id",
"external_encounter_id",
"external_provider_id",
"note"
],
"title": "note_export_data"
}
},
"required": [
"data"
]
}
]
},
{
"title": "PATIENT_INSTRUCTIONS_EXPORT",
"x-sensitive-medical-data": true,
"allOf": [
{
"type": "object",
"properties": {
"request_uuid": {
"description": "The unique identifier of this webhook event",
"type": "string",
"format": "uuid",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
},
"type": {
"description": "Type of this event, serves as a discriminator between the different possible webhook types.",
"type": "string",
"enum": [
"NOTE_EXPORT",
"PATIENT_INSTRUCTIONS_EXPORT"
],
"title": "callback_type"
}
},
"required": [
"request_uuid",
"type"
],
"title": "base_callback"
},
{
"type": "object",
"description": "Event sent when patient instructions are exported.",
"properties": {
"data": {
"type": "object",
"properties": {
"external_patient_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"external_encounter_id": {
"type": "string",
"description": "External encounter ID from your app, that you provided at launch"
},
"external_provider_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"patient_instructions": {
"description": "The exported patient_instructions.",
"type": "object",
"properties": {
"instructions": {
"type": "string",
"description": "List of instructions for the patient.",
"example": "- Order a sleep test that you can do at home. This will help us understand more about how you sleep.\n- After you've done the sleep test, we'll talk about the results in our next meeting."
}
},
"required": [
"instructions"
],
"title": "patient_instructions"
}
},
"required": [
"external_patient_id",
"external_encounter_id",
"external_provider_id",
"patient_instructions"
],
"title": "patient_instructions_export_data"
}
},
"required": [
"data"
]
}
]
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"NOTE_EXPORT": {
"x-sensitive-medical-data": true,
"allOf": [
{
"type": "object",
"properties": {
"request_uuid": {
"description": "The unique identifier of this webhook event",
"type": "string",
"format": "uuid",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
},
"type": {
"description": "Type of this event, serves as a discriminator between the different possible webhook types.",
"type": "string",
"enum": [
"NOTE_EXPORT",
"PATIENT_INSTRUCTIONS_EXPORT"
],
"title": "callback_type"
}
},
"required": [
"request_uuid",
"type"
],
"title": "base_callback"
},
{
"type": "object",
"description": "Event sent when a note is exported.",
"properties": {
"data": {
"type": "object",
"properties": {
"external_patient_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"external_encounter_id": {
"type": "string",
"description": "External encounter ID from your app, that you provided at launch"
},
"external_provider_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"note": {
"description": "The exported note.",
"type": "object",
"properties": {
"sections": {
"type": "array",
"description": "Content of the note structured in multiple sections.",
"items": {
"type": "object",
"description": "A note section.",
"properties": {
"category": {
"type": "string",
"description": "A category identifying a section of a note.\nThe set of possible categories depend on the template that is used.",
"example": "CHIEF_COMPLAINT",
"enum": [
"CHIEF_COMPLAINT",
"HISTORY_OF_PRESENT_ILLNESS",
"PAST_HISTORY",
"CURRENT_MEDICATIONS",
"VITALS",
"IMMUNIZATIONS",
"ASSESSMENT_AND_PLAN",
"EXAMINATION",
"RESULTS",
"PRESCRIPTIONS",
"APPOINTMENTS"
],
"title": "note_section_type"
},
"title": {
"type": "string",
"description": "The section title.",
"example": "Chief complaint"
},
"content": {
"type": "string",
"deprecated": true,
"description": "Content of the note section, flattened as text. Deprecated: replace your usage with `structured_content`, which carries the same content in a structured form.",
"example": "Sleep disorder"
}
},
"required": [
"content"
],
"title": "note_section"
}
},
"free_text": {
"type": "string",
"description": "Free-form text written by the practitioner, alongside the note sections."
}
},
"required": [
"sections"
],
"title": "note"
},
"transcript": {
"description": "The exported note transcript.",
"type": "array",
"items": {
"type": "object",
"description": "A portion of the transcribed consultation.",
"properties": {
"text": {
"type": "string",
"description": "The transcribed text.",
"example": "Also, I’m allergic to peanuts."
},
"speaker_type": {
"type": "string",
"enum": [
"DOCTOR",
"PATIENT",
"UNSPECIFIED"
],
"description": "Who said the text in this transcript item.",
"example": "DOCTOR",
"title": "speaker"
},
"locale": {
"description": "Locale for this transcript item, detected by the speech-to-text engine from the list of locales in the input.",
"type": "string",
"enum": [
"ENGLISH_US",
"ENGLISH_UK",
"SPANISH_ES",
"SPANISH_MX",
"FRENCH_FR",
"ARABIC_EG",
"ARABIC_LB",
"ARABIC_MA",
"ARABIC_SA",
"ARMENIAN_AM",
"BENGALI_IN",
"CANTONESE_CN",
"CROATIAN_HR",
"FILIPINO_PH",
"GERMAN_DE",
"GREEK_GR",
"GUJARATI_IN",
"HEBREW_IL",
"HINDI_IN",
"ITALIAN_IT",
"JAPANESE_JP",
"KHMER_KH",
"KOREAN_KR",
"MANDARIN_CN",
"PERSIAN_IR",
"POLISH_PL",
"PORTUGUESE_PT",
"PUNJABI_IN",
"RUSSIAN_RU",
"SERBIAN_RS",
"TAMIL_IN",
"TELUGU_IN",
"THAI_TH",
"URDU_IN",
"VIETNAMESE_VN",
"HAITIAN_HT"
],
"example": "ENGLISH_US",
"title": "speech_locale"
},
"start_offset_ms": {
"type": "integer",
"description": "Start time of this transcription item as the offset, in milliseconds, from the start of the audio file.",
"example": 65100
},
"end_offset_ms": {
"type": "integer",
"description": "End time of this transcription item as the offset, in milliseconds, from the start of the audio file. Equals the `start_time_ms` plus the duration of the related transcribed audio portion.",
"example": 69300
}
},
"required": [
"text",
"speaker_type",
"start_offset_ms",
"end_offset_ms"
],
"title": "transcript_item"
},
"title": "transcript"
}
},
"required": [
"external_patient_id",
"external_encounter_id",
"external_provider_id",
"note"
],
"title": "note_export_data"
}
},
"required": [
"data"
]
}
],
"title": "callback_note_export"
},
"PATIENT_INSTRUCTIONS_EXPORT": {
"x-sensitive-medical-data": true,
"allOf": [
{
"type": "object",
"properties": {
"request_uuid": {
"description": "The unique identifier of this webhook event",
"type": "string",
"format": "uuid",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
},
"type": {
"description": "Type of this event, serves as a discriminator between the different possible webhook types.",
"type": "string",
"enum": [
"NOTE_EXPORT",
"PATIENT_INSTRUCTIONS_EXPORT"
],
"title": "callback_type"
}
},
"required": [
"request_uuid",
"type"
],
"title": "base_callback"
},
{
"type": "object",
"description": "Event sent when patient instructions are exported.",
"properties": {
"data": {
"type": "object",
"properties": {
"external_patient_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"external_encounter_id": {
"type": "string",
"description": "External encounter ID from your app, that you provided at launch"
},
"external_provider_id": {
"type": "string",
"description": "External patient ID from your app, that you provided at launch"
},
"patient_instructions": {
"description": "The exported patient_instructions.",
"type": "object",
"properties": {
"instructions": {
"type": "string",
"description": "List of instructions for the patient.",
"example": "- Order a sleep test that you can do at home. This will help us understand more about how you sleep.\n- After you've done the sleep test, we'll talk about the results in our next meeting."
}
},
"required": [
"instructions"
],
"title": "patient_instructions"
}
},
"required": [
"external_patient_id",
"external_encounter_id",
"external_provider_id",
"patient_instructions"
],
"title": "patient_instructions_export_data"
}
},
"required": [
"data"
]
}
],
"title": "callback_patient_instructions_export"
}
}
},
"example": {
"request_uuid": "0cf0b04d-5bbe-47a9-9601-3dd037644f65",
"type": "NOTE_EXPORT",
"data": {
"patient_id": "patient_123456",
"encounter_id": "encounter_987654",
"provider_id": "provider_456789",
"note": {
"sections": [
{
"type": "CHIEF_COMPLAINT",
"title": "Chief complaint",
"content": "- Persistent fatigue\n- Mild headaches on the right side"
},
{
"type": "ASSESSMENT_AND_PLAN",
"title": "Past medical history",
"content": "- Hypertension\n- Elevated blood sugar levels"
},
{
"type": "RESULTS",
"title": "Lab results",
"content": "- Blood sugar level: 1.4 g/L\n- LDL cholesterol: 2 g/L"
}
]
}
}
},
"title": "callback"
}
}
}
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"request_uuid": {
"description": "The request UUID you provided in the request.",
"type": "string",
"format": "uuid",
"example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
"title": "uuid"
}
},
"required": [
"request_uuid"
],
"title": "callback_response"
}
}
},
"description": "Respond with 200 to acknowledge the handling of this event."
}
}
}