GET api/v1/locations/countryStateList/{countryId}
This method Returns the list of list of states for a country Equivalent SOAP API : GetCountryStateList
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| countryId |
Location ID |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
CountryListResult
CountryStateListResult| Name | Description | Type | Additional information |
|---|---|---|---|
| CountryStateList | Collection of CountryStateInfo |
None. |
|
| ResultCode | integer |
None. |
|
| ResultData | string |
None. |
Response Formats
application/json, text/json
Sample:
{
"CountryStateList": [
{
"StateID": 1,
"StateName": "sample string 2"
},
{
"StateID": 1,
"StateName": "sample string 2"
}
],
"ResultCode": 1,
"ResultData": "sample string 2"
}
application/xml, text/xml
Sample:
<CountryStateListResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TC2API.Resource.Models.ResultData">
<ResultCode xmlns="http://schemas.datacontract.org/2004/07/TC2Utilities.RestApi">1</ResultCode>
<ResultData xmlns="http://schemas.datacontract.org/2004/07/TC2Utilities.RestApi">sample string 2</ResultData>
<CountryStateList xmlns:d2p1="http://schemas.datacontract.org/2004/07/TC2Domain">
<d2p1:CountryStateInfo>
<d2p1:StateID>1</d2p1:StateID>
<d2p1:StateName>sample string 2</d2p1:StateName>
</d2p1:CountryStateInfo>
<d2p1:CountryStateInfo>
<d2p1:StateID>1</d2p1:StateID>
<d2p1:StateName>sample string 2</d2p1:StateName>
</d2p1:CountryStateInfo>
</CountryStateList>
</CountryStateListResult>