AIM Web Services

<back to all web services

GetStationsRequest

GetStations
Requires active-e Station Reservations Service

The following routes are available for this service:
GET/api/GetStations
import java.math.*
import java.util.*
import net.servicestack.client.*


/**
* GetStationsRequires active-e Station Reservations Service
*/
@DataContract
open class GetStationsRequest : BaseSecureRequest()
{
    /**
    * If sent, only stations at the passed location will be returned.
    */
    @DataMember
    @ApiMember(DataType="integer", Description="If sent, only stations at the passed location will be returned.", Format="int64", Name="LocationId", ParameterType="query")
    var LocationId:Long? = null

    /**
    * If sent, only stations in the passed Station group will be returned
    */
    @DataMember
    @ApiMember(DataType="integer", Description="If sent, only stations in the passed Station group will be returned", Format="int64", Name="GroupId", ParameterType="query")
    var GroupId:Long? = null

    @DataMember
    var Acct:Int? = null

    @DataMember
    var GenerateAvailabilityCalendar:Boolean? = null

    /**
    * If sent, the availability calendar will be for the next X days
    */
    @DataMember
    @ApiMember(DataType="integer", Description="If sent, the availability calendar will be for the next X days", Format="int64", Name="AvailabilityCalendarDays", ParameterType="query")
    var AvailabilityCalendarDays:Int? = null

    /**
    * If sent, the availability calendar will be for the sent date only
    */
    @DataMember
    @ApiMember(DataType="integer", Description="If sent, the availability calendar will be for the sent date only", Format="int64", Name="AvailabilityCalendarDate", ParameterType="query")
    var AvailabilityCalendarDate:Date? = null

    /**
    * If sent, the availability calendar will look for available slots of length X minutes. Uses the interval of the station group if not sent.
    */
    @DataMember
    @ApiMember(DataType="integer", Description="If sent, the availability calendar will look for available slots of length X minutes. Uses the interval of the station group if not sent.", Format="int64", Name="AvailabilityCalendarReservationLength", ParameterType="query")
    var AvailabilityCalendarReservationLength:Int? = null
}

@DataContract
open class BaseSecureRequest : BaseRequest()
{
    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
    var Token:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
    var DeviceId:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
    var AppId:String? = null
}

@DataContract
open class BaseRequest
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    @DataMember
    @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
    var ApiKey:String? = null

    @DataMember
    @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
    var OAuthToken:String? = null
}

@DataContract
open class GetStationsResponse : BaseResponse()
{
    @DataMember
    var Stations:ArrayList<StationInfo> = ArrayList<StationInfo>()
}

@DataContract
open class BaseResponse
{
    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    var Status:BaseResponseResult? = null
}

@DataContract
open class BaseResponseResult
{
    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    var StatusCode:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
    var Login:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
    var ErrorCode:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
    var ErrorDisplayText:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
    var ErrorMessage:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    var DomainName:String? = null

    /**
    * 
    */
    @DataMember
    @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    var IpAddress:String? = null
}

@DataContract
open class StationInfo
{
    @DataMember
    var Id:Long? = null

    @DataMember
    var Name:String? = null

    @DataMember
    var WebDescription:String? = null

    @DataMember
    var MaxUsers:Int? = null

    @DataMember
    var Location:LocationInfo? = null

    @DataMember
    var CurrentStatus:String? = null

    @DataMember
    var Reservations:ArrayList<ReservationInfo> = ArrayList<ReservationInfo>()

    @DataMember
    var AvailabilityCalendar:ArrayList<Date> = ArrayList<Date>()

    @DataMember
    var Topic:String? = null
}

@DataContract
open class LocationInfo
{
    @DataMember
    var Id:Long? = null

    @DataMember
    var Desc:String? = null

    @DataMember
    var ShortDesc:String? = null

    @DataMember
    var Region:String? = null

    @DataMember
    var Latitude:BigDecimal? = null

    @DataMember
    var Longitude:BigDecimal? = null

    @DataMember
    var InStorePickup:String? = null

    @DataMember
    var Active:Boolean? = null

    @DataMember
    var CashSaleAcct:Int? = null
}

@DataContract
open class ReservationInfo
{
    @DataMember
    var Start:Date? = null

    @DataMember
    var End:Date? = null

    @DataMember
    var CustomerAcct:Int? = null
}

Kotlin GetStationsRequest 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.

GET /api/GetStations HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Stations":[{"Id":0,"Name":"String","WebDescription":"String","MaxUsers":0,"Location":{"Id":0,"Desc":"String","ShortDesc":"String","Region":"String","Latitude":0,"Longitude":0,"InStorePickup":"String","Active":false,"CashSaleAcct":0},"CurrentStatus":"String","Reservations":[{"CustomerAcct":0}],"AvailabilityCalendar":["0001-01-01T00:00:00.0000000"],"Topic":"String"}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}