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 Foundation
import ServiceStack

/**
* Get a list of timezones
*/
// @Api(Description="Get a list of timezones")
public class GetTimezones : Codable
{
    required public init(){}
}

// @ApiResponse(Description="List of timezones matching the criteria")
public class GetTimezonesResponse : Codable
{
    public var timezones:DataListModel
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class DataListModel : Codable
{
    /**
    * Guid of the List PKID.
    */
    // @ApiMember(DataType="Guid", Description="Guid of the List PKID.", IsRequired=true, Name="ListId", ParameterType="query")
    public var listId:String

    /**
    * Name of the list.
    */
    // @ApiMember(DataType="String", Description="Name of the list.", Name="Name", ParameterType="query")
    public var name:String

    /**
    * The owner of this item.
    */
    // @ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
    public var ownerContactId:String

    /**
    * List Items in the list.
    */
    // @ApiMember(DataType="List<DataListItemModel>", Description="List Items in the list.", Name="ListItems", ParameterType="query")
    public var dataListItems:[DataListItemModel]

    required public init(){}
}

public class DataListItemModel : Codable
{
    /**
    * Guid of the list item PKID.
    */
    // @ApiMember(DataType="Guid", Description="Guid of the list item PKID.", IsRequired=true, Name="ListItemId", ParameterType="query")
    public var listItemId:String

    /**
    * Name of the list item.
    */
    // @ApiMember(DataType="string", Description="Name of the list item.", Name="Name", ParameterType="query")
    public var name:String

    /**
    * Short Version Name of the list item.
    */
    // @ApiMember(DataType="string", Description="Short Version Name of the list item.", Name="ShortName", ParameterType="query")
    public var shortName:String

    /**
    * The primary image url
    */
    // @ApiMember(DataType="string", Description="The primary image url", Name="PrimaryImagePath", ParameterType="query")
    public var primaryImagePath:String

    /**
    * Record Status of the List Item (A=Active, I=Inactive, D=Deleted).
    */
    // @ApiMember(DataType="string", Description="Record Status of the List Item (A=Active, I=Inactive, D=Deleted).", Name="RecordStatus", ParameterType="query")
    public var recordStatus:String

    /**
    * The order (if any) of this item in the list.
    */
    // @ApiMember(DataType="int", Description="The order (if any) of this item in the list.", Name="Order", ParameterType="query")
    public var order:Int

    /**
    * The owner of this item.
    */
    // @ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
    public var ownerContactId:String

    public var extraValues:[String]

    required public init(){}
}


Swift GetTimezones DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: application/json
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"}}}