| POST | /pickmeup/pickmeup | Request a booking for the Pick Me Up service. |
|---|
namespace CommonService.Api.Models.Base
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ApiServiceResponse() =
member val Description:String = null with get,set
member val Heading:String = null with get,set
member val WasSuccessful:Boolean = new Boolean() with get,set
member val ModelState:Object = null with get,set
[<AllowNullLiteral>]
type PickMeUpResponse() =
inherit ApiServiceResponse()
///<summary>
///Is the requested product set up and enabled on Galaxy.
///</summary>
[<ApiMember(Description="Is the requested product set up and enabled on Galaxy.")>]
member val ProductAvailable:Boolean = new Boolean() with get,set
///<summary>
///Does the user have access to this product, based on their Galaxy profile.
///</summary>
[<ApiMember(Description="Does the user have access to this product, based on their Galaxy profile.")>]
member val UserHasAccess:Boolean = new Boolean() with get,set
///<summary>
///This indicates that the pickup location is outside of the service area of the service provider.
///</summary>
[<ApiMember(Description="This indicates that the pickup location is outside of the service area of the service provider.")>]
member val PickupOutOfBounds:Boolean = new Boolean() with get,set
///<summary>
///This indicates that the dropoff location is outside of the service area of the service provider.
///</summary>
[<ApiMember(Description="This indicates that the dropoff location is outside of the service area of the service provider.")>]
member val DropoffOutOfBounds:Boolean = new Boolean() with get,set
///<summary>
///This indicates that the pickup time is not far enough in the future. The time needs to be at least 60 minutes in the future, or 90 minutes during peak times. See the documentation for more details.
///</summary>
[<ApiMember(Description="This indicates that the pickup time is not far enough in the future. The time needs to be at least 60 minutes in the future, or 90 minutes during peak times. See the documentation for more details.")>]
member val PickupTooSoon:Boolean = new Boolean() with get,set
///<summary>
///The booking reference number returned by the service provider. To be shown to the client.
///</summary>
[<ApiMember(Description="The booking reference number returned by the service provider. To be shown to the client.")>]
member val ReferenceNumber:String = null with get,set
///<summary>
///Error message from service provider.
///</summary>
[<ApiMember(Description="Error message from service provider.")>]
member val ErrorMessage:String = null with get,set
///<summary>
///Error code from service provider.
///</summary>
[<ApiMember(Description="Error code from service provider.")>]
member val ErrorCode:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type ApiServiceRequest() =
///<summary>
///The API Key required for authentication
///</summary>
[<ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)>]
member val ApiKey:String = null with get,set
[<AllowNullLiteral>]
type BookingLocation() =
///<summary>
///Latitude of the pickup/drop-off location.
///</summary>
[<ApiMember(Description="Latitude of the pickup/drop-off location.", IsRequired=true)>]
member val Latitude:Double = new Double() with get,set
///<summary>
///Longitude of the pickup/drop-off location.
///</summary>
[<ApiMember(Description="Longitude of the pickup/drop-off location.", IsRequired=true)>]
member val Longitude:Double = new Double() with get,set
///<summary>
///Address of the pickup/drop-off location.
///</summary>
[<ApiMember(Description="Address of the pickup/drop-off location.", IsRequired=true)>]
member val Address:String = null with get,set
[<AllowNullLiteral>]
type PickMeUpActivationRequest() =
inherit ApiServiceRequest()
///<summary>
///ID Number of the user making this request.
///</summary>
[<ApiMember(Description="ID Number of the user making this request.", IsRequired=true)>]
member val IdNumber:String = null with get,set
///<summary>
///The number of people to be picked up.
///</summary>
[<ApiMember(Description="The number of people to be picked up.", IsRequired=true)>]
member val PassengerCount:Int32 = new Int32() with get,set
///<summary>
///Date and Time of the pickup in ISO 8601 format.
///</summary>
[<ApiMember(Description="Date and Time of the pickup in ISO 8601 format.", IsRequired=true)>]
member val BookingDate:String = null with get,set
///<summary>
///Name of contact person at pickup.
///</summary>
[<ApiMember(Description="Name of contact person at pickup.", IsRequired=true)>]
member val ContactName:String = null with get,set
///<summary>
///Contact number of contact person at pickup.
///</summary>
[<ApiMember(Description="Contact number of contact person at pickup.", IsRequired=true)>]
member val ContactNumber:String = null with get,set
///<summary>
///The location details of where the clients are to be picked up.
///</summary>
[<ApiMember(DataType="BookingLocation", Description="The location details of where the clients are to be picked up.", IsRequired=true)>]
member val PickupLocation:BookingLocation = null with get,set
///<summary>
///The location details of where the clients are to be dropped off.
///</summary>
[<ApiMember(DataType="BookingLocation", Description="The location details of where the clients are to be dropped off.", IsRequired=true)>]
member val DropoffLocation:BookingLocation = null with get,set
[<AllowNullLiteral>]
type PickMeUpRequest() =
inherit PickMeUpActivationRequest()
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /pickmeup/pickmeup HTTP/1.1
Host: galaxymobile.api.client.prod.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
IdNumber: String,
PassengerCount: 0,
BookingDate: String,
ContactName: String,
ContactNumber: String,
PickupLocation:
{
Latitude: 0,
Longitude: 0,
Address: String
},
DropoffLocation:
{
Latitude: 0,
Longitude: 0,
Address: String
},
ApiKey: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ProductAvailable: False,
UserHasAccess: False,
PickupOutOfBounds: False,
DropoffOutOfBounds: False,
PickupTooSoon: False,
ReferenceNumber: String,
ErrorMessage: String,
ErrorCode: 0,
Description: String,
Heading: String,
WasSuccessful: False,
ModelState: {}
}