GST CERTIFICATE OCR API

AI Tools

EXTRACT TEXT FROM GST CERTIFICATE IMAGES


Description

This API can extract and parse the text from an input GST certificate document image and return the information in JSON format. This API can parse both provisional and registered GST certificates.


API Outcome

  • GSTIN Number

  • Legal and trade name of individual / entity

  • Date of registration

  • PAN, TIN and Central sales tax registration number if available

  • Type of registration

  • Address as registered

The legacy data processing model is being formally deprecated.

In order to ensure continued compliance with the Digital Personal Data Protection Act, 2023 (DPDP Act), we are implementing DPDP V3 (Consent-Driven Processing). Under this framework, clients are required to obtain explicit, informed, and verifiable consent from the data principal prior to accessing, processing, viewing, or storing any personal data through the platform. This regulatory transition may require modifications to existing configurations and workflows. Clients are advised to review and update their implementations to ensure ongoing compliance with applicable data protection obligations. Further information regarding this transition can be enquired here. Learn more about this change here.

API Details

Request

Type

URL

Post

https://api.attestr.com/api/{version}/public/xtract

Request Body Parameters

Type

Name

Description

Optional (Default)

Min Version

Max Version

String

src

Input GST certificate image media Id. To generate a media Id, refer to Image Media Upload

Required

v1


String

additional

Document back side image media Id.

Optional

v1


String

type

Pass constant value as GST

Required

v1


Request Header Parameters

Type

Name

Value / Description

Optional (Default)

Min Version

Max Version

String

Content-Type

application/json

Required

v1


String

Authorization

Basic {authToken}

Required

v1


Info

If you do not have the authentication token, please refer to Register App to generate one.

Sample Request

{ "src":"MX1AloEdDOB7Xgc00d", "additional": null, "type": "GST" }

Response

Http Status Code 200

Info

Please note that the valid key decides the availability of rest of the keys in the response. If provided PAN image is invalid or low quality, then all keys except valid and message are omitted. If true, remaining keys will have appropriate data.

Key

Description

Type

Min Version

Max Version

valid

True | false if the provided GST certificate image is a valid readable document with decent quality

Boolean

v1


data

GST Object as described below

Object

v1


message

Message string if the input media image is invalid or of not enough good quality to be read by OCR algorithm

String

v1


GST Object

Key

Description

Type

Min Version

Max Version

gstin

GSTIN number as present on the card

String

v1


legalName

Legal entity name as registered.

String

v1


tradeName

Trade / business name if available.

String

v1


constitution

Constitution of the entity such as private limited, proprietorship etc.

Date

v1


address

Primary address of the entity

Date

v1


type

Registration type eg Regular, composition etc.

String

v1


registered

Date of registration DD/MM/YYYY

Date

v1


expiry

Date of expiry if available DD/MM/YYYY

Date

v1


issued

Date of issue of the certificate DD/MM/YYYY

Date

v1


approvingAuthority

Approving authority

String

v1


jurisdiction

Jurisdiction code of the GST office when entity is registered

String

v1


provisional

Boolean flag indicating if the certificate registration is provisional or permanent.

Boolean

v1


pan

PAN number of the entity. Available for provisional certificate only.

String

v1


tin

TIN (Tax information network) Id. Available for provisional certificate only.

String

v1


slr

Central sales tax registration number. Available for provisional certificate only.

String

v1


Sample Response

Sample response for valid registered GST certificate

{ "valid": true, "message": null, "data":{ "gstin": "24ABCD1234R1ZN", "legalName": "ACME INFO PRIVATE LIMITED", "tradeName": "ACME INFO PRIVATE LIMITED", "constitution": "Private Limited Company", "address": "10th Floor, 1006, Road, Ahmedabad, B Square-1, Gujarat, Near Neptune House, 380058 Ambli Brts,", "type": "Regular", "registered": "30/03/2021", "expiry": null, "issued": "30/03/2021", "approvingAuthority": "Gujarat", "jurisdiction": "Ghatak 11 (Ahmedabad)", "provisional": false, "pan": null, "tin": null, "slr": null } }

Sample response for a valid provisional GST certificate

{ "valid": true, "message": null, "data": { "gstin": "27AABCD1168D1ZM", "legalName": "ACME INFO TRUST MAHARASHTRA", "tradeName": "ACME INFO TRUST MAH.", "constitution": null, "address": null, "type": null, "registered": null, "expiry": null, "issued": null, "approvingAuthority": null, "jurisdiction": null, "provisional": true, "pan": "ABCDS1168D", "tin": "275xxxxxx016v", "slr": "275xxxxxxx16c" } }

Sample response for invalid document image

{ "valid": false, "message": "Invalid / low quality image" }

Error Response

Parameter

Type

Description

code

Number

Unique error codes for different errors. Always available.

message

String

Error message describing the error. Always Available.

details

String

Detail error message. Available only for certain types of errors.

Error Codes

HTTP Status

Error Code

Error Message

400

4001

Malformed data or missing required parameter values

400

4005

Operation could not be performed due to low credits balance

401

4016

Invalid client authorization

403

4031

Unauthorized access

403

4035

Requested service is not provisioned for your account

403

4039

Client's IP address is not whitelisted

403

4035

Requested service is not provisioned for your account

429

4291

Maximum account rate limit exceeded

429

4292

Maximum API rate limit exceeded

429

4293

Maximum account daily limit exceeded

429

4294

Maximum API daily limit exceeded

500

5001

Request could not be processed

Sample Error Response

{ "code": 4001, "message": "Malformed data or missing required parameter values" }

Constraints

  • Only JPEG, PNG images are supported.

  • Minimum image size is 200x200 png for better identification and parsing.

  • Maximum allowed image size is 10 MB.


  Last updated