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.
Environment | Host URL |
---|---|
Test | https://test-api.sandbox.co.in/ |
Production | https://api.sandbox.co.in/ |
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
Parameters | Type | Description | Example |
---|---|---|---|
deductee_type | string | Type of Deductee Possible Values: Individual, HUF, Company, Firm, Trust | Individual |
is_pan_available | string | Is the PAN of the deductee available? Possible Values: Y , N | Y |
residential_status | string | Residential Status of the user Possible Values: Resident, Non Resident | Resident |
nature_of_payment | string | Type of the payment being made. Nature of Payments | Cargo Handling Services Inspection And Logistics Services |
credit_amount | num | Payment amount (in INR) | 250000 |
credit_date | string | Date of payment Format: DD/MM/YYYY | 20/02/2021 |
The guides will always contain a Sample CURL request that can be referred to when making the API calls.
curl --request POST \
--url https://api.sandbox.co.in/calculators/tds \
--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"
}
'
Updated 4 months ago