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: string
CountryCode of the country to retrieve regions.
-
sortByCode(optional): boolean
Code specifying regions to sort either by ISO code or displayName
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 : getShippingRegionsByCountry_response
Type:
Show Source
object
-
items(optional):
array items
The list of all shipping regions.
Nested Schema : items
Type:
Show Source
object
-
abbreviation(optional):
string
The region code.
-
displayName(optional):
string
Localized region name.
-
regionCode(optional):
string
The country-region code (normally its ISO 3166-2 code).
-
repositoryId(optional):
string
The ID of the region item.
Example Response (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.|
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