GET api/Lookups/CountriesAndStates

Returns a list of countries and their associated states

Request Information

URI Parameters

None.

Body Parameters

None.

Response Information

Resource Description

Collection of CountryModel
NameDescriptionTypeAdditional information
Abbv

Country Abbv

string

None.

Name

Country Name

string

None.

States

List of states/provinces in the country

Collection of StateModel

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Abbv": "sample string 1",
    "Name": "sample string 2",
    "States": [
      {
        "Abbv": "sample string 1",
        "Name": "sample string 2",
        "Country": "sample string 3"
      },
      {
        "Abbv": "sample string 1",
        "Name": "sample string 2",
        "Country": "sample string 3"
      }
    ]
  },
  {
    "Abbv": "sample string 1",
    "Name": "sample string 2",
    "States": [
      {
        "Abbv": "sample string 1",
        "Name": "sample string 2",
        "Country": "sample string 3"
      },
      {
        "Abbv": "sample string 1",
        "Name": "sample string 2",
        "Country": "sample string 3"
      }
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfCountryModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models">
  <CountryModel>
    <Abbv>sample string 1</Abbv>
    <Name>sample string 2</Name>
    <States>
      <StateModel>
        <Abbv>sample string 1</Abbv>
        <Country>sample string 3</Country>
        <Name>sample string 2</Name>
      </StateModel>
      <StateModel>
        <Abbv>sample string 1</Abbv>
        <Country>sample string 3</Country>
        <Name>sample string 2</Name>
      </StateModel>
    </States>
  </CountryModel>
  <CountryModel>
    <Abbv>sample string 1</Abbv>
    <Name>sample string 2</Name>
    <States>
      <StateModel>
        <Abbv>sample string 1</Abbv>
        <Country>sample string 3</Country>
        <Name>sample string 2</Name>
      </StateModel>
      <StateModel>
        <Abbv>sample string 1</Abbv>
        <Country>sample string 3</Country>
        <Name>sample string 2</Name>
      </StateModel>
    </States>
  </CountryModel>
</ArrayOfCountryModel>