GET api/Admin/CountryState/GetForCountry?country={country}

Allows getting a list of states/provinces associated to a country

Request Information

URI Parameters

NameDescriptionTypeAdditional information
country

The name of the country

string

Required

Body Parameters

None.

Response Information

Resource Description

A list of records matching the country passed in

Collection of CountryStateViewModel
NameDescriptionTypeAdditional information
State

The full name of the State

string

None.

Abbreviation

An abbreviation of the State's name

string

None.

SavedValue

The abbreviated version of the State's name which we should use to save to DB

string

None.

Country

The country with which the State is associated

string

None.

Response Formats

application/xml, text/xml

Sample:
<ListOfCountryStateViewModel>
  <CountryStateViewModel>
    <State>sample string 1</State>
    <Abbreviation>sample string 2</Abbreviation>
    <SavedValue>sample string 3</SavedValue>
    <Country>sample string 4</Country>
  </CountryStateViewModel>
  <CountryStateViewModel>
    <State>sample string 1</State>
    <Abbreviation>sample string 2</Abbreviation>
    <SavedValue>sample string 3</SavedValue>
    <Country>sample string 4</Country>
  </CountryStateViewModel>
</ListOfCountryStateViewModel>

application/json, text/json

Sample:
[
  {
    "State": "sample string 1",
    "Abbreviation": "sample string 2",
    "SavedValue": "sample string 3",
    "Country": "sample string 4"
  },
  {
    "State": "sample string 1",
    "Abbreviation": "sample string 2",
    "SavedValue": "sample string 3",
    "Country": "sample string 4"
  }
]