GET api/states?country={country}

Get all states, or filter by country

Request Information

URI Parameters

NameDescriptionTypeAdditional information
country

string

Default value is

Body Parameters

None.

Response Information

Resource Description

Collection of StateViewModel
NameDescriptionTypeAdditional information
Code

State Code(two upper case letters)

string

None.

CountryCode3

Country code (Three upper case letters)

string

None.

Name

State Name

string

None.

IsMilitary

If this is a military(armed forces) state

boolean

None.

IsTerritory

If this is a territory(Puerto Rico, GUAM, US Virgin Islands...) state

boolean

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "code": "sample string 1",
    "countryCode3": "sample string 2",
    "name": "sample string 3",
    "isMilitary": true,
    "isTerritory": true
  },
  {
    "code": "sample string 1",
    "countryCode3": "sample string 2",
    "name": "sample string 3",
    "isMilitary": true,
    "isTerritory": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfStateViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels">
  <StateViewModel>
    <Code>sample string 1</Code>
    <CountryCode3>sample string 2</CountryCode3>
    <IsMilitary>true</IsMilitary>
    <IsTerritory>true</IsTerritory>
    <Name>sample string 3</Name>
  </StateViewModel>
  <StateViewModel>
    <Code>sample string 1</Code>
    <CountryCode3>sample string 2</CountryCode3>
    <IsMilitary>true</IsMilitary>
    <IsTerritory>true</IsTerritory>
    <Name>sample string 3</Name>
  </StateViewModel>
</ArrayOfStateViewModel>