Request Structure

Understand Sandbox API Request structure

Host URL

The request URLs for Sandbox are as followed. Note that the data required for the test environment are available on the endpoint page.

Request Structure

All GET and DELETE request parameters are passed on as either path or query parameters.

Meanwhile, POST request accepts request body with Content-Type: application/JSON body. Sometimes, the body needs to be passed in a sheet structure format.

Note that request headers will always require x-api-key and access_token to call the APIs

Sandbox API Guides will show how to pass these parameters in a tabular format along with the description of the said parameter and the possible values that can be passed that best fits your use case. An example from TDS Calculator API can be seen below

deductee_typestringType of Deductee Possible Values:
Individual, HUF, Company,
Firm, Trust
is_pan_availablestringIs the PAN of the deductee available?
Possible Values: Y, N
residential_statusstringResidential Status of the user
Possible Values:
Resident, Non Resident
nature_of_paymentstringType of the payment being made. Nature of PaymentsCargo Handling Services Inspection And Logistics Services
credit_amountnumPayment amount (in INR)250000
credit_datestringDate of payment
Format: DD/MM/YYYY

The guides will always contain a Sample CURL request that can be referred to when making the API calls.

curl --request POST \
     --url \
     --header 'Accept: application/json' \
     --header 'Authorization: xxxxxxxx' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: xxxxxxxxxx' \
     --header 'x-api-version: 1.0' \
     --data '
     "deductee_type": "Individual",
     "is_pan_available": "Y",
     "residential_status": "Resident",
     "nature_of_payment": "Cargo Handling Services Inspection And Logistics Services",
     "credit_amount": 250000,
     "credit_date": "20/02/2021"