Get the state details from ISO2 Code
GET https://api.countrystatecity.in/v1/countries/[ciso]/states/[siso]
Security
This api use API KEY as an authentication method.
- Name: X-CSCAPI-KEY
- In: header
Request Parameters
Name | Located in | Description | Required | Type |
---|---|---|---|---|
ciso | URL | ISO2 Code of Country | Required | string |
siso | URL | ISO2 Code of State | Required | string |
Response
Code | Description |
---|---|
200 | Return a details of state |
401 | Unauthorized. |
404 | Not Found. |
Example Success Response
{
"id": "4008,",
"name": "Maharashtra,",
"country_id": "101,",
"country_code": "IN,",
"iso2": "MH"
}
Example Error Response
{
"error'": "Unauthorized. You shouldn't be here."
}
Example Not Found Response
{
"error'": "No State/Region found."
}