State
State List
Use this API to list all state based on a 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": "California"
}
],
"totalRecords": 1
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
| Field | Type | Description |
|---|---|---|
| stateList | array of objects | List of states with details. |
| stateId | integer | ID of the state. |
| name | string | Name of the state. |
| totalRecords | integer | Total number of records. |
| Code | Description |
|---|---|
| 1001 | "Missing countryId" |
| 1002 | "Invalid countryId" |
For general error details, click here.