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 .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<UserLoginRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.User">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.Base">String</ApiKey>
  <IdNumber>String</IdNumber>
</UserLoginRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UserLoginResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.User">
  <Description xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">String</Description>
  <Heading xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">String</Heading>
  <ModelState xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base" />
  <WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">false</WasSuccessful>
  <Dependents>
    <DependentData>
      <DependentId>0</DependentId>
      <Email>String</Email>
      <FirstName>String</FirstName>
      <IdNumber>String</IdNumber>
      <MobileNumber>String</MobileNumber>
      <Surname>String</Surname>
    </DependentData>
  </Dependents>
  <UserProductInformation>
    <UserProductData>
      <ActionUrl>String</ActionUrl>
      <Attachments>
        <UserProductAttachmentData>
          <FileName>String</FileName>
          <IsImage>false</IsImage>
          <IsPdf>false</IsPdf>
          <IsVideo>false</IsVideo>
          <MainFileUrl>String</MainFileUrl>
          <ThumbnailUrl>String</ThumbnailUrl>
        </UserProductAttachmentData>
      </Attachments>
      <DashImageUrl>String</DashImageUrl>
      <DescriptionAfr>String</DescriptionAfr>
      <DescriptionEng>String</DescriptionEng>
      <IntegrationType>None</IntegrationType>
      <Name>String</Name>
      <NameAfrikaans>String</NameAfrikaans>
      <ProductId>0</ProductId>
      <SummaryAfr>String</SummaryAfr>
      <SummaryEng>String</SummaryEng>
    </UserProductData>
  </UserProductInformation>
</UserLoginResponse>