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:
stringRequired:trueThe ID of the country.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe 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:
stringISO 3166-1 two letter country code. - displayName
-
Type:
stringLocalized country name. - regions
-
Type:
arrayregionsAdditional Properties Allowed:The list of regions for particular country. - repositoryId
-
Type:
stringThe ID of the country item.
Nested Schema : regions
Nested Schema : items
Type:
object- abbreviation
-
Type:
stringThe region code in abbreviated form. Usually a 2 character ISO code - displayName
-
Type:
stringLocalized region name. - regionCode
-
Type:
stringThe region code (4 character ISO code). - repositoryId
-
Type:
stringThe 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:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe 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"
}