| POST | /pickmeup/takemehome | Request a booking for the Take Me Home service. |
|---|
"use strict";
export class ApiServiceRequest {
/** @param {{ApiKey?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API Key required for authentication */
ApiKey;
}
export class BookingLocation {
/** @param {{Latitude?:number,Longitude?:number,Address?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Latitude of the pickup/drop-off location. */
Latitude;
/**
* @type {number}
* @description Longitude of the pickup/drop-off location. */
Longitude;
/**
* @type {string}
* @description Address of the pickup/drop-off location. */
Address;
}
export class PickMeUpActivationRequest extends ApiServiceRequest {
/** @param {{IdNumber?:string,PassengerCount?:number,BookingDate?:string,ContactName?:string,ContactNumber?:string,PickupLocation?:BookingLocation,DropoffLocation?:BookingLocation,ApiKey?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description ID Number of the user making this request. */
IdNumber;
/**
* @type {number}
* @description The number of people to be picked up. */
PassengerCount;
/**
* @type {string}
* @description Date and Time of the pickup in ISO 8601 format. */
BookingDate;
/**
* @type {string}
* @description Name of contact person at pickup. */
ContactName;
/**
* @type {string}
* @description Contact number of contact person at pickup. */
ContactNumber;
/**
* @type {BookingLocation}
* @description The location details of where the clients are to be picked up. */
PickupLocation;
/**
* @type {BookingLocation}
* @description The location details of where the clients are to be dropped off. */
DropoffLocation;
}
export class ApiServiceResponse {
/** @param {{Description?:string,Heading?:string,WasSuccessful?:boolean,ModelState?:Object}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Description;
/** @type {string} */
Heading;
/** @type {boolean} */
WasSuccessful;
/** @type {Object} */
ModelState;
}
export class PickMeUpResponse extends ApiServiceResponse {
/** @param {{ProductAvailable?:boolean,UserHasAccess?:boolean,PickupOutOfBounds?:boolean,DropoffOutOfBounds?:boolean,PickupTooSoon?:boolean,ReferenceNumber?:string,ErrorMessage?:string,ErrorCode?:number,Description?:string,Heading?:string,WasSuccessful?:boolean,ModelState?:Object}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {boolean}
* @description Is the requested product set up and enabled on Galaxy. */
ProductAvailable;
/**
* @type {boolean}
* @description Does the user have access to this product, based on their Galaxy profile. */
UserHasAccess;
/**
* @type {boolean}
* @description This indicates that the pickup location is outside of the service area of the service provider. */
PickupOutOfBounds;
/**
* @type {boolean}
* @description This indicates that the dropoff location is outside of the service area of the service provider. */
DropoffOutOfBounds;
/**
* @type {boolean}
* @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. */
PickupTooSoon;
/**
* @type {string}
* @description The booking reference number returned by the service provider. To be shown to the client. */
ReferenceNumber;
/**
* @type {string}
* @description Error message from service provider. */
ErrorMessage;
/**
* @type {number}
* @description Error code from service provider. */
ErrorCode;
}
export class TakeMeHomeRequest extends PickMeUpActivationRequest {
/** @param {{IdNumber?:string,PassengerCount?:number,BookingDate?:string,ContactName?:string,ContactNumber?:string,PickupLocation?:BookingLocation,DropoffLocation?:BookingLocation,ApiKey?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript TakeMeHomeRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /pickmeup/takemehome HTTP/1.1
Host: galaxymobile.api.client.prod.86degrees.com
Accept: text/jsonl
Content-Type: text/jsonl
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/jsonl
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":{}}