District Court State API
District Court State API provides the list of available District court states and their corresponding states names across different locations.
Request URL
GET
https://api.g99.co.in/api/v1/courtxdc/service/state
Sample Code
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.g99.co.in/api/v1/courtxdc/service/state',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.g99.co.in/api/v1/courtxdc/service/state"
payload = {}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.g99.co.in/api/v1/courtxdc/service/state");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
HTTP status code 200
| Key |
Type |
Description |
| stateId |
String |
The unique identification number for State. |
| stateName |
String |
Name of State. |
Sample Response
Sample response for valid document
[
{
"stateId": "1",
"stateName": "Delhi"
},
{
"stateId": "2",
"stateName": "Chenai"
}
]
Error Response
| Parameter |
Type |
Description |
| status |
Number |
Unique error codes for different errors. Always available. |
| message |
String |
Error message describing the error. Always Available. |
| error |
Boolean |
True / False for different errors. Always available. |
Error Codes
| HTTP Status |
Error Code |
Error Message |
| 503 |
503 |
Document processing service is currently unavailable. Please try again later. |
Sample Error Response
{
"message": "Document processing service is currently unavailable. Please try again later.",
"status": 503,
"error": True
}