AIM Web Services

<back to all web services

GetTimeSlotsRequest

GetTimeSlots
Requires active-e Contracts Service, active-e Service Ticket Service, active-e Lesson Scheduling Service, active-e Vortx E-Commerce Service, or active-e 3rd Party E-Commerce Service

The following routes are available for this service:
POST, GET/api/GetTimeSlots
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AIM.WebService;
using AIM;

namespace AIM
{
    [DataContract]
    public partial class TimeSlotGeneric
    {
        [DataMember]
        public virtual long Id { get; set; }

        [DataMember]
        public virtual DateTime DateTime { get; set; }

        [DataMember]
        public virtual int SlotsOpen { get; set; }

        [DataMember]
        public virtual string Location { get; set; }

        [DataMember]
        public virtual string Type { get; set; }
    }

}

namespace AIM.WebService
{
    [DataContract]
    public partial class BaseRequest
    {
        ///<summary>
        ///This is your AIM API Key provided by Tri-Tech
        ///</summary>
        [DataMember]
        [ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")]
        public virtual string ApiKey { get; set; }

        [DataMember]
        [ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")]
        public virtual string OAuthToken { get; set; }
    }

    [DataContract]
    public partial class BaseResponse
    {
        ///<summary>
        ///
        ///</summary>
        [DataMember]
        [ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")]
        public virtual BaseResponseResult Status { get; set; }
        [DataContract]
        public partial class BaseResponseResult
        {
            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")]
            public virtual string StatusCode { get; set; }

            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")]
            public virtual string Login { get; set; }

            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")]
            public virtual string ErrorCode { get; set; }

            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")]
            public virtual string ErrorDisplayText { get; set; }

            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")]
            public virtual string ErrorMessage { get; set; }

            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")]
            public virtual string DomainName { get; set; }

            ///<summary>
            ///
            ///</summary>
            [DataMember]
            [ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")]
            public virtual string IpAddress { get; set; }
        }

    }

    ///<summary>
    ///GetTimeSlotsRequires active-e Contracts Service, active-e Service Ticket Service, active-e Lesson Scheduling Service, active-e Vortx E-Commerce Service, or active-e 3rd Party E-Commerce Service
    ///</summary>
    [DataContract]
    public partial class GetTimeSlotsRequest
        : BaseRequest
    {
        [DataMember]
        public virtual DateTime DateFrom { get; set; }

        [DataMember]
        public virtual DateTime DateTo { get; set; }

        [DataMember]
        public virtual DateTime? TimeFrom { get; set; }

        [DataMember]
        public virtual DateTime? TimeTo { get; set; }

        [DataMember]
        public virtual string Location { get; set; }

        [DataMember]
        public virtual bool? ShowOpenSlots { get; set; }

        [DataMember]
        public virtual bool? ShowReservedSlots { get; set; }

        ///<summary>
        ///If sent, only Time Slots of the sent type are returned. Valid options are STORE and DELIVERY.
        ///</summary>
        [DataMember]
        [ApiMember(DataType="string", Description="If sent, only Time Slots of the sent type are returned. Valid options are STORE and DELIVERY.", Name="Type", ParameterType="query")]
        public virtual string Type { get; set; }
    }

    [DataContract]
    public partial class GetTimeSlotsResponse
        : BaseResponse
    {
        public GetTimeSlotsResponse()
        {
            TimeSlots = new List<TimeSlotGeneric>{};
        }

        [DataMember]
        public virtual List<TimeSlotGeneric> TimeSlots { get; set; }
    }

}

C# GetTimeSlotsRequest 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/GetTimeSlots HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"TimeFrom":"0001-01-01T00:00:00.0000000","TimeTo":"0001-01-01T00:00:00.0000000","Location":"String","ShowOpenSlots":false,"ShowReservedSlots":false,"Type":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"TimeSlots":[{"Id":0,"SlotsOpen":0,"Location":"String","Type":"String"}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}