| POST | /pickmeup/pickmeup | Request a booking for the Pick Me Up service. |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using WebService.ClientServiceModel.PickMeUp;
using WebService.ClientServiceModel.Base;
using CommonService.Api.Models.Base;
namespace CommonService.Api.Models.Base
{
public partial class ApiServiceResponse
: IServiceResponse
{
public virtual string Description { get; set; }
public virtual string Heading { get; set; }
public virtual bool WasSuccessful { get; set; }
public virtual Object ModelState { get; set; }
}
}
namespace WebService.ClientServiceModel.Base
{
public partial class ApiServiceRequest
: IServiceRequest, IHasApiKey
{
///<summary>
///The API Key required for authentication
///</summary>
[ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)]
public virtual string ApiKey { get; set; }
}
}
namespace WebService.ClientServiceModel.PickMeUp
{
public partial class BookingLocation
{
///<summary>
///Latitude of the pickup/drop-off location.
///</summary>
[ApiMember(Description="Latitude of the pickup/drop-off location.", IsRequired=true)]
public virtual double Latitude { get; set; }
///<summary>
///Longitude of the pickup/drop-off location.
///</summary>
[ApiMember(Description="Longitude of the pickup/drop-off location.", IsRequired=true)]
public virtual double Longitude { get; set; }
///<summary>
///Address of the pickup/drop-off location.
///</summary>
[ApiMember(Description="Address of the pickup/drop-off location.", IsRequired=true)]
public virtual string Address { get; set; }
}
public partial class PickMeUpActivationRequest
: ApiServiceRequest
{
///<summary>
///ID Number of the user making this request.
///</summary>
[ApiMember(Description="ID Number of the user making this request.", IsRequired=true)]
public virtual string IdNumber { get; set; }
///<summary>
///The number of people to be picked up.
///</summary>
[ApiMember(Description="The number of people to be picked up.", IsRequired=true)]
public virtual int PassengerCount { 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)]
public virtual string BookingDate { get; set; }
///<summary>
///Name of contact person at pickup.
///</summary>
[ApiMember(Description="Name of contact person at pickup.", IsRequired=true)]
public virtual string ContactName { get; set; }
///<summary>
///Contact number of contact person at pickup.
///</summary>
[ApiMember(Description="Contact number of contact person at pickup.", IsRequired=true)]
public virtual string ContactNumber { 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)]
public virtual BookingLocation PickupLocation { 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)]
public virtual BookingLocation DropoffLocation { get; set; }
}
public partial class PickMeUpRequest
: PickMeUpActivationRequest
{
}
public partial class PickMeUpResponse
: 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.")]
public virtual bool ProductAvailable { 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.")]
public virtual bool UserHasAccess { 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.")]
public virtual bool PickupOutOfBounds { 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.")]
public virtual bool DropoffOutOfBounds { 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.")]
public virtual bool PickupTooSoon { 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.")]
public virtual string ReferenceNumber { get; set; }
///<summary>
///Error message from service provider.
///</summary>
[ApiMember(Description="Error message from service provider.")]
public virtual string ErrorMessage { get; set; }
///<summary>
///Error code from service provider.
///</summary>
[ApiMember(Description="Error code from service provider.")]
public virtual int ErrorCode { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
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/csv
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":{}}