> For the complete documentation index, see [llms.txt](https://picaso-ocr.gitbook.io/ocr-api-bigvision/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://picaso-ocr.gitbook.io/ocr-api-bigvision/concept-design/architecture.md).

# 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.&#x20;

{% hint style="danger" %}
Make sure that your bot server processes the webhook event objects correctly.
{% endhint %}

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

![](https://1807804417-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Me8Z1J5F_vEMxLmE500%2F-Me8Z4fcHnhmvshXvHz-%2F-Me8asvNoEzUzbpVvHv_%2Fimage.png?alt=media\&token=707efaf6-aff1-4039-aa13-885baade4f53)

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

![](https://1807804417-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Me8Z1J5F_vEMxLmE500%2F-Me8sh466uQLluG51XeS%2F-Me8tSa0prstZae45hnw%2Fimage.png?alt=media\&token=7f6ef83c-50c0-4384-8cf8-24197378142b)

## 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.&#x20;

{% hint style="success" %}
This API prevents you from blocking, meaning execution continues on in your program while analytic request is running.
{% endhint %}
