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
- defaultLocale
-
Type:
object
defaultLocaleAdditional Properties Allowed:The defalut locale object. - items
-
Type:
array
itemsAdditional Properties Allowed:The list of valid locales from the server.
Nested Schema : defaultLocale
Type:
object
The defalut locale object.
- displayName
-
Type:
string
Human-readable name of the loacle (e.g., English (United States)). - localeId
-
Type:
string
Internal ID of the locale. - name
-
Type:
string
The name of the locale such as 'en' or 'pt_BR'. - repositoryId
-
Type:
string
Repository ID of the locale item.
Nested Schema : items
Nested Schema : items
Type:
object
- displayName
-
Type:
string
Human-readable name of the loacle (e.g., English (United States)). - localeId
-
Type:
string
Internal ID of the locale. - name
-
Type:
string
The name of the locale such as 'en' or 'pt_BR'. - repositoryId
-
Type:
string
Repository ID of the locale item.
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
- 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:
{ "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" } ] }