getShippingRegionsByCountry
get
/ccstore/v1/shippingRegions
Get Shipping Regions By Country. Lists all the shipping regions for the given countryID. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Query Parameters
- country
-
Type:
string
Required:true
CountryCode of the country to retrieve regions.- sortByCode
Type:boolean
Code specifying regions to sort either by ISO code or displayName
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 : getShippingRegionsByCountry_response
- items
-
Type:
array
itemsAdditional Properties Allowed:The list of all shipping regions.
Nested Schema : items
Nested Schema : items
Type:
object
- abbreviation
-
Type:
string
The region code. - displayName
-
Type:
string
Localized region name. - regionCode
-
Type:
string
The country-region code (normally its ISO 3166-2 code). - repositoryId
-
Type:
string
The ID of the region item.
Example application/json
{
"items":[
{
"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-WI",
"displayName":"Wisconsin",
"repositoryId":"US-WI",
"abbreviation":"WI"
},
{
"regionCode":"US-WY",
"displayName":"Wyoming",
"repositoryId":"US-WY",
"abbreviation":"WY"
}
]
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|8001|If error occurs when retrieving shipping regions for the country.|
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:
{"items": [ { "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-WI", "displayName": "Wisconsin", "repositoryId": "US-WI", "abbreviation": "WI" }, { "regionCode": "US-WY", "displayName": "Wyoming", "repositoryId": "US-WY", "abbreviation": "WY" } ]}