Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports WebService.ServiceModel
Imports WebService.ServiceModel.Base
Imports CommonService.Api.Models.Base
Imports BusinessLogic.Entities
Namespace Global
Namespace BusinessLogic.Entities
<Flags>
Public Enum IntegrationProviderType
None = 0
EA = 1
IlluminaHubProtectMe = 2
MyLegalHand = 3
AccidentAngels = 4
EmergencyServices = 5
MightyMobile = 6
Pulsit = 7
Bolt = 8
End Enum
End Namespace
Namespace CommonService.Api.Models.Base
Public Partial Class ApiServiceResponse
Implements IServiceResponse
Public Overridable Property Description As String
Public Overridable Property Heading As String
Public Overridable Property WasSuccessful As Boolean
Public Overridable Property ModelState As Object
End Class
End Namespace
Namespace WebService.ServiceModel
Public Partial Class ConfirmOtp
Inherits ApiServiceRequest
Public Overridable Property SystemUserId As Integer
Public Overridable Property Otp As String
Public Overridable Property UtcOffset As Integer
End Class
Public Partial Class ConfirmOtpResponse
Inherits ApiServiceResponse
Public Overridable Property Data As LoginData
Public Overridable Property MustSetPin As Boolean
End Class
Public Partial Class DependentData
Public Overridable Property DependentId As Integer
Public Overridable Property FirstName As String
Public Overridable Property Surname As String
Public Overridable Property MobileNumber As String
Public Overridable Property Email As String
Public Overridable Property IdNumber As String
End Class
Public Partial Class LoginData
Public Sub New()
AllProducts = New List(Of SystemUserProductData)
UserProducts = New List(Of SystemUserProductData)
OtherProducts = New List(Of SystemUserProductData)
Dependents = New List(Of DependentData)
PendingFeedbackIds = New List(Of Integer)
End Sub
Public Overridable Property SystemUserId As Integer
Public Overridable Property RefreshToken As String
Public Overridable Property FirstName As String
Public Overridable Property IsDependent As Boolean
Public Overridable Property FullName As String
Public Overridable Property AllProducts As List(Of SystemUserProductData)
Public Overridable Property UserProducts As List(Of SystemUserProductData)
Public Overridable Property OtherProducts As List(Of SystemUserProductData)
Public Overridable Property ContactNumber As String
Public Overridable Property Dependents As List(Of DependentData)
Public Overridable Property UnreadMessageCount As Integer
Public Overridable Property PendingFeedbackIds As List(Of Integer)
End Class
Public Partial Class SystemUserProductAttachmentData
Public Overridable Property Id As Integer
Public Overridable Property FileName As String
Public Overridable Property MainFileUrl As String
Public Overridable Property ThumbnailUrl As String
Public Overridable Property IsVideo As Boolean
Public Overridable Property IsImage As Boolean
Public Overridable Property IsPdf As Boolean
End Class
Public Partial Class SystemUserProductData
Public Sub New()
Attachments = New List(Of SystemUserProductAttachmentData)
End Sub
Public Overridable Property IntegrationType As IntegrationProviderType
Public Overridable Property ProductId As Integer
Public Overridable Property Name As String
Public Overridable Property NameAfrikaans As String
Public Overridable Property PanicId As Long
Public Overridable Property UserHasProduct As Boolean
Public Overridable Property CanActivate As Boolean
Public Overridable Property Enquired As Boolean
Public Overridable Property DashImage As String
Public Overridable Property ShowOnDash As Boolean
Public Overridable Property ActionUrl As String
Public Overridable Property Attachments As List(Of SystemUserProductAttachmentData)
Public Overridable Property DescriptionEng As String
Public Overridable Property SummaryEng As String
Public Overridable Property DescriptionAfr As String
Public Overridable Property SummaryAfr As String
End Class
End Namespace
Namespace WebService.ServiceModel.Base
Public Partial Class ApiServiceRequest
Implements IServiceRequest
Implements IHasApiKey
Implements IHasDeviceInfo
Implements IHasClientId
'''<Summary>
'''The API Key required for authentication
'''</Summary>
<ApiMember(DataType:="string", Description:="The API Key required for authentication", IsRequired:=true)>
Public Overridable Property ApiKey As String
'''<Summary>
'''Latitude of the user making this request
'''</Summary>
<ApiMember(DataType:="double", Description:="Latitude of the user making this request")>
Public Overridable Property Latitude As Double
'''<Summary>
'''Longitude of the user making this request
'''</Summary>
<ApiMember(DataType:="double", Description:="Longitude of the user making this request")>
Public Overridable Property Longitude As Double
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/ConfirmOtp HTTP/1.1
Host: galaxymobile.api.dev.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SystemUserId: 0,
Otp: String,
UtcOffset: 0,
ApiKey: String,
Latitude: 0,
Longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Data:
{
SystemUserId: 0,
RefreshToken: String,
FirstName: String,
IsDependent: False,
FullName: String,
AllProducts:
[
{
IntegrationType: 0,
ProductId: 0,
Name: String,
NameAfrikaans: String,
PanicId: 0,
UserHasProduct: False,
CanActivate: False,
Enquired: False,
DashImage: String,
ShowOnDash: False,
ActionUrl: String,
Attachments:
[
{
Id: 0,
FileName: String,
MainFileUrl: String,
ThumbnailUrl: String,
IsVideo: False,
IsImage: False,
IsPdf: False
}
],
DescriptionEng: String,
SummaryEng: String,
DescriptionAfr: String,
SummaryAfr: String
}
],
UserProducts:
[
{
IntegrationType: 0,
ProductId: 0,
Name: String,
NameAfrikaans: String,
PanicId: 0,
UserHasProduct: False,
CanActivate: False,
Enquired: False,
DashImage: String,
ShowOnDash: False,
ActionUrl: String,
Attachments:
[
{
Id: 0,
FileName: String,
MainFileUrl: String,
ThumbnailUrl: String,
IsVideo: False,
IsImage: False,
IsPdf: False
}
],
DescriptionEng: String,
SummaryEng: String,
DescriptionAfr: String,
SummaryAfr: String
}
],
OtherProducts:
[
{
IntegrationType: 0,
ProductId: 0,
Name: String,
NameAfrikaans: String,
PanicId: 0,
UserHasProduct: False,
CanActivate: False,
Enquired: False,
DashImage: String,
ShowOnDash: False,
ActionUrl: String,
Attachments:
[
{
Id: 0,
FileName: String,
MainFileUrl: String,
ThumbnailUrl: String,
IsVideo: False,
IsImage: False,
IsPdf: False
}
],
DescriptionEng: String,
SummaryEng: String,
DescriptionAfr: String,
SummaryAfr: String
}
],
ContactNumber: String,
Dependents:
[
{
DependentId: 0,
FirstName: String,
Surname: String,
MobileNumber: String,
Email: String,
IdNumber: String
}
],
UnreadMessageCount: 0,
PendingFeedbackIds:
[
0
]
},
MustSetPin: False,
Description: String,
Heading: String,
WasSuccessful: False,
ModelState: {}
}