Skip to main content

Events

Description

For each webhook event, you can review when the event occurs, descriptions about the payload object parameters and an example of the payload.

Index

These are the currently available events to be notified via webhook:

Format

The webhooks are a POST HTTP request, sent as a JSON document.

Headers

The requests will contain some extra headers:

HeaderValueDescription
Content-typeapplication/json
Acceptapplication/json
apiKeyCOMPANY_API_KEYThe company's Api Key
secretKeyCOMPANY_SECRET_KEYThe company's Secret Key

Common payload properties

These fields are part of every event notified as webhook:

KeyTypeDescription
typestringThe name of the event.
occurred_ondatetimeThe moment the event happened, using ISO8601 extended format (Y-m-d\TH:i:sO).
payloadobjectThe event body.

Events

message_sent

The message has been sent.

Payload object

FieldTypeDescription
typestringThe owner of the message
customer.tokenstringThe customer identifier.
professional.tokenstringThe professional identifier.
professional.specialitystringThe name of the speciality.
message.room_idintThe unique id of the chat.
message.message_iduuidThe unique id of the message.

Payload example

{
"type": "professional",
"message":{
"message_id": "440fb66f-030a-4b48-9c18-1223e5c50",
"type": "string",
"text": "content of this message",
"room_id": 102548
},
"customer": {
"token": "00000000A"
},
"professional": {
"token": "564692f7-0596-435c-b1a7-7bf2af16873a",
"speciality": "Medicina General"
}
}

user_banned

The user has been banned.

Payload object

FieldTypeDescription
tokenstringThe customer identifier.
reasonstringReason for the user being banned.

Payload example

{
"customer": {
"token": "00000000A"
},
"reason": "Mal uso del servicio."
}

medical_report_created

A medical report has been created.

Payload object

FieldTypeDescription
report.urlstringThe medical report PDF url.
customer.tokenstringThe customer identifier.
professional.tokenstringThe professional identifier.
professional.specialitystringThe name of the speciality.

Payload example

{
"report": {
"url": "https://drive.meetingdoctors.com/medical_report.pdf"
},
"customer": {
"token": "00000000A"
},
"professional": {
"token": "5526b65f-9cda-4981-abf9-f7391aa76446",
"speciality": "Medicina General"
}
}

medical_prescription_modified

The app has been opened.

Payload object

FieldTypeDescription
customer.tokenstringThe customer identifier.
electronic_prescription.tinuuidThe unique id of the prescription.
electronic_prescription.pdfstringThe prescription PDF url.
electronic_prescription.last_modified_atstringThe last prescription date emitted.
electronic_prescription.treatmentsarrayThe contents of the prescription.

Payload example

{
"customer": {
"token": "00000000A"
},
"electronic_prescription": {
"tin": "09120193201",
"url": "https://drive.meetingdoctors.com/electronic_prescription.pdf"
"last_modified_at": "Y-m-d\TH:i:sO",
"treatments": []
}
}