| POST | /cmd/locations/devices/add |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Betting.WebApi.ServiceModel
Imports Betting.Common
Imports Starnet.Common
Namespace Global
Namespace Betting.Common
Public Enum DeviceManagement
Partner = 1
Platform = 2
End Enum
Public Partial Class DeviceProfile
Public Overridable Property UsageMode As DeviceUsageMode
Public Overridable Property UserInterface As DeviceUserInterface
Public Overridable Property Wallet As Ref
Public Overridable Property ManagedBy As DeviceManagement?
End Class
Public Enum DeviceUsageMode
ClerkServiced = 0
Personal = 1
SelfService = 2
Unknown = -1
End Enum
Public Enum DeviceUserInterface
Tablet = 0
Kiosk = 1
[Default] = 2
Unknown = -1
End Enum
End Namespace
Namespace Betting.WebApi.ServiceModel
Public Partial Class AddLocationDevice
Public Overridable Property Id As String
Public Overridable Property Device As Device
End Class
Public Partial Class Device
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property IsActive As Boolean
Public Overridable Property Profile As DeviceProfile
Public Overridable Property IntegrationsData As RecordDictionary(Of String, String)
End Class
End Namespace
Namespace Starnet.Common
Public Partial Class RecordDictionary(Of TKey, TVal)
Inherits Dictionary(Of TKey, TVal)
End Class
Public Partial Class Ref
Public Overridable Property Id As String
Public Overridable Property Val As String
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 /cmd/locations/devices/add HTTP/1.1
Host: api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String,
device:
{
id: String,
name: String,
isActive: False,
profile:
{
usageMode: 0,
userInterface: 0,
wallet:
{
id: String,
val: String
},
managedBy: 0
},
integrationsData:
{
String: String
}
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}