> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Analyse a business document

> Analyse a business registration certificate or other business document and extract its registration number, legal name, entity type and registered address.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-post`}>POST</span>
  <code>/api/v1/document/analysis/business\_document</code>
</div>

Submit a business registration certificate or other business document by URL and get back the detected document type, registration number, legal name, entity type and registered address. Accepts image files (JPEG, PNG) — PDFs aren’t supported.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |
| `Content-Type`  | Yes      | `application/json`                                  |

## Body parameters

| Parameter     | Type   | Required | Description                                         |
| ------------- | ------ | -------- | --------------------------------------------------- |
| `input_type`  | string | Yes      | `url` (default) or `base64`.                        |
| `input_value` | string | Yes      | The image URL (or Base64) of the business document. |

## Response

A `200` returns the extracted business details under `entity` — see the panel on the right.

## Errors

| Code  | Meaning                                                                                       |
| ----- | --------------------------------------------------------------------------------------------- |
| `400` | Bad request — a required field is missing or the image can't be read.                         |
| `401` | Unauthorized — check your key and `AppId` (no `Bearer` prefix).                               |
| `402` | Insufficient wallet balance. [Fund your wallet](/api-reference/core-concepts/wallet-billing). |
| `424` | Failed dependency — the analysis engine couldn't process the document.                        |
| `429` | Too many requests — back off and retry.                                                       |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.dojah.io/api/v1/document/analysis/business_document" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}" \
    -H "Content-Type: application/json" \
    -d '{
      "input_type": "url",
      "input_value": "https://example.com/certificate.jpg"
    }'
  ```

  ```js Node.js theme={null}
  const res = await fetch("https://api.dojah.io/api/v1/document/analysis/business_document", {
    method: "POST",
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      input_type: "url",
      input_value: "https://example.com/certificate.jpg"
    }),
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.post(
      "https://api.dojah.io/api/v1/document/analysis/business_document",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      json={
          "input_type": "url",
          "input_value": "https://example.com/certificate.jpg"
      },
  )
  data = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json POST /api/v1/document/analysis/business_document theme={null}
  {
    "entity": {
      "result": { "status": "success", "message": "" },
      "document_type": "Business Registration Certificate",
      "issuing_country": "Sandbox Country",
      "issuing_authority": "Sandbox State Business Authority",
      "registration_number": "SBX-0000",
      "business": {
        "legal_name": "Sandbox Demo Company Ltd.",
        "entity_type": "Incorporated",
        "nature_of_business": ["Software Development", "Testing Services"]
      },
      "principal_place_of_business": {
        "street": "123 Sandbox Street",
        "city": "Testville",
        "lga": "",
        "state": "SB",
        "country": "Sandbox Country"
      },
      "registration_date": "2025-01-01"
    }
  }
  ```
</ResponseExample>
