Professional Documents
Culture Documents
ITR API DIGIVERIFIER (No GUI) v3.0
ITR API DIGIVERIFIER (No GUI) v3.0
ITR API
Specification
Doc
(Confidential)
(ITRAPI:NoGUI)
Version Date Author Description
1.0 29-Oct-2019 Justin(digiverifier.com) Initialdraft
CONTENTS:
1. Obtain transactionid of user
1. Generate(POST)accesstoken
2. Generate(POST)transactionid
2. POST logininfo/credentials
3. GET report
METHODS:
Obtain transaction id of user
1.Generate accesstoken:
With provided “client_id” and“ client_secret”make a post request to generate
“access_token”.
Request :
Method https://api-oauth2.digiverifier.com/itr/generate-
post/
POST
import response
response=requests.post("https://api-oauth2.digiverifier.com/itr/generate-post/",headers={'Content-
Type':'application/json'}, json={'client_id':'af5cc093-26d6-424d-8825-
582e26e1a10','client_secret':'31VegAwO2iLr1wBeR72mTEvn'})
token=pd.read_json(response.text)
print(response.json())
>>>>>Access token is generated: c343b46e-94c1-41da4fd-154b16efba21
{'message': {'access_token': ' c343b46e-94c1-41da4fd-154b16efba21’,
'client_id': 'af5cc093-26d6-424d-8825-582e26ae1a10', 'client_name':
'justin', 'expires_in': 900, 'created_time': 1676871583}, 'code':
'success', 'success': True}
Success Code message
true Sucess {
'access_token': access_token ,
‘'client_id': client_id, 'expires_in':
SECONDS,
'created_time': TIME
}
false Internal_error Client id is not correct
false Internal_error Client id is not reqistered
false Internal_error
client id and client secret is not
provided
1.2) Generate transaction id:
We now use the generated“access_token”in the previou step as “Authorization”header.
Other than this header, there is no other post parameter. Make a get request
to generate thetransactionid.
Method https://api-oauth2.digiverifier.com/itr/transaction-get/
GET
Type Header Values
POST c343b46e-94c1-41d5-a4fd-154b16efba21 string
Statu Response
s
200 {
'message':
string,‘success
’:
Boolean,‘code’:
string
}
S
SAMPLE PYTHON CODE (GENERATE TRANSACTION ID):
response = requests.get("https://api-oauth2.digiverifier.com/itr/transaction-get/",
headers={'accept':'application/json','bearer':token['message'][0]})
tid=response.json()
>>>>>Transaction id is generated:
ITR173445462486011373287969304688869622404
{'message': 'ITR173445462486011373287969304688869622404', 'code':
'success', 'success': 'True'}
Response
2.POSTlogininfo/credentials :
Using credentials and login parameters from previous request,make a post
request to trigger report fetch a the API backend.
Method https://api-oauth2.digiverifier.com/itr/submit-
post/?txnid=<transactionid>
POST <transactionid>
3.GET report
It takes around 60 seconds to complete report generation at the backend after
previous step of submitting credentials. A simple get request along with access
token and transactionid information can be used to obtain the report. We can
obtain the report in either ‘json’ or ‘xml’ format by using two possible URL’s.See
python sample code below to obtain the report.
By default, the transactionid and json report associated with it expires in 20 minutes.
Method Get report in ‘json’ format:
http:/https://api-oauth2.digiverifier.com/itr/
report-get/?format=json&txnid=<txnid>
Or,to get the report in ‘xml’ format:
http://1http:/https://api-oauth2.digiverifier.com/itr/report-get/?
format=xml&txnid=<txnid>
GET
SAMPLE PYTHON CODE (GET REPORT IN JSON FORMAT):
respon=requests.get('https://api-oauth2.digiverifier.com/itr/report- get/?
txnid='+str(tid['message'])+'&format=json',
headers={'accept':'application/json','Bearer':token['message'][0]})
respon.text
SAMPLE PYTHON CODE (GET REPORT IN XML FORMAT):
responx=requests.get('https://api-oauth2.digiverifier.com/itr/report-get/?
txnid='+str(tid['message'])+'&format=xml',
headers={'accept':'application/json','Bearer':token['message'][0]})
responx.text
Response
{
"$": {
"ay":"",
"fy":""
},
"TDSs":[
{
"TDS":[
{
"$":{
"amount":"",
"date":"",
"deductor":"",
"section":"",
"tan":"",
"tds":""
}
},
]
}
]
}
]
}
}
true success_empty
l {"Form26ASInfo":
(Empty report but
Personal {"TDSDetails":[{}],
details "PersonalDetails":[{“$”:
obtained)
{"name":"Mr.ABC",
"address":"HOUSENO.1,STREEC,
KARNATAKA,5600XX","dob":"01/01/1990",
"email":"abc@gmail.com","mobile":
"8000000000","gender":"Female","pan":
"AZXXX4444J","panStatus":"Active",
"proxy_ip":"13.XXX.XXX.XX"}
}
]
}
}',
false invalid_usr_pwd Invalid username or password
Glossary
Conventions
Client-Client application.
Status-HTTP status code of response.
All response are in JSON format.
Status Codes
All status codes are standard HTTP status codes. The below ones are used in
this API.
2XX-Successofsomekind
4XX-Erroroccurredinclient’spart
5XX-Erroroccurredinserver’spart
SUMMARY: