GalaxyMobile App API

<back to all web services

ConfirmOtp

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, IHasDeviceInfo, IHasClientId):
    # @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    api_key: Optional[str] = None
    """
    The API Key required for authentication
    """


    # @ApiMember(DataType="double", Description="Latitude of the user making this request")
    latitude: float = 0.0
    """
    Latitude of the user making this request
    """


    # @ApiMember(DataType="double", Description="Longitude of the user making this request")
    longitude: float = 0.0
    """
    Longitude of the user making this request
    """


@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


# @Flags()
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 SystemUserProductAttachmentData:
    id: int = 0
    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 SystemUserProductData:
    integration_type: Optional[IntegrationProviderType] = None
    product_id: int = 0
    name: Optional[str] = None
    name_afrikaans: Optional[str] = None
    panic_id: int = 0
    user_has_product: bool = False
    can_activate: bool = False
    enquired: bool = False
    dash_image: Optional[str] = None
    show_on_dash: bool = False
    action_url: Optional[str] = None
    attachments: Optional[List[SystemUserProductAttachmentData]] = 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:
    dependent_id: int = 0
    first_name: Optional[str] = None
    surname: Optional[str] = None
    mobile_number: Optional[str] = None
    email: Optional[str] = None
    id_number: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LoginData:
    system_user_id: int = 0
    refresh_token: Optional[str] = None
    first_name: Optional[str] = None
    is_dependent: bool = False
    full_name: Optional[str] = None
    all_products: Optional[List[SystemUserProductData]] = None
    user_products: Optional[List[SystemUserProductData]] = None
    other_products: Optional[List[SystemUserProductData]] = None
    contact_number: Optional[str] = None
    dependents: Optional[List[DependentData]] = None
    unread_message_count: int = 0
    pending_feedback_ids: Optional[List[int]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConfirmOtpResponse(ApiServiceResponse):
    data: Optional[LoginData] = None
    must_set_pin: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConfirmOtp(ApiServiceRequest):
    system_user_id: int = 0
    otp: Optional[str] = None
    utc_offset: int = 0

Python ConfirmOtp 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 /xml/reply/ConfirmOtp HTTP/1.1 
Host: galaxymobile.api.dev.86degrees.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ConfirmOtp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</ApiKey>
  <Latitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Latitude>
  <Longitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Longitude>
  <Otp>String</Otp>
  <SystemUserId>0</SystemUserId>
  <UtcOffset>0</UtcOffset>
</ConfirmOtp>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ConfirmOtpResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
  <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>
  <Data>
    <AllProducts>
      <SystemUserProductData>
        <ActionUrl>String</ActionUrl>
        <Attachments>
          <SystemUserProductAttachmentData>
            <FileName>String</FileName>
            <Id>0</Id>
            <IsImage>false</IsImage>
            <IsPdf>false</IsPdf>
            <IsVideo>false</IsVideo>
            <MainFileUrl>String</MainFileUrl>
            <ThumbnailUrl>String</ThumbnailUrl>
          </SystemUserProductAttachmentData>
        </Attachments>
        <DashImage>String</DashImage>
        <DescriptionAfr>String</DescriptionAfr>
        <DescriptionEng>String</DescriptionEng>
        <Enquired>false</Enquired>
        <IntegrationType>None</IntegrationType>
        <Name>String</Name>
        <NameAfrikaans>String</NameAfrikaans>
        <PanicId>0</PanicId>
        <ProductId>0</ProductId>
        <ShowOnDash>false</ShowOnDash>
        <SummaryAfr>String</SummaryAfr>
        <SummaryEng>String</SummaryEng>
        <UserHasProduct>false</UserHasProduct>
      </SystemUserProductData>
    </AllProducts>
    <Dependents>
      <DependentData>
        <DependentId>0</DependentId>
        <Email>String</Email>
        <FirstName>String</FirstName>
        <IdNumber>String</IdNumber>
        <MobileNumber>String</MobileNumber>
        <Surname>String</Surname>
      </DependentData>
    </Dependents>
    <FirstName>String</FirstName>
    <IsDependent>false</IsDependent>
    <OtherProducts>
      <SystemUserProductData>
        <ActionUrl>String</ActionUrl>
        <Attachments>
          <SystemUserProductAttachmentData>
            <FileName>String</FileName>
            <Id>0</Id>
            <IsImage>false</IsImage>
            <IsPdf>false</IsPdf>
            <IsVideo>false</IsVideo>
            <MainFileUrl>String</MainFileUrl>
            <ThumbnailUrl>String</ThumbnailUrl>
          </SystemUserProductAttachmentData>
        </Attachments>
        <DashImage>String</DashImage>
        <DescriptionAfr>String</DescriptionAfr>
        <DescriptionEng>String</DescriptionEng>
        <Enquired>false</Enquired>
        <IntegrationType>None</IntegrationType>
        <Name>String</Name>
        <NameAfrikaans>String</NameAfrikaans>
        <PanicId>0</PanicId>
        <ProductId>0</ProductId>
        <ShowOnDash>false</ShowOnDash>
        <SummaryAfr>String</SummaryAfr>
        <SummaryEng>String</SummaryEng>
        <UserHasProduct>false</UserHasProduct>
      </SystemUserProductData>
    </OtherProducts>
    <PendingFeedbackIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>0</d3p1:int>
    </PendingFeedbackIds>
    <RefreshToken>String</RefreshToken>
    <SystemUserId>0</SystemUserId>
    <UnreadMessageCount>0</UnreadMessageCount>
    <UserProducts>
      <SystemUserProductData>
        <ActionUrl>String</ActionUrl>
        <Attachments>
          <SystemUserProductAttachmentData>
            <FileName>String</FileName>
            <Id>0</Id>
            <IsImage>false</IsImage>
            <IsPdf>false</IsPdf>
            <IsVideo>false</IsVideo>
            <MainFileUrl>String</MainFileUrl>
            <ThumbnailUrl>String</ThumbnailUrl>
          </SystemUserProductAttachmentData>
        </Attachments>
        <DashImage>String</DashImage>
        <DescriptionAfr>String</DescriptionAfr>
        <DescriptionEng>String</DescriptionEng>
        <Enquired>false</Enquired>
        <IntegrationType>None</IntegrationType>
        <Name>String</Name>
        <NameAfrikaans>String</NameAfrikaans>
        <PanicId>0</PanicId>
        <ProductId>0</ProductId>
        <ShowOnDash>false</ShowOnDash>
        <SummaryAfr>String</SummaryAfr>
        <SummaryEng>String</SummaryEng>
        <UserHasProduct>false</UserHasProduct>
      </SystemUserProductData>
    </UserProducts>
  </Data>
  <MustSetPin>false</MustSetPin>
</ConfirmOtpResponse>