listLocales

get

/ccadmin/v1/locales

List Locales. Get the list of locales including the default locale.

Request

There are no request parameters for this operation.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listLocales_response
Nested Schema : defaultLocale
Type: object
The defalut locale object.
Nested Schema : items
Type: array
The list of valid locales from the server.
Nested Schema : items
Type: object
Example application/json

{
    "defaultLocale":{
        "displayName":"English (United States)",
        "name":"en",
        "repositoryId":"1",
        "localeId":"1"
    },
    "items":[
        {
            "displayName":"Chinese (Simplified)",
            "name":"zh_CN",
            "repositoryId":"24",
            "localeId":"24"
        },
        {
            "displayName":"Chinese (Traditional)",
            "name":"zh_TW",
            "repositoryId":"14",
            "localeId":"14"
        },
        {
            "displayName":"Czech",
            "name":"cs",
            "repositoryId":"16",
            "localeId":"16"
        },
        {
            "displayName":"Turkish",
            "name":"tr",
            "repositoryId":"12",
            "localeId":"12"
        },
        {
            "displayName":"Vietnamese",
            "name":"vi",
            "repositoryId":"27",
            "localeId":"27"
        }
    ]
}
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| |------------------|------------------| |27000|Default locale for site it not set.| |27002|Unable to retrieve the locale list.|
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:

{
  "defaultLocale": {
    "displayName": "English (United States)",
    "name": "en",
    "repositoryId": "1",
    "localeId": "1"
  },
  "items": [
    {
      "displayName": "Chinese (Simplified)",
      "name": "zh_CN",
      "repositoryId": "24",
      "localeId": "24"
    },
    {
      "displayName": "Chinese (Traditional)",
      "name": "zh_TW",
      "repositoryId": "14",
      "localeId": "14"
    },
    {
      "displayName": "Czech",
      "name": "cs",
      "repositoryId": "16",
      "localeId": "16"
    },
    {
      "displayName": "Turkish",
      "name": "tr",
      "repositoryId": "12",
      "localeId": "12"
    },
    {
      "displayName": "Vietnamese",
      "name": "vi",
      "repositoryId": "27",
      "localeId": "27"
    }
  ]
}