GalaxyMobile Client API

<back to all web services

TakeMeHomeRequest

The following routes are available for this service:
POST/pickmeup/takemehomeRequest a booking for the Take Me Home service.
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiServiceRequest(IServiceRequest, IHasApiKey):
    # @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    api_key: Optional[str] = None
    """
    The API Key required for authentication
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingLocation:
    # @ApiMember(Description="Latitude of the pickup/drop-off location.", IsRequired=true)
    latitude: float = 0.0
    """
    Latitude of the pickup/drop-off location.
    """


    # @ApiMember(Description="Longitude of the pickup/drop-off location.", IsRequired=true)
    longitude: float = 0.0
    """
    Longitude of the pickup/drop-off location.
    """


    # @ApiMember(Description="Address of the pickup/drop-off location.", IsRequired=true)
    address: Optional[str] = None
    """
    Address of the pickup/drop-off location.
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PickMeUpActivationRequest(ApiServiceRequest):
    # @ApiMember(Description="ID Number of the user making this request.", IsRequired=true)
    id_number: Optional[str] = None
    """
    ID Number of the user making this request.
    """


    # @ApiMember(Description="The number of people to be picked up.", IsRequired=true)
    passenger_count: int = 0
    """
    The number of people to be picked up.
    """


    # @ApiMember(Description="Date and Time of the pickup in ISO 8601 format.", IsRequired=true)
    booking_date: Optional[str] = None
    """
    Date and Time of the pickup in ISO 8601 format.
    """


    # @ApiMember(Description="Name of contact person at pickup.", IsRequired=true)
    contact_name: Optional[str] = None
    """
    Name of contact person at pickup.
    """


    # @ApiMember(Description="Contact number of contact person at pickup.", IsRequired=true)
    contact_number: Optional[str] = None
    """
    Contact number of contact person at pickup.
    """


    # @ApiMember(DataType="BookingLocation", Description="The location details of where the clients are to be picked up.", IsRequired=true)
    pickup_location: Optional[BookingLocation] = None
    """
    The location details of where the clients are to be picked up.
    """


    # @ApiMember(DataType="BookingLocation", Description="The location details of where the clients are to be dropped off.", IsRequired=true)
    dropoff_location: Optional[BookingLocation] = None
    """
    The location details of where the clients are to be dropped off.
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiServiceResponse(IServiceResponse):
    description: Optional[str] = None
    heading: Optional[str] = None
    was_successful: bool = False
    model_state: Optional[Object] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PickMeUpResponse(ApiServiceResponse):
    # @ApiMember(Description="Is the requested product set up and enabled on Galaxy.")
    product_available: bool = False
    """
    Is the requested product set up and enabled on Galaxy.
    """


    # @ApiMember(Description="Does the user have access to this product, based on their Galaxy profile.")
    user_has_access: bool = False
    """
    Does the user have access to this product, based on their Galaxy profile.
    """


    # @ApiMember(Description="This indicates that the pickup location is outside of the service area of the service provider.")
    pickup_out_of_bounds: bool = False
    """
    This indicates that the pickup location is outside of the service area of the service provider.
    """


    # @ApiMember(Description="This indicates that the dropoff location is outside of the service area of the service provider.")
    dropoff_out_of_bounds: bool = False
    """
    This indicates that the dropoff location is outside of the service area of the service provider.
    """


    # @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.")
    pickup_too_soon: bool = False
    """
    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.
    """


    # @ApiMember(Description="The booking reference number returned by the service provider. To be shown to the client.")
    reference_number: Optional[str] = None
    """
    The booking reference number returned by the service provider. To be shown to the client.
    """


    # @ApiMember(Description="Error message from service provider.")
    error_message: Optional[str] = None
    """
    Error message from service provider.
    """


    # @ApiMember(Description="Error code from service provider.")
    error_code: int = 0
    """
    Error code from service provider.
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TakeMeHomeRequest(PickMeUpActivationRequest):
    pass

Python TakeMeHomeRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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/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":{}}