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:
Header | Value | Description |
---|---|---|
Content-type | application/json | |
Accept | application/json | |
apiKey | COMPANY_API_KEY | The company's Api Key |
secretKey | COMPANY_SECRET_KEY | The company's Secret Key |
Common payload properties
These fields are part of every event notified as webhook:
Key | Type | Description |
---|---|---|
type | string | The name of the event. |
occurred_on | datetime | The moment the event happened, using ISO8601 extended format (Y-m-d\TH:i:sO ). |
payload | object | The event body. |
Events
message_sent
The message has been sent.
Payload object
Field | Type | Description |
---|---|---|
type | string | The owner of the message |
customer .token | string | The customer identifier. |
professional .token | string | The professional identifier. |
professional .speciality | string | The name of the speciality. |
message .room_id | int | The unique id of the chat. |
message .message_id | uuid | The 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
Field | Type | Description |
---|---|---|
token | string | The customer identifier. |
reason | string | Reason 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
Field | Type | Description |
---|---|---|
report.url | string | The medical report PDF url. |
customer.token | string | The customer identifier. |
professional.token | string | The professional identifier. |
professional.speciality | string | The 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
Field | Type | Description |
---|---|---|
customer.token | string | The customer identifier. |
electronic_prescription.tin | uuid | The unique id of the prescription. |
electronic_prescription.pdf | string | The prescription PDF url. |
electronic_prescription.last_modified_at | string | The last prescription date emitted. |
electronic_prescription.treatments | array | The 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": []
}
}