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: 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.|

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listTimezones_response
Nested Schema : items
Type: array
List of timezones
Nested Schema : selectedTimezone
Type: object
Selected Timezone
Nested Schema : sort
Type: array
Sorting criteria.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
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
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:

{
  "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"
    }
  ]
}