| POST | /upliftrequest/auth |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports WebService.AppApi.Models
Imports WebService.AppApi.Models.Base
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 UpliftRequestAuthRequest
Inherits ApiServiceRequest
Public Sub New()
Products = New List(Of UpliftRequestProductData)
End Sub
Public Overridable Property UpliftRequestOnDeviceId As Guid
Public Overridable Property OutletId As Integer
Public Overridable Property PrincipalId As Integer
Public Overridable Property TotalValue As Decimal
Public Overridable Property TotalUnits As Double
Public Overridable Property Region As String
Public Overridable Property Channel As String
Public Overridable Property Products As List(Of UpliftRequestProductData)
End Class
Public Partial Class UpliftRequestAuthRequestResponse
Inherits ApiServiceResponse
Public Overridable Property UpliftRequestAuthRequestId As Guid
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
End Namespace
VB.NET UpliftRequestAuthRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /upliftrequest/auth HTTP/1.1
Host: returnit-api-dev.happen.zone
Accept: application/json
Content-Type: application/json
Content-Length: length
{"OutletId":0,"PrincipalId":0,"TotalValue":0,"TotalUnits":0,"Region":"String","Channel":"String","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}],"ApiKey":"String","Latitude":0,"Longitude":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"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"}}}