GalaxyMobile Client API

<back to all web services

UserLoginRequest

The following routes are available for this service:
POST/user/loginCheck that the user exists on Galaxy and set up their account and services.
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 ApiServiceResponse(IServiceResponse):
    description: Optional[str] = None
    heading: Optional[str] = None
    was_successful: bool = False
    model_state: Optional[Object] = None


class IntegrationProviderType(IntEnum):
    NONE = 0
    EA = 1
    ILLUMINA_HUB_PROTECT_ME = 2
    MY_LEGAL_HAND = 3
    ACCIDENT_ANGELS = 4
    EMERGENCY_SERVICES = 5
    MIGHTY_MOBILE = 6
    PULSIT = 7
    BOLT = 8


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserProductAttachmentData:
    file_name: Optional[str] = None
    main_file_url: Optional[str] = None
    thumbnail_url: Optional[str] = None
    is_video: bool = False
    is_image: bool = False
    is_pdf: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserProductData:
    integration_type: Optional[IntegrationProviderType] = None
    product_id: int = 0
    name: Optional[str] = None
    name_afrikaans: Optional[str] = None
    dash_image_url: Optional[str] = None
    action_url: Optional[str] = None
    attachments: Optional[List[UserProductAttachmentData]] = None
    description_eng: Optional[str] = None
    summary_eng: Optional[str] = None
    description_afr: Optional[str] = None
    summary_afr: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DependentData:
    # @ApiMember(Description="Dependent's Galaxy Id used for referring to or deleting.", IsRequired=true)
    dependent_id: int = 0
    """
    Dependent's Galaxy Id used for referring to or deleting.
    """


    # @ApiMember(Description="Dependent's first name.", IsRequired=true)
    first_name: Optional[str] = None
    """
    Dependent's first name.
    """


    # @ApiMember(Description="Dependent's surname.", IsRequired=true)
    surname: Optional[str] = None
    """
    Dependent's surname.
    """


    # @ApiMember(Description="Dependent's mobile contact number.", IsRequired=true)
    mobile_number: Optional[str] = None
    """
    Dependent's mobile contact number.
    """


    # @ApiMember(Description="Dependent's email address.", IsRequired=true)
    email: Optional[str] = None
    """
    Dependent's email address.
    """


    # @ApiMember(Description="Depdendent's ID number.", IsRequired=true)
    id_number: Optional[str] = None
    """
    Depdendent's ID number.
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserLoginResponse(ApiServiceResponse):
    # @ApiMember(Description="List of products the user has access to.")
    user_product_information: Optional[List[UserProductData]] = None
    """
    List of products the user has access to.
    """


    # @ApiMember(Description="List of all dependents linked to this user.")
    dependents: Optional[List[DependentData]] = None
    """
    List of all dependents linked to this user.
    """


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

Python UserLoginRequest 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.

POST /user/login HTTP/1.1 
Host: galaxymobile.api.client.prod.86degrees.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"IdNumber":"String","ApiKey":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"UserProductInformation":[{"IntegrationType":0,"ProductId":0,"Name":"String","NameAfrikaans":"String","DashImageUrl":"String","ActionUrl":"String","Attachments":[{"FileName":"String","MainFileUrl":"String","ThumbnailUrl":"String","IsVideo":false,"IsImage":false,"IsPdf":false}],"DescriptionEng":"String","SummaryEng":"String","DescriptionAfr":"String","SummaryAfr":"String"}],"Dependents":[{"DependentId":0,"FirstName":"String","Surname":"String","MobileNumber":"String","Email":"String","IdNumber":"String"}],"Description":"String","Heading":"String","WasSuccessful":false,"ModelState":{}}