CareAR Instruct can be configured to send a webhook for certain events. This can be useful when you want to capture data generated during the CareAR Instruct session and process within your own application.
Forms Webhook
The Form element can be configured to send a webhook whenever a user submits a form. The payload of the Form webhook is in JSON format.
Example Form Webhook (JSON) Payload
{ "sessionId": "92744bc6-0f14-4dea-8e33-e221c211327e", "tenantId": "yPdp5QquBEUx7Hj7ysDd", "experienceId": "7WijSGRaiIUtKRdLQQsP", "pageId": "ocd0dghm4ir1q0b1s5h3ao", "formName": "", "formId": "element-lujsnwiq", "dataSavedTo": "webhook.site/216e7808-8531-4168-8ddb-9e7bdadd4244", "field0": { "type": "singleLine", "Single Line Field": "single line response" }, "field1": { "type": "multiLine", "Multiline Field": "multi line response" }, "field2": { "type": "dropDown", "Dropdown Field": "Selection 1" }, "field3": { "type": "radioButton", "Radio Button Field": "Selection 2" }, "field4": { "type": "checkBox", "Check Box Field": [ { "1 ": "1" }, { "2 ": "1" }, { "3 ": "1" } ] }, "field5": { "type": "rating", "Rating Field": "5" }, "field6": { "type": "thumbRating", "Thumb Up Field": "1" }, "dateTime": "2024-04-15T13:13:37.035Z", "webhookType": "form" }
Camera Capture Webhook
The Camera Capture feature allows the user to submit photos taken from the users camera or from their on device camera roll / gallery. Each photo that is submitted is sent via a webhook. There are two configurable payload types.
JSON
When JSON format is configured, the image is sent in the JSON payload and is base64 encoded. To use the image, you will need to extract the image data and perform a base 64 decode.
Example Camera Capture Webhook (JSON) Payload
{
"cameraCapture": {
"tenantId": "ukkFvZeMSewSXeK2s0X9",
"experienceId": "boTtDar8yEHdpXbbaCcJ",
"sessionId": "a600c864-d944-4efb-b50b-468fb42554d9",
"pageId": "rxjuyc3hq7c65atclg6q9x",
"cameraSubmission": {
"dateTime": 1708954764389,
"submission": [
{
"fileContent": "IMAGE DATA”,
"fileName": "captured_image_vetvmamee1j34odo3ev4upmpvap7dhje.jpeg"
}
]
}
}
}
Form-Data
When form-data format is configured, the image is sent as an attachment to the webhook payload with each field sent as a separate field.
Example Camera Capture Webhook (form-data) Payload
|