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:
objectdefaultLocaleAdditional Properties Allowed:The defalut locale object. - items
-
Type:
arrayitemsAdditional Properties Allowed:The list of valid locales from the server.
Nested Schema : defaultLocale
Type:
objectThe defalut locale object.
- displayName
-
Type:
stringHuman-readable name of the loacle (e.g., English (United States)). - localeId
-
Type:
stringInternal ID of the locale. - name
-
Type:
stringThe name of the locale such as 'en' or 'pt_BR'. - repositoryId
-
Type:
stringRepository ID of the locale item.
Nested Schema : items
Nested Schema : items
Type:
object- displayName
-
Type:
stringHuman-readable name of the loacle (e.g., English (United States)). - localeId
-
Type:
stringInternal ID of the locale. - name
-
Type:
stringThe name of the locale such as 'en' or 'pt_BR'. - repositoryId
-
Type:
stringRepository 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:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe 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"
}
]
}