getCountryRegions
get
/ccstore/v1/countries/{id}
Get Country Regions. Get Country and all its regions. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The ID of the country.
Header Parameters
-
X-CCAsset-Language(optional): string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getCountryRegions_response
Type:
Show Source
object
-
displayName(optional):
string
Localized country name
-
regions(optional):
array regions
The list of regions for particular country.
-
repositoryId(optional):
string
The repository ID of the country item.
Nested Schema : items
Type:
Show Source
object
-
abbreviation(optional):
string
The region code in abbreviated form. Usually a 2 letter country code
-
displayName(optional):
string
Localized region name.
-
regionCode(optional):
string
The region code (normally its ISO 3166-2 code).
-
repositoryId(optional):
string
The ID of the region item.
Example Response (application/json)
{
"regions":[
{
"regionCode":"US-AL",
"displayName":"Alabama",
"repositoryId":"US-AL",
"abbreviation":"AL"
},
{
"regionCode":"US-AK",
"displayName":"Alaska",
"repositoryId":"US-AK",
"abbreviation":"AK"
},
{
"regionCode":"US-AZ",
"displayName":"Arizona",
"repositoryId":"US-AZ",
"abbreviation":"AZ"
},
{
"regionCode":"US-AR",
"displayName":"Arkansas",
"repositoryId":"US-AR",
"abbreviation":"AR"
},
{
"regionCode":"US-CA",
"displayName":"California",
"repositoryId":"US-CA",
"abbreviation":"CA"
},
{
"regionCode":"US-CO",
"displayName":"Colorado",
"repositoryId":"US-CO",
"abbreviation":"CO"
},
{
"regionCode":"US-CT",
"displayName":"Connecticut",
"repositoryId":"US-CT",
"abbreviation":"CT"
},
{
"regionCode":"US-DE",
"displayName":"Delaware",
"repositoryId":"US-DE",
"abbreviation":"DE"
},
{
"regionCode":"US-DC",
"displayName":"District of Columbia",
"repositoryId":"US-DC",
"abbreviation":"DC"
},
{
"regionCode":"US-FL",
"displayName":"Florida",
"repositoryId":"US-FL",
"abbreviation":"FL"
},
{
"regionCode":"US-GA",
"displayName":"Georgia",
"repositoryId":"US-GA",
"abbreviation":"GA"
},
{
"regionCode":"US-GU",
"displayName":"Guam",
"repositoryId":"US-GU",
"abbreviation":"GU"
},
{
"regionCode":"US-HI",
"displayName":"Hawaii",
"repositoryId":"US-HI",
"abbreviation":"HI"
}
],
"countryCode":"US",
"displayName":"United States",
"repositoryId":"US"
}
Default Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code