State
State List
Use this API to get all state based on country.
GET /state/state-list
Query string parameters
Field | Type | Description |
---|---|---|
countryId required | integer | Country ID |
q | string | filter data by state name |
- Response
- Schema
- Error Codes
{
"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.