State List
Use this API to get all state based on country
HTTP REQUEST
GET /state/state-list
QUERY STRING PARAMETERS
| Field | Type | Description |
|---|---|---|
| countryId required |
integer | Country ID |
| q | string | Search by state name |
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"stateList": [
{
"stateId": 42,
"name": "Badakhshan"
}
],
"totalRecords": 1
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
| Field | Type | Description |
| stateId | integer | State ID |
| name | string | State Name |
| totalRecords | integer | count of records returned |
| Code | Description |
| 1001 | ‘Missing countryId’ |
| 1002 | ‘Invalid countryId’ |
For general error details, click here.