| GET | /principal/get |
|---|
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
Namespace Global
Namespace WebService.ServiceModel
Public Partial Class GetPrincipal
Inherits ApiServiceRequest
Public Overridable Property PrincipalId As Integer
End Class
Public Partial Class GetPrincipalResponse
Inherits ApiServiceResponse
Public Overridable Property Data As PrincipalData
End Class
Public Partial Class PrincipalData
Public Sub New()
AuthLetterFileUrl = New List(Of String)
Products = New List(Of ProductDataCategory)
ProductExceptions = New List(Of ProductExceptionData)
End Sub
Public Overridable Property PrincipalId As Integer
Public Overridable Property Name As String
Public Overridable Property AuthLetterFileUrl As List(Of String)
Public Overridable Property LogoImageUrl As String
Public Overridable Property Products As List(Of ProductDataCategory)
Public Overridable Property UpliftPrefix As String
Public Overridable Property ContactName As String
Public Overridable Property ContactNumber As String
Public Overridable Property ContactEmail As String
Public Overridable Property AllowProductLookup As Boolean
Public Overridable Property HasLogo As Boolean
Public Overridable Property HasAuthLetter As Boolean
Public Overridable Property SealNetWeightMandatory As Boolean
Public Overridable Property AllowBillableSeals As Boolean
Public Overridable Property CaptureSerialNumber As Boolean
Public Overridable Property BatchCodesMandatory As Boolean
Public Overridable Property CaptureManufactureAndExpiryDate As Boolean
Public Overridable Property ProductExceptions As List(Of ProductExceptionData)
Public Overridable Property UsesOwnSealNumbers As Boolean
End Class
Public Partial Class ProductData
Public Overridable Property ProductId As Integer
Public Overridable Property PrincipalId As Integer
Public Overridable Property Name As String
Public Overridable Property Category As String
Public Overridable Property ProductCode As String
Public Overridable Property UnitBarcode As String
Public Overridable Property CartonQuantity As Integer
Public Overridable Property ShrinkQuantity As Integer
Public Overridable Property UnitQuantity As Integer
Public Overridable Property CartonMeasurement As String
Public Overridable Property ShrinkMeasurement As String
Public Overridable Property UnitMeasurement As String
Public Overridable Property CartonWeight As Double
Public Overridable Property ShrinkWeight As Double
Public Overridable Property UnitWeight As Decimal
Public Overridable Property CartonPrice As Decimal
Public Overridable Property ShrinkPrice As Decimal
Public Overridable Property UnitPrice As Decimal
Public Overridable Property MaxQuantity As Integer
Public Overridable Property MaxPrice As Integer
End Class
Public Partial Class ProductDataCategory
Public Sub New()
Products = New List(Of ProductData)
End Sub
Public Overridable Property UnitBarcode As String
Public Overridable Property Products As List(Of ProductData)
End Class
Public Partial Class ProductExceptionData
Public Sub New()
StockStatusIds = New List(Of Integer)
End Sub
Public Overridable Property Region As String
Public Overridable Property Channel As String
Public Overridable Property ProductId As Integer
Public Overridable Property StockStatusIds As List(Of Integer)
End Class
End Namespace
Namespace WebService.ServiceModel.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
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.
GET /principal/get HTTP/1.1 Host: antel.api.dev.86degrees.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
data:
{
principalId: 0,
name: String,
authLetterFileUrl:
[
String
],
logoImageUrl: String,
products:
[
{
unitBarcode: String,
products:
[
{
productId: 0,
principalId: 0,
name: String,
category: String,
productCode: String,
unitBarcode: String,
cartonQuantity: 0,
shrinkQuantity: 0,
unitQuantity: 0,
cartonMeasurement: String,
shrinkMeasurement: String,
unitMeasurement: String,
cartonWeight: 0,
shrinkWeight: 0,
unitWeight: 0,
cartonPrice: 0,
shrinkPrice: 0,
unitPrice: 0,
maxQuantity: 0,
maxPrice: 0
}
]
}
],
upliftPrefix: String,
contactName: String,
contactNumber: String,
contactEmail: String,
allowProductLookup: False,
hasLogo: False,
hasAuthLetter: False,
sealNetWeightMandatory: False,
allowBillableSeals: False,
captureSerialNumber: False,
batchCodesMandatory: False,
captureManufactureAndExpiryDate: False,
productExceptions:
[
{
region: String,
channel: String,
productId: 0,
stockStatusIds:
[
0
]
}
],
usesOwnSealNumbers: False
},
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
}
}
}