Platform API

<back to all web services

GetTimezones

Get a list of timezones

The following routes are available for this service:
All Verbs/api/timezones
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DataListItemModel:
    # @ApiMember(DataType="Guid", Description="Guid of the list item PKID.", IsRequired=true, Name="ListItemId", ParameterType="query")
    list_item_id: Optional[str] = None
    """
    Guid of the list item PKID.
    """


    # @ApiMember(DataType="string", Description="Name of the list item.", Name="Name", ParameterType="query")
    name: Optional[str] = None
    """
    Name of the list item.
    """


    # @ApiMember(DataType="string", Description="Short Version Name of the list item.", Name="ShortName", ParameterType="query")
    short_name: Optional[str] = None
    """
    Short Version Name of the list item.
    """


    # @ApiMember(DataType="string", Description="The primary image url", Name="PrimaryImagePath", ParameterType="query")
    primary_image_path: Optional[str] = None
    """
    The primary image url
    """


    # @ApiMember(DataType="string", Description="Record Status of the List Item (A=Active, I=Inactive, D=Deleted).", Name="RecordStatus", ParameterType="query")
    record_status: Optional[str] = None
    """
    Record Status of the List Item (A=Active, I=Inactive, D=Deleted).
    """


    # @ApiMember(DataType="int", Description="The order (if any) of this item in the list.", Name="Order", ParameterType="query")
    order: int = 0
    """
    The order (if any) of this item in the list.
    """


    # @ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
    owner_contact_id: Optional[str] = None
    """
    The owner of this item.
    """


    extra_values: Optional[List[Object]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DataListModel:
    # @ApiMember(DataType="Guid", Description="Guid of the List PKID.", IsRequired=true, Name="ListId", ParameterType="query")
    list_id: Optional[str] = None
    """
    Guid of the List PKID.
    """


    # @ApiMember(DataType="String", Description="Name of the list.", Name="Name", ParameterType="query")
    name: Optional[str] = None
    """
    Name of the list.
    """


    # @ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
    owner_contact_id: Optional[str] = None
    """
    The owner of this item.
    """


    # @ApiMember(DataType="List<DataListItemModel>", Description="List Items in the list.", Name="ListItems", ParameterType="query")
    data_list_items: Optional[List[DataListItemModel]] = None
    """
    List Items in the list.
    """


# @ApiResponse(Description="List of timezones matching the criteria")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetTimezonesResponse:
    timezones: Optional[DataListModel] = None
    response_status: Optional[ResponseStatus] = None


# @Api(Description="Get a list of timezones")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetTimezones:
    """
    Get a list of timezones
    """

    pass

Python GetTimezones DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/timezones HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Timezones":{"ListId":"00000000-0000-0000-0000-000000000000","Name":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","DataListItems":[{"ListItemId":"00000000-0000-0000-0000-000000000000","Name":"String","ShortName":"String","PrimaryImagePath":"String","RecordStatus":"String","Order":0,"OwnerContactId":"00000000-0000-0000-0000-000000000000","ExtraValues":[{}]}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}