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
Nested Schema : items
Type: array
The list of all shipping regions.
Nested Schema : items
Type: object
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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"
  }
]}