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
-
Type:
string
Required:true
The ID of the country.
Header Parameters
- X-CCAsset-Language
-
Type:
string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getCountryRegions_response
- countryCode
-
Type:
string
ISO 3166-1 two letter country code. - displayName
-
Type:
string
Localized country name. - regions
-
Type:
array
regionsAdditional Properties Allowed:The list of regions for particular country. - repositoryId
-
Type:
string
The ID of the country item.
Nested Schema : regions
Nested Schema : items
Type:
object
- abbreviation
-
Type:
string
The region code in abbreviated form. Usually a 2 character ISO code - displayName
-
Type:
string
Localized region name. - regionCode
-
Type:
string
The region code (4 character ISO code). - repositoryId
-
Type:
string
The ID of the region item.
Example 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
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "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" }