---
updatedAt: 2026-10-16T13:34:05.000Z
agentTools:
  projectIndex: https://docs.verihubs.com/llms.txt
---

# [ID] NPWP

This method helps you to extract text in NPWP image.

# 🎈Endpoint

| Method   | Endpoint                            |
| :------- | :---------------------------------- |
| **POST** | <https://api.verihubs.com/ocr/npwp> |

# 🎈Request

## Headers

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Key
      </th>

      <th>
        Type
      </th>

      <th>
        Notes
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        App-ID
      </td>

      <td>
        String
      </td>

      <td>
        Required
      </td>

      <td>
        Application ID that generated from Application Menu in Verihubs Client Dashboard.\
        To hit in Testing and Live mode you need a Production Application ID.
      </td>
    </tr>

    <tr>
      <td>
        API-Key
      </td>

      <td>
        String
      </td>

      <td>
        Required
      </td>

      <td>
        API-Key that generated from Application Menu in Verihubs Client Dashboard that related to specific Application ID.
      </td>
    </tr>
  </tbody>
</Table>

You can generate your Application ID and API-Key in the [Application page in Verihubs Client Dashboard.](https://app.verihubs.com/cloud/application).

## Body Parameters

| Parameter | Type | Notes    | Default | Description                                                                     |
| :-------- | :--- | :------- | :------ | :------------------------------------------------------------------------------ |
| image     | file | Required | -       | - NPWP image file   - File Type JPEG, JPG, PNG and PDF    - Max File size: 5 MB |

# 🎈Responses

## Response Code

| Code      | Description           |
| :-------- | :-------------------- |
| 200       | Successful Response   |
| 422 / 400 | Bad Request           |
| 401       | Unauthorized          |
| 500       | Internal Server Error |

## Details for 200

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Key
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        message
      </td>

      <td>
        string
      </td>

      <td>
        Message that describe the overall response.
      </td>
    </tr>

    <tr>
      <td>
        data
      </td>

      <td>
        object
      </td>

      <td>
        Shows the extraction result
      </td>
    </tr>

    <tr>
      <td>
        id
      </td>

      <td>
        string
      </td>

      <td>
        Used as the identity of the extraction result.
      </td>
    </tr>

    <tr>
      <td>
        reference\_id
      </td>

      <td>
        string
      </td>

      <td>
        The identity of the extraction result which want to be pulled
      </td>
    </tr>

    <tr>
      <td>
        address\
        full\_name\
        nik\
        npwp
      </td>

      <td>
        string
      </td>

      <td>
        Describes the detail extracted from NPWP
      </td>
    </tr>
  </tbody>
</Table>

## Error Code

| Response Code | Errror code | Error Message                                         | Description                                                                                                            |
| :------------ | :---------- | :---------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- |
| 200           | OCR\_200004 | NPWP not detected                                     | There is no npwp detected in the inputted file.                                                                        |
| 422           | OCR\_40001  | There's a problem with your JSON payload              | no value in payload / incorrect payload / missing payload image / invalid image extension / image size exceeds maximum |
| 400           | OCR\_40004  | You don't have enough quota, please contact our admin | Insufficient quota (applicable in testing mode only)                                                                   |
| 500           | OCR\_50000  | There's a problem from our system.                    | Internal server error                                                                                                  |

## Sample Responses

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Response Code
      </th>

      <th>
        Response
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        200
      </td>

      <td>
        {`{`}
            "message": "Success Extract Data",
            "data": {`{`}
            "id": "fe83d593-8715-4394-84a5-8e22db96bdb7",
            "reference_id": "e89f96a3-f9b9-4984-ad78-f574b8e7f376",
                "result_data": {`{`}
                "npwp": "14.235.842.2-201.000",
                "name": "MUHAMMADIN",
                "nik": "317305189293843",
                "address": "TAMAN RATU INDAH RT 002"
               {`}`}
             {`}`}
        {`}`}
      </td>

      <td>
        Request data parameter is valid.
      </td>
    </tr>

    <tr>
      <td>
        200
      </td>

      <td>
        {`{`}
            "message": "NPWP Not Detected",
            "error_code": "OCR_200004"
        {`}`}
      </td>

      <td>
        The image attached is not NPWP.
      </td>
    </tr>

    <tr>
      <td>
        400
      </td>

      <td>
        {`{`}
            "message": "There's a problem with your JSON payload",
            "error_code": "OCR_40001",
            "error_fields": 
        | :------- | :---------------------------------- |
        | **POST** | [https://api.verihubs.com/ocr/npwp](https://api.verihubs.com/ocr/npwp) |

        # 🎈Request

        ## Headers

        [block
        {`}`}
      </td>

      <td>
        Invalid Payload.
      </td>
    </tr>

    <tr>
      <td>
        401
      </td>

      <td>
        {`{`}
            "message": "Authorization failed"
        {`}`}
      </td>

      <td>
        Authorization Failed; Transaction that unauthorized due to Application ID or API-Key issue. To hit in Testing and Live mode you need a Production Application ID and API-Key.
      </td>
    </tr>

    <tr>
      <td>
        400
      </td>

      <td>
        {`{`}
            "message": "You don't have enough quota, please contact our admin",
            "error_code": "OCR_40004"
        {`}`}
      </td>

      <td>
        The transaction is in Testing mode and not enough remaining quota. Please contact Verihubs Customer Support.
      </td>
    </tr>

    <tr>
      <td>
        500
      </td>

      <td>
        {`{`}
            "message": "Internal server error"
             "error_code": "OCR_50000"
        {`}`}
      </td>

      <td>
        Internal server error.
      </td>
    </tr>
  </tbody>
</Table>