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
namespace Eros.Saguna.Common.WebAPI.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type DataListItemModel() = 
        ///<summary>
        ///Guid of the list item PKID.
        ///</summary>
        [<ApiMember(DataType="Guid", Description="Guid of the list item PKID.", IsRequired=true, Name="ListItemId", ParameterType="query")>]
        member val ListItemId:Guid = new Guid() with get,set

        ///<summary>
        ///Name of the list item.
        ///</summary>
        [<ApiMember(DataType="string", Description="Name of the list item.", Name="Name", ParameterType="query")>]
        member val Name:String = null with get,set

        ///<summary>
        ///Short Version Name of the list item.
        ///</summary>
        [<ApiMember(DataType="string", Description="Short Version Name of the list item.", Name="ShortName", ParameterType="query")>]
        member val ShortName:String = null with get,set

        ///<summary>
        ///The primary image url
        ///</summary>
        [<ApiMember(DataType="string", Description="The primary image url", Name="PrimaryImagePath", ParameterType="query")>]
        member val PrimaryImagePath:String = null with get,set

        ///<summary>
        ///Record Status of the List Item (A=Active, I=Inactive, D=Deleted).
        ///</summary>
        [<ApiMember(DataType="string", Description="Record Status of the List Item (A=Active, I=Inactive, D=Deleted).", Name="RecordStatus", ParameterType="query")>]
        member val RecordStatus:String = null with get,set

        ///<summary>
        ///The order (if any) of this item in the list.
        ///</summary>
        [<ApiMember(DataType="int", Description="The order (if any) of this item in the list.", Name="Order", ParameterType="query")>]
        member val Order:Int32 = new Int32() with get,set

        ///<summary>
        ///The owner of this item.
        ///</summary>
        [<ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")>]
        member val OwnerContactId:Guid = new Guid() with get,set

        member val ExtraValues:ResizeArray<Object> = null with get,set

    [<AllowNullLiteral>]
    type DataListModel() = 
        ///<summary>
        ///Guid of the List PKID.
        ///</summary>
        [<ApiMember(DataType="Guid", Description="Guid of the List PKID.", IsRequired=true, Name="ListId", ParameterType="query")>]
        member val ListId:Guid = new Guid() with get,set

        ///<summary>
        ///Name of the list.
        ///</summary>
        [<ApiMember(DataType="String", Description="Name of the list.", Name="Name", ParameterType="query")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The owner of this item.
        ///</summary>
        [<ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")>]
        member val OwnerContactId:Guid = new Guid() with get,set

        ///<summary>
        ///List Items in the list.
        ///</summary>
        [<ApiMember(DataType="List<DataListItemModel>", Description="List Items in the list.", Name="ListItems", ParameterType="query")>]
        member val DataListItems:ResizeArray<DataListItemModel> = null with get,set

    [<ApiResponse(Description="List of timezones matching the criteria")>]
    [<AllowNullLiteral>]
    type GetTimezonesResponse() = 
        member val Timezones:DataListModel = null with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    ///<summary>
    ///Get a list of timezones
    ///</summary>
    [<Api(Description="Get a list of timezones")>]
    [<AllowNullLiteral>]
    type GetTimezones() = 
        class end

F# 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"}}}