listTimezones
get
/ccstore/v1/timezones
List Timezones. Get a list of timezones and the currently selected timezone. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Query Parameters
- limit
-
Type:
integer
The number of items to return.- offset
Type:integer
Index of the first element to return.- sort
Type:string
Sorting 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.|Header Parameters- X-CCAsset-Language
-
Type:
string
The asset language of the request
Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : listTimezones_response- items
-
Type:
array
itemsAdditional Properties Allowed:List of timezones - limit
-
Type:
integer
The number of items to return. - offset
-
Type:
integer
Index of the first element to return. - selectedTimezone
-
Type:
object
selectedTimezoneAdditional Properties Allowed:Selected Timezone - sort
-
Type:
array
sortAdditional Properties Allowed:Sorting criteria. - total
-
Type:
integer
The total number of items. Deprecated. - totalResults
-
Type:
integer
The total number of items.
Nested Schema : itemsNested Schema : selectedTimezoneType:object
Selected Timezone- repositoryId
-
Type:
string
ID of the timezone item - timezoneCode
-
Type:
string
Standard Timezone value - timezoneLabel
-
Type:
string
Timezone name to display in the UI
Nested Schema : sortNested Schema : itemsType:object
- repositoryId
-
Type:
string
ID of the timezone item. - timezoneCode
-
Type:
string
Standard Timezone values - timezoneLabel
-
Type:
string
Timezone name to display in the UI
Nested Schema : itemsType:object
- order
-
Type:
string
Sort order: asc or desc. - property
-
Type:
string
The 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 ResponseThe 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.|BodyRoot Schema : errorModelType: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 : errorsNested Schema : itemsType: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:
{ "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" } ] }