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

  • 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.

  • Scan Supported Forms:

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

  • Add New Form:

    In this endpoint, the user add new forms to support it in the scan document endpoint.

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

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

  • 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 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.

 

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

  • 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”.

 

Postman Screenshot

Case 1:

Document Reader Fetch Callback Json Endpoint

Case 2:

Document Reader Fetch Callback Json Endpoint

Case 3:
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

 

Scan Supported Forms

API URL: https://apis.docreader.winsurtech.com/v1/scan-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

 

 

Add New Form

API URL: https://apis.docreader.winsurtech.com/v1/add-new-form

Method Type: POST

Description

This endpoint is used to add new forms to support it in the scan document endpoint. The user will upload the form pdf in the body parameter and then click on send, and the form will be added.

Key (Body Parameter)

Value

Is Mandatory

Default Value

Description

input_file

File

Yes

null

Upload the PDF file

 

Postman Screenshot

Documnet Reader Add New Form Endpoint

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. Scan Supported Forms
    7. Add New Form