Architecture

Asynchronous concept at OCR API Picaso

Every time a user upload a Documents (Image/PDF) the OCR API Picaso sends an HTTP POST request with a webhook event object to the webhook URL (bot server) you have specified in the Webhook API.

Make sure that your bot server processes the webhook event objects correctly.

You can test your webhook after register at Webhook OCR Request. (Test Webhook API).

The structure of Webhooks aren't overly complicated but are worth repeating as the terminology is non-standard.

Verifying Signatures

Have your bot server verify the signature in the transaction_id JSON response after upload image to confirm that the request was sent from the OCR API.

{
    "message": "file processed",
    "success": true,
    "transaction_id": "01FA4T23R1BCFZB2SPTX4BA4PV"
}

This is example of response after we upload a file to OCR API, webhook will send to our registered user's webhook with transaction_id, for example:

{
  "filename": "01FA4T23R1BCFZB2SPTX4BA4PV",
  "ocrResult": [
    {
      "confidence_level": 0.3809524,
      "name": "telkom",
      "target": "teknik elektro"
    },
    ...
  ],
  "type": "ijazah"
}

Asynchronous API will immediately give you a response transaction_id when making an API call instead of the analytic result. transaction_id is the unique ID given to your request as your request is processed by our system.

This API prevents you from blocking, meaning execution continues on in your program while analytic request is running.

Last updated