The Web Hook

Setting up.

In order to use the web hook you must have a created a project and trained the AI for the prediction you want to use (or used one of the pre-built models). By configuring a web hook in the projects dashboard upon the completion of a file prediction a JSON will be sent to the address defined in the web hook.

Using

Once the project is set up and the AI-model is trained a file can be uploaded and the AI will automatically predict the information in the file. When the scan and prediction completes is where the web hook come in. Once the results from the scan and prediction are complete, the results are delivered to you by making a request to your web hook server. This can trigger your application to download the results and continuing doing what you want with it. The possibilities of using SmartDocs don't just extend to the using it to scan a file for useful information. Object detection can be used to detect cars in car spaces, count people in a photo.

This can be used in conjunction with the ability to Email in a document.

Response

SmartDocs will invoke the registered Web Hook, when the prediction is finished or an exception occurred (reason will be provided in the exceptionMessage field), with the following payload:

{
  id: TrainingFileId,
  filename: string,
  pdfFileKey?: string,  
  workflowKey: string,
  modelType: string,    
  size: number,
  mineType: MimeType | null,
  isTraining: boolean,
  uploadUser?: string,
  uploadSource?: string,
  analyticalGroup1?: string,
  analyticalGroup2?: string,
  thirdPartyId?: string,
  pages?: number,
  workflowStatus?: WorkflowStatus,
  labelIds?: LabelId[],
  lastUpdatedTime?: string,
  isRead?: boolean,
  exceptionMessage?: string | null,
  emailFileKey?: string  
}