Webhooks - E-document Submission

Support Center > API Integration

Published 09/05/2024 at 5:52pm UTC

Page viewed 1453 times

Details

How can I use webhooks to have e-document form data pushed to me when e-documents are submitted

 

To configure webhooks for your account, please see the article Webhooks - Overview.

 

Answer

E-Document Submission Webhook

Once webhooks are configured, then any time an e-document is submitted, our system will perform an HTTPS POST to your Custom Webhook URL. When updating session status, the content of the HTTPS POST will be JSON, as follows:

{
  "WebhookType": "RECEIVED_DOCUMENTS",
  "ID": 1543518,
  "Status": "DOCUMENT RECEIVED",
  "EventTs": "2023-01-05T16:37:55",
  "Attributes": [
    {
      "AttributeName": "DocumentTemplateId",
      "AttributeValue": "106"
    },
    {
      "AttributeName": "DocumentTemplateName",
      "AttributeValue": "Client and Insurance Intake Form Example"
    },
    {
      "AttributeName": "FromSystemUserId",
      "AttributeValue": "7958"
    },
    {
      "AttributeName": "FromSystemUserName",
      "AttributeValue": "Charlie Brown"
    },
    {
      "AttributeName": "ToSystemUserId",
      "AttributeValue": "7949"
    },
    {
      "AttributeName": "ToSystemUserName",
      "AttributeValue": "Iam Demo"
    },
    {
      "AttributeName": "SignedByName",
      "AttributeValue": "Charlie Brown"
    },
    {
      "AttributeName": "ReceivedTs",
      "AttributeValue": "1/5/2023 4:37:55 PM"
    },
    {
      "AttributeName": "ParticipantId",
      "AttributeValue": "37189095"
    },
    {
      "AttributeName": "DocumentIsLandscape",
      "AttributeValue": "False"
    },
    {
      "AttributeName": "RegardingSystemUserName",
      "AttributeValue": "Charlie Brown"
    },
    {
      "AttributeName": "Metadata",
      "AttributeValue": "{\"Participant ID\":\"12345\",\"SSN\":\"123-45-6789\",\"Gender\":\"Male\",\"OtherGender\":\"\",\"Street\":\"123 Main Street\",\"City\":\"Springfield\",\"State\":\"NA\",\"PostalZip\":\"12345\",\"Phone\":\"111-222-3333\",\"Email\":\"[email protected]\",\"General Availability\":\"Nights and weekends preferred, or lunch hour on weekdays.\",\"Marital Status\":\"Single\",\"Spouse or Partner Name\":\"\",\"Work Status\":\"Retired\",\"Employer\":\"\",\"Occupation\":\"\",\"Insurance Company\":\"We Do Insurance\",\"ID Number\":\"123456\",\"Group Number\":\"7890\",\"Copay\":\"10\",\"Policy Holder Same as Contact Above\":\"Yes\",\"Policy Holder Name\":\"\",\"Policy Holder DOB\":\"\",\"Policy Holder SSN\":\"\",\"Policy Holder Street\":\"\",\"Policy Holder City\":\"\",\"Policy Holder State\":\"\",\"Postal Zip\":\"\",\"I authorize the release of any medical information necessary to process any claim_ I authorize payment of medical benefits to the physician for services rendered_\":\"Yes\",\"I understand that it is my responsibility to obtain a valid referral from my primary care physician_ I understand that if I do not obtain or have a referral on file that I may be held financially responsible for services received_ I further understand that I am responsible for services that are considered non-covered expenses by my insurer_\":\"Yes\"}"
    },
    {
      "AttributeName": "ViewUrl",
      "AttributeValue": "https://demo.securevideo.com/Document/ParticipantView/A99F34F1D0CB47FEAD2AE3DE676041D14E3D2C16C37740FBBD569543C68BB035?stu=acf38f28cd2ed35e46c09bbf6d1cae97"
    }
  ]
}

In the Webhook JSON:

  • WebhookType is the type of webhook you are receiving. For an e-document webhook, this will be "RECEIVED_DOCUMENTS".
  • ID is the ID of the object relevant to the webhook, and depends on WebhookType. For "RECEIVED_DOCUMENTS" webhooks, ID will be the Submitted Document ID.
  • Status is the status of the object relevant to the webhook, and depends on WebhookType. For "RECEIVED_DOCUMENTS" webhooks, Status will be "DOCUMENT RECEIVED".
  • EventTs: This is the date and time (in UTC) that the document was submitted. 
  • Attributes: This is the data specific to the submitted e-document. Each AttributeName describes what the variable is, and this is then followed by the attribute's value.
    • DocumentTemplateId: the e-document template ID number
    • DocumentTemplateName: the name of the e-document template
    • FromSystemUserId: the SecureVideo system user ID of the user that submitted the document
    • FromSystemUserName: the name given in the SecureVideo system for the user that submitted the document
    • ToSystemUserId: the SecureVideo system user ID of the user that hosted the session where the document was assigned
    • ToSystemUserName: the name given in the SecureVideo system of the user that hosted the session where the document was assigned
    • SignedByName: the name that was typed by the user that submitted the document
    • ReceivedTs: the time stamp (in UTC) when the document was submitted
    • ParticipantId: this is a unique ID given to each participant of a given session
    • DocumentIsLandscape: this is a template setting for when a generated PDF document is portrait or landscape
    • RegardingSystemUserName: by default, e-documents are regarding the user that submitted the e-document, however this can be changed within the user interface. (For example, if a host or another participant fills out an e-document on behalf of a participant, this attribute can edited by the host or a scheduler user to be saved under a different user ID.)
    • Metadata: this is a JSON block that will contain each unique field name followed by the input entered for the question
    • ViewUrl: this a publicly viewable URL for a non-deleted e-document.

 

 

See Also

If you would like to pull e-document data from SecureVideo rather than have it pushed each time, please see the article API - Documents.

 

 

This article was last reviewed by our Support team on July 11, 2024.