| POST | /sync/saveincompleteuplift |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports WebService.ServiceModel
Imports WebService.AppApi.Models.Base
Imports WebService.AppApi.Models
Imports BusinessLogic.Entities
Namespace Global
Namespace BusinessLogic.Entities
Public Partial Class Seal
Public Overridable Property Number As String
Public Overridable Property Weight As Double
End Class
End Namespace
Namespace WebService.AppApi.Models
Public Partial Class SealData
Inherits Seal
End Class
Public Partial Class UpliftRequestData
Public Sub New()
Products = New List(Of UpliftRequestProductData)
Seals = New List(Of SealData)
Images = New List(Of Object)
End Sub
Public Overridable Property UpliftRequestId As Integer
Public Overridable Property Id As Guid
Public Overridable Property OutletId As Integer
Public Overridable Property Products As List(Of UpliftRequestProductData)
Public Overridable Property OutletEmailAddress As String
Public Overridable Property OutletContactName As String
Public Overridable Property OutletChannel As String
Public Overridable Property OutletRegion As String
Public Overridable Property AdditionalNotes As String
Public Overridable Property MerchandiserSignatureImage As Object
Public Overridable Property StartTime As String
Public Overridable Property StartLatitude As Double
Public Overridable Property StartLongitude As Double
Public Overridable Property EndTime As String
Public Overridable Property EndLatitude As Double
Public Overridable Property EndLongitude As Double
Public Overridable Property LastUpdated As Date
Public Overridable Property LastSynced As Date
Public Overridable Property IncompleteUpliftRequestId As String
Public Overridable Property AuthRequestId As Guid
Public Overridable Property Authorised As Boolean
Public Overridable Property PrincipalId As Integer
Public Overridable Property Seals As List(Of SealData)
Public Overridable Property Confirmed As Boolean
Public Overridable Property Cancelled As Boolean
Public Overridable Property Images As List(Of Object)
Public Overridable Property SubmitImmediately As Boolean
End Class
Public Partial Class UpliftRequestProductData
Public Sub New()
Images = New List(Of Object)
End Sub
Public Overridable Property Id As Guid
Public Overridable Property UpliftRequestProductId As Integer
Public Overridable Property ProductId As Integer
Public Overridable Property PrincipalId As Integer
Public Overridable Property UnitPrice As Decimal
Public Overridable Property Name As String
Public Overridable Property Category As String
Public Overridable Property UnitBarcode As String
Public Overridable Property UnitSize As String
Public Overridable Property UnitWeight As Decimal
Public Overridable Property Code As String
Public Overridable Property Images As List(Of Object)
Public Overridable Property Quantity As Double
Public Overridable Property Value As Decimal
Public Overridable Property ProductionDate As String
Public Overridable Property ExpiryDate As String
Public Overridable Property BatchCode As String
Public Overridable Property Seal As SealData
Public Overridable Property SerialNumber As String
Public Overridable Property StockStatusId As Integer
Public Overridable Property PrincipalLogoUrl As String
Public Overridable Property PrincipalName As String
Public Overridable Property StockStatusName As String
Public Overridable Property StockStatusColor As String
Public Overridable Property UnitOfMeasureId As Integer
End Class
End Namespace
Namespace WebService.AppApi.Models.Base
Public Partial Class ApiServiceRequest
Implements IServiceRequest
Implements IHasApiKey
Implements IHasDeviceInfo
'''<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
Public Partial Class ApiServiceResponse
Implements IServiceResponse
'''<Summary>
'''Information about the response.
'''</Summary>
<ApiMember(Description:="Information about the response.", IsRequired:=true)>
Public Overridable Property Description As String
'''<Summary>
'''Heading or summary of the response.
'''</Summary>
<ApiMember(Description:="Heading or summary of the response.", IsRequired:=true)>
Public Overridable Property Heading As String
'''<Summary>
'''Did the intended operation for this response complete successfully?
'''</Summary>
<ApiMember(DataType:="boolean", Description:="Did the intended operation for this response complete successfully?", IsRequired:=true)>
Public Overridable Property WasSuccessful As Boolean
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
Namespace WebService.ServiceModel
Public Partial Class SaveIncompleteUpliftRequest
Inherits ApiServiceRequest
Public Sub New()
ImageIdsOnDevice = New List(Of String)
End Sub
Public Overridable Property IncompleteUpliftRequestId As Guid
Public Overridable Property ImageIdsOnDevice As List(Of String)
Public Overridable Property UpliftRequestData As UpliftRequestData
End Class
Public Partial Class SaveIncompleteUpliftRequestResponse
Inherits ApiServiceResponse
Public Sub New()
ImageIds = New List(Of String)
End Sub
Public Overridable Property ImageIds As List(Of String)
End Class
End Namespace
End Namespace
VB.NET SaveIncompleteUpliftRequest DTOs
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 /sync/saveincompleteuplift HTTP/1.1
Host: returnit-api-dev.happen.zone
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ImageIdsOnDevice:
[
String
],
UpliftRequestData:
{
UpliftRequestId: 0,
OutletId: 0,
Products:
[
{
UpliftRequestProductId: 0,
ProductId: 0,
PrincipalId: 0,
UnitPrice: 0,
Name: String,
Category: String,
UnitBarcode: String,
UnitSize: String,
UnitWeight: 0,
Code: String,
Images:
[
{
}
],
Quantity: 0,
Value: 0,
ProductionDate: String,
ExpiryDate: String,
BatchCode: String,
Seal:
{
Number: String,
Weight: 0
},
SerialNumber: String,
StockStatusId: 0,
PrincipalLogoUrl: String,
PrincipalName: String,
StockStatusName: String,
StockStatusColor: String,
UnitOfMeasureId: 0
}
],
OutletEmailAddress: String,
OutletContactName: String,
OutletChannel: String,
OutletRegion: String,
AdditionalNotes: String,
MerchandiserSignatureImage: {},
StartTime: String,
StartLatitude: 0,
StartLongitude: 0,
EndTime: String,
EndLatitude: 0,
EndLongitude: 0,
LastUpdated: 0001-01-01,
LastSynced: 0001-01-01,
IncompleteUpliftRequestId: String,
Authorised: False,
PrincipalId: 0,
Seals:
[
{
Number: String,
Weight: 0
}
],
Confirmed: False,
Cancelled: False,
Images:
[
{
}
],
SubmitImmediately: False
},
ApiKey: String,
Latitude: 0,
Longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ImageIds:
[
String
],
Description: String,
Heading: String,
WasSuccessful: False,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}