listTimezones
get
/ccadmin/v1/timezones
List Timezones. Get a list of timezones and the currently selected timezone.
Request
Supported Media Types
- application/json
Query Parameters
- limit
-
Type:
integerThe number of items to return.- offset
Type:integerIndex of the first element to return.- sort
Type:stringSorting criteria. Following are the fields supported by this param: |Field|Type|Description| |------------------|------------------|------------------| |property|string|The property the listing is sorted by.| |order|string|Sort order: asc or desc.|
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listTimezones_response
- items
-
Type:
arrayitemsAdditional Properties Allowed:List of timezones - limit
-
Type:
integerThe number of items to return. - offset
-
Type:
integerIndex of the first element to return. - selectedTimezone
-
Type:
objectselectedTimezoneAdditional Properties Allowed:Selected Timezone - sort
-
Type:
arraysortAdditional Properties Allowed:Sorting criteria. - total
-
Type:
integerThe total number of items. Deprecated. - totalResults
-
Type:
integerThe total number of items.
Nested Schema : items
Nested Schema : selectedTimezone
Type:
objectSelected Timezone
- repositoryId
-
Type:
stringID of the timezone item - timezoneCode
-
Type:
stringStandard Timezone value - timezoneLabel
-
Type:
stringTimezone name to display in the UI
Nested Schema : sort
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringID of the timezone item. - timezoneCode
-
Type:
stringStandard Timezone values - timezoneLabel
-
Type:
stringTimezone name to display in the UI
Nested Schema : items
Type:
object- order
-
Type:
stringSort order: asc or desc. - property
-
Type:
stringThe property the listing is sorted by.
Example application/json
{
"total":107,
"totalResults":107,
"offset":3,
"limit":3,
"selectedTimezone":{
"timezoneLabel":"(UTC) Reykjavik ",
"repositoryId":"atlantic_reykjavik",
"timezoneCode":"Atlantic/Reykjavik"
},
"sort":[
{
"property":"timezoneLabel",
"order":"asc"
}
],
"items":[
{
"timezoneLabel":"(UTC) London ",
"repositoryId":"europe_london",
"timezoneCode":"Europe/London"
},
{
"timezoneLabel":"(UTC) Nouakchott ",
"repositoryId":"africa_nouakchott",
"timezoneCode":"Africa/Nouakchott"
},
{
"timezoneLabel":"(UTC) Reykjavik ",
"repositoryId":"atlantic_reykjavik",
"timezoneCode":"Atlantic/Reykjavik"
}
]
}
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|
|------------------|------------------|
|80023|There was an error fetching the timezone list.|
|80028|Null sort directive entry found in sort directives list. Null entries are not allowed.|
|80027|xx is a restricted property to use for sorting timezones.|
|80026|xx is an invalid sort property as it is not a property found for timezone|
|80021|There was an error retrieving the selected timezone.|
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:
{
"total": 107,
"totalResults": 107,
"offset": 3,
"limit": 3,
"selectedTimezone": {
"timezoneLabel": "(UTC) Reykjavik ",
"repositoryId": "atlantic_reykjavik",
"timezoneCode": "Atlantic/Reykjavik"
},
"sort": [{
"property": "timezoneLabel",
"order": "asc"
}],
"items": [
{
"timezoneLabel": "(UTC) London ",
"repositoryId": "europe_london",
"timezoneCode": "Europe/London"
},
{
"timezoneLabel": "(UTC) Nouakchott ",
"repositoryId": "africa_nouakchott",
"timezoneCode": "Africa/Nouakchott"
},
{
"timezoneLabel": "(UTC) Reykjavik ",
"repositoryId": "atlantic_reykjavik",
"timezoneCode": "Atlantic/Reykjavik"
}
]
}