WinsurTech Document Reader  

API Base URL: https://apis.docreader.winsurtech.com

API Site URL: https://docreader.winsurtech.com

Terms and Conditions: https://winsurtech.com/terms-and-conditions

SLA: https://winsurtech.com/winsurtech-rest-apis-service-level-agreement

Overview:

Winsurtech Document Reader API enables the user with the following:

WinsurTech Document Reader API Endpoints are-

  • Login:

    This endpoint generates the ‘access-token’ after the user login with their Winsurtech Document Reader credentials in the login endpoint. An access token is used to get access to other endpoints and it is valid for 30 minutes.

  • Scan Document:

    This endpoint reads the data of the flattened pdfs and images in the background and POSTS the JSON response to the CALLBACK URL that a user provides of their application.

  • Fetch Callback Output:

    In this endpoint, the user checks the status and fetches the output of the scanned document.

  • Get Custom Mapping Keys:

    In this endpoint, the user gets the custom mapping keys.

  • Get Custom Mapping Detail:

    In this endpoint, the user gets information about the keys that the user will get from the custom mapping key endpoint.

  • Update Custom Mapping Detail:

    In this endpoint, the user updates the custom keys.

  • Generate Custom Mapping Template:

    In this endpoint, the user generates a custom mapping template from a form.

  • Add Custom Mapping Detail:

    In this endpoint, the user adds generated custom mapping template, and the custom mapping key gets added for that form.

  • Get Supported Forms:

    In this endpoint, the user gets a list of forms currently being supported.

  • Get Quota Summary:

    In this endpoint, the user gets sum of quota used for each endpoint between start time and end time.

  • Scan Bill:

    This API endpoint is designed to extract data from Invoices, Sales Orders, and Purchase Order PDFs and provide it to you in an easy-to-use JSON format.

  • Scan Layout:

    This API endpoint can take your input file, extract structured data such as tables, paragraphs, headers, footers, titles, and more, and deliver it to you in a user-friendly JSON format.

  • Scan IRS Forms:

    This API endpoint is designed to extract data from IRS Forms and provide it to you in an easy-to-use JSON format.

  • Scan Policy:

    This API endpoint is designed to help you extract data from insurance documents and conveniently receive it in JSON format.

  • Scan Envelopes:

    This API endpoint is designed to help you extract envelope data from documents and images in the background and output a JSON response.

How to download postman collection

How to Download Postman Collection


  • Import this collection to Postman.

 

WinsurTech Document Reader API Endpoints Detailed Information

Login

API URL: https://apis.docreader.winsurtech.com/v1/login

Method Type: POST

Description

This API endpoint is used to get an access token with the user's credentials of Winsurtech Document Reader. The access_token gets auto-filled when we login and it is valid for 30 minutes, access_token gives the user an authorization to use other endpoints as it gets passed in different APIs header. After the token gets expires the user can make another call to get a new access_token.

Input Parameters:

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

username

Text

Yes

null

The email address of your account

password

Text

Yes

null

The password of your account

 

Postman Screenshot

Document Reader login endpoint


 

Scan Document

API URL: https://apis.docreader.winsurtech.com/v1/scan

Method Type: POST

Description

Use this endpoint for read only forms that have lost their eLabels and also for images. This endpoint reads the data of the input_file in the background and POSTS the JSON response to the CALLBACK URL that a user provides of their application. Your application can receive the output JSON and store the extracted data in your database or other storage. Initially on calling /scan endpoint in the response you will get the status, transaction id, message, input file name, and file size. After the files are processed in a few seconds the output is posted to CALLBACK URL.

Input Parameters:

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the file

callback_url

Text

Yes

null

Enter the callback url

custom_mapping_key

Text

No

null

Enter your custom key

omit_blank_values

Text

No

true

Enter true or false

save_output_temporarily

Text

No

true

Enter true or false

accuracy

Text

No

low

Enter low or high

  • In input_file: Users can upload the .pdf, .jpg, .jpeg, and .zip files.

  • In custom_mapping_key: Enter your custom mapping key to return custom elabels in the output that you mapped before for the form.

  • In callback_url: Enter the callback URL where the users are looking forward to storing the response.

  • In omit_blank_values: Enter the value as true if you want to omit the blank values from the output else enter false. The default value is assumed to be true.

  • In save_output_temporarily: Enter the value as true, if you want the output file to be saved for 2 hours at WinsurTech, so that you could call the FETCH CALLBACK Output endpoint to fetch the output later on as well based on the transaction id, else enter false if you don't want to save the output and just want it posted once to your CALLBACK URL. The default value is assumed to be true.

  • In accuracy: Enter high to prioritize accuracy, leading to longer processing time for output. Default is low for faster but potentially less accurate output.

 

Postman Screenshot

Document Reader Scan Document Endpoint


Sample Output

 

 

Fetch Callback Output

API URL: https://apis.docreader.winsurtech.com/v1/fetch-callback-output

Method Type: GET

Description

This endpoint is used to fetch the output of the scanned document based on the transaction id. The user can check the status of the /scan request. If the request is still queued, the JSON response will show queued or waiting, else if the request is in progress then the JSON response will show the output as under processing, and if the request is processed successfully then the endpoint returns the output status as successful and if the user wants to have the partial output then they can keep the value of get_partial_output as true and output is returned in compressed format.

Input Parameters:

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

transaction_id

Text

Yes

null

Enter the transaction id

get_partial_output

Text

No

False

Enter true or false

output_type

Text

No

null

Enter the output type

  • In transaction_id: Enter the /scan call’s transaction_id.

  • In get_partial_output: If the user wants to get partial output then they should keep the value as true otherwise false. The default value is assumed to be false.

  • In case of true: If save_output_temporarily is entered as true, you will get output in Fetch Callback Output and can save the file.

  • In case of false: If save_output_temporarily is entered as false then in Fetch Callback Output you will get the status as “successful“ and a message in transaction status will display as “Output not saved on our platform, it is sent to callback URL”.

  • Output type: If the user wants the output in JSON format, they should fill the 'output_type' parameter with the value "json". If the 'output_type' parameter is empty, the output will be in a zipped file format.

 

Postman Screenshot

Case 1:

Document Reader Fetch Callback Json Endpoint

Case 2:

Document Reader Fetch Callback Json Endpoint

Case 3:
(i) When output_type is json
Document Reader Fetch Callback Json Endpoint
  • In postman, save this response by clicking on Save Response Save to a file.

  • The output will be in a JSON format.

(ii) When output_type is empty
Document Reader Fetch Callback Json Endpoint


  • In postman, save this response by clicking on Save Response Save to a file.

  • The output will be in a compressed format, and users are required to save it to their disk with a filename having a .zip extension and later on decompress the file.

 

Get Custom Mapping Keys

API URL: https://apis.docreader.winsurtech.com/v1/get-custom-mapping-keys

Method Type: GET

Description

This endpoint is used to get custom mapping keys. Click on the send button and user will get custom mapping keys with their form name.

Postman Screenshot

Document Reader Get Custom Mapping Keys Endpoint

 

Get Custom Mapping Detail

API URL: https://apis.docreader.winsurtech.com/v1/get-custom-mapping-detail

Method Type: GET

Description

This endpoint is used to get information about the keys that user will get in get custom mapping keys endpoint. User just needs to copy a key from the response of get custom mapping keys endpoint and paste it in parameters as value of custom_mapping_key and click on send. In response user will get all information about original or replaced keys and values for a particular document.

Postman Screenshot

Document Reader Get Custom Mapping Details Endpoint

Sample Output

 

 

Update Custom Mapping Detail

API URL: https://apis.docreader.winsurtech.com/v1/update-custom-mapping-detail

Method Type: PUT

Description

This endpoint is used when user need to update the custom mapping then he simply just copy the value of original key or value from the response of get custom mapping detail endpoint and paste it in original key or value of body parameter of update custom mapping details endpoint and in custom key or value, user can write the custom names that they want to change. If the user only wants to change custom keys then he can send an empty list in custom_values and vice versa in case of custom_keys. The user can send multiple original and custom values in a list as dictionaries separated by commas. The user just needs to copy a key from the response of get custom mapping keys endpoint and paste it in body as value of custom_mapping_key and click on send.

Input Parameters:

 

 

Postman Screenshot

Document Reader Update Custom Mapping Detail Endpoint

 

Generate Custom Mapping Template

API URL: https://apis.docreader.winsurtech.com/v1/generate-custom-mapping-template

Method Type: POST

Description

This endpoint is used to generate a custom mapping template from a form. Users can upload a form in the body parameter and click on send.

Input Parameters:

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the PDF file

 

Postman Screenshot

Document Reader Generate Custom Mapping Template Endpoint

Sample Output

 

 

Add Custom Mapping Detail

API URL: https://apis.docreader.winsurtech.com/v1/add-custom-mapping-detail

Method Type: POST

Description

This endpoint is used to create a custom mapping through a template that we get in response from generate custom mapping template endpoint. Users just need to copy the template from generate custom mapping template endpoint and paste it into the body parameter of add custom mapping detail endpoint. After pasting the template the user can add custom keys or values if they want to customize the elabels. Then click on send, and the custom mapping key will be added.

Input Parameters:

 

 

Postman Screenshot

Document Reader Generate Custom Mapping Template Endpoint

 

Get Supported Forms

API URL: https://apis.docreader.winsurtech.com/v1/get-supported-forms

Method Type: GET

Description

This endpoint is used to get a list of forms currently being supported. Users just need to click on send.

 

Postman Screenshot

Document Reader Get Supported Form List for Scan Endpoint

Sample Output

 

 

Get Quota Summary

API URL: https://apis.docreader.winsurtech.com/v1/get-quota-summary

Method Type: GET

Description

This endpoint is used to fetch the details of quota which are used within a particular time frame. The endpoint takes the start_date_time and end_date_time and provide the details of remaining quota, expiration date and quota deducted from each endpoint.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

start_date_time

DateTime

No

null

Enter the Date and time

end_date_time

DateTime

No

null

Enter the Date and time

 

Postman Screenshot

Documnet Reader Add New Form Endpoint

Sample Output

 

 

Scan Bill

API URL: https://apis.docreader.winsurtech.com/v1/scan-bill

Method Type: POST

Description

The scan-bill endpoint is designed for extracting data from various types of documents including Invoices (Policy Invoices, General Invoices, etc.), Sales Orders, Purchase Orders and Finance Agreements. This endpoint takes an input_file as its input and provides detailed document information in JSON format as output.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the file

model

Text

No

null

Enter the model

omit_blank_values

Text

No

true

Enter true or false

  • In input_file: Users can upload the PDF file.

  • In model: By default, the system will detect the model using AI. However, if users wish to specify the model, they can enter the following keywords for processing documents: 'invoice' for Invoice Documents, 'sales' for Sales Order Documents, 'purchase' for Purchase Order Documents, 'policyinvoice' for Policy Invoice Documents, and 'finance' for Finance Agreement processing.

  • In omit_blank_values: Enter the value as true if you want to omit the blank values from the output else enter false. The default value is assumed to be true.

 

Postman Screenshot

Documnet Reader Scan Bill Endpoint

Sample Output

 

 

Scan Layout

API URL: https://apis.docreader.winsurtech.com/v1/scan-layout

Method Type: POST

Description

The scan-layout endpoint analyzes input documents, extracting structured elements such as tables, paragraphs, headers, footers, and more, delivering the content's layout in a convenient JSON format.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the file

  • In input_file: Users can upload the .pdf, .jpg, .jpeg, and .zip files.

 

Postman Screenshot

Documnet Reader Scan Lauout Endpoint

Sample Output

 

 

Scan IRS Forms

API URL: https://apis.docreader.winsurtech.com/v1/scan-IRSForm

Method Type: POST

Description

The scan-IRS form endpoint is designed for extracting data from W-2, W-2G, W-4, W-7, W-9, 4506-T, SS-4, W-8BEN, W-8ECI, 4868, W-3, 8822, W-11, W-10 Forms. This endpoint takes an input_file as its input and provides detailed document information in JSON format as output.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the file

omit_blank_values

Text

No

true

Enter true or false

  • In input_file: Users can upload the PDF file.

  • In omit_blank_values: Enter the value as true if you want to omit the blank values from the output else enter false. The default value is assumed to be true.

 

Postman Screenshot

Documnet Reader Scan Lauout Endpoint

Sample Output

 

 

Scan Policy

API URL: https://apis.docreader.winsurtech.com/v1/scan-policy

Method Type: POST

Description

The Scan-Policy endpoint specializes in extracting data from insurance documents like policy, quotes, binders, proposals, finance submission, and finance requests etc. It automatically detects the document and provides the output in JSON format accordingly.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the file

callback_url

Text

No

null

Enter the callback url

omit_blank_values

Text

No

false

Enter true or false

  • In input_file: Users can upload the PDF file.

  • In callback_url: Enter the callback URL where the users are looking forward to storing the response.

  • In omit_blank_values: Enter the value as true if you want to omit the blank values from the output else enter false. The default value is assumed to be false.

 

Postman Screenshot

Documnet Reader Scan Policy Endpoint

Sample Output

 

 

Scan Envelopes

API URL: https://apis.docreader.winsurtech.com/v1/scan-envelopes

Method Type: POST

Description

The scan-envelopes endpoint processes various envelope files. This endpoint accepts an input_file and provides detailed document information in JSON format as output.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the file

omit_blank_values

Text

No

false

Enter true or false

  • In input_file: Users can upload the .pdf, .jpg, .jpeg, and .zip files.

  • In omit_blank_values: Enter the value as true if you want to omit the blank values from the output else enter false. The default value is assumed to be false.

 

Postman Screenshot

Documnet Reader Scan Policy Endpoint

Sample Output

 

API Quota Consumption Information

  1. One quota deduction for the login API endpoint.
  2. After login, if you send 10 ACORD forms for conversion and assuming each contains 4 pages, then for 40 pages, 40 quotas will be deducted.
  3. One login remains valid for 30 minutes so you can send as many documents as you want programmatically through this login. If you re-login, like, the program runs again and needs to do a fresh login, another login quota will be deducted.
  4. If you send ACORD PDFs or Images that contain non-ACORD pages that are not supported by our API, we deduct 1 endpoint for 3 such pages in the form on average (we round up to the next integer for calculation). Like if you upload a document with 19 pages, out of which 5 pages are non-acord and 14 are ACORD, then we deduct 14 quotas for acord pages + 2 (ROUNDUP(5 divided by 3)) for non-acord pages.
  5. The output is automatically posted to your CALLBACK URL without consuming more quota. But if you explicitly call fetch-callback-json to retrieve the output, one quota for this call is deducted for ready output (when it returns .zip file) otherwise quota will not be deducted.
  6. One quota deduction for each of these endpoint calls:
    1. Get Custom Mapping Keys
    2. Get Custom Mapping Detail
    3. Update Custom Mapping Detail
    4. Generate Custom Mapping Template
    5. Add Custom Mapping Detail
    6. Get Supported Forms
  7. Quota deduction is based on the number of pages in the document (One quota deduction per page) in these endpoints:
    1. Scan Bill
    2. Scan Layout
    3. Scan IRS Forms
    4. Scan Policy
    5. Scan Envelopes