Search GSTIN By Company Name API

FETCH GSTIN NUMBERS FOR A PROVIDED LEGAL ENTITY NAME

Description

This API can be used for a reverse lookup of GSTIN number for a given company name. Since GSTIN numbers and PAN numbers are connected, this API also provides a medium for reverse lookup of PAN Numbers for a given entity name.

API Details

Request

TypeURLMin VersionMax Version
POSThttps://api.attestr.com/api/{version}/public/corpx/gstin/searchv1

Request Body Parameters

TypeNameDescriptionOptional (default)Min VersionMax Version
StringlegalNameInput legal entity name to be searched. Max acceptable length is 200 characters.Requiredv1

Although the legal name field allows for partial names, it is best to provide the full name of the legal entity in order to get the best results. As the parameter name also implies, this API searches against the entity's legal name rather than its trade names. Therefore, it is best to avoid searching by trade name as it may not produce relevant results.

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

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

Sample Request

JSON
Copy

Response

HTTP status code 200

Please note that the valid key decides the availability of rest of the keys in the response. If provided PAN is either invalid or not matching records are found, all keys except valid and message are omitted. If true, remaining keys will have appropriate data.

KeyDescriptionTypeMin VersionMax Version
validTrue if the provided legal name is valid and matching GSTIN records exist, else returns false.Booleanv1
messageMessage if no matching records are found, else null.Stringv1
recordsArray of GSTIN Search Record Object. Refer to the definition below.Arrayv1

The API returns a maximum of 100 matching records. Names that match more than 100 GSTIN numbers will return only first 100 matching records found in no specific order.

GSTIN Search Record Object

KeyDescriptionTypeMin VersionMax Version
statusStatus of GST registration, Active, Cancelled etc.Stringv1
activeTrue | false implying if the registration status is activeBooleanv1
legalNameName of entity as registered in GST databaseStringv1
tradeNameBusiness / trade name as registered in GST databaseStringv1
panPAN number as extracted from GSTIN.Stringv1
constitutionConstitution type such as private limited, proprietorship etc.Stringv1
typeRegular etc.Stringv1
registeredDate of GSTIN registration DD-MM-YYYYDatev1
primaryAddressPrimary registered address of the company. Refer to GST Address Object definition below.Objectv1

GST Address Object

KeyDescriptionTypeMin VersionMax Version
typeType of addressAddressTypeEnumv1
buildingBuilding, house, plot numberStringv1
buildingNameName of the premisesStringv1
floorFloor number in the buildingStringv1
streetName of the streetStringv1
localityLocal area nameStringv1
districtDistrict nameStringv1
stateState nameStringv1
cityCity nameStringv1
zipPincode of the locationStringv1
latitudeLatitude of the locationStringv1
longitudeLongitude of the locationStringv1
natureBusiness purpose for which this address is usedStringv1

AddressTypeEnum

Enum ValuesDescription
PRIMARYAddress is registered as primary registered address
ADDITIONALAddress is registered as secondary / other addresses of business

Sample Response

Sample response for valid output

JSON
Copy

Sample response for invalid legal name / No matching records

JSON
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed

Sample Error Response

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard