| GET | /principal/get |
|---|
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
Namespace Global
Namespace WebService.AppApi.Models
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()
Products = New List(Of ProductDataCategory)
AllowedProductStockStatuses = New List(Of StockStatusData)
End Sub
Public Overridable Property PrincipalId As Integer
Public Overridable Property Name As 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 HasLogo As Boolean
Public Overridable Property AllowProductLookup As Boolean
Public Overridable Property CaptureSerialNumber As Boolean
Public Overridable Property ShowProductionDate As Boolean
Public Overridable Property ShowExpiryDate As Boolean
Public Overridable Property ShowBatchCode As Boolean
Public Overridable Property SealNumberPerProduct As Boolean
Public Overridable Property AllowedProductStockStatuses As List(Of StockStatusData)
Public Overridable Property Enabled As Boolean
Public Overridable Property ShowSealNumber As Boolean
Public Overridable Property ShowSealWeight As Boolean
Public Overridable Property ConsolidationEnabled As Boolean
End Class
Public Partial Class ProductData
Public Overridable Property ProductId As Integer
Public Overridable Property PrincipalId As Integer
Public Overridable Property PrincipalPrefix As String
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 UnitOfMeasureId 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 StockStatusData
Public Overridable Property Id As Integer
Public Overridable Property Name As String
Public Overridable Property PhotoRequired As Boolean
Public Overridable Property BatchCodeMandatory As Boolean
Public Overridable Property Color As String
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
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: returnit-api-dev.happen.zone Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetPrincipalResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models">
<Description xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">String</Description>
<Heading xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">String</Heading>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">false</WasSuccessful>
<Data>
<AllowProductLookup>false</AllowProductLookup>
<AllowedProductStockStatuses>
<StockStatusData>
<BatchCodeMandatory>false</BatchCodeMandatory>
<Color>String</Color>
<Id>0</Id>
<Name>String</Name>
<PhotoRequired>false</PhotoRequired>
</StockStatusData>
</AllowedProductStockStatuses>
<CaptureSerialNumber>false</CaptureSerialNumber>
<ConsolidationEnabled>false</ConsolidationEnabled>
<ContactEmail>String</ContactEmail>
<ContactName>String</ContactName>
<ContactNumber>String</ContactNumber>
<Enabled>false</Enabled>
<HasLogo>false</HasLogo>
<LogoImageUrl>String</LogoImageUrl>
<Name>String</Name>
<PrincipalId>0</PrincipalId>
<Products>
<ProductDataCategory>
<Products>
<ProductData>
<CartonMeasurement>String</CartonMeasurement>
<CartonPrice>0</CartonPrice>
<CartonQuantity>0</CartonQuantity>
<CartonWeight>0</CartonWeight>
<Category>String</Category>
<Name>String</Name>
<PrincipalId>0</PrincipalId>
<PrincipalPrefix>String</PrincipalPrefix>
<ProductCode>String</ProductCode>
<ProductId>0</ProductId>
<ShrinkMeasurement>String</ShrinkMeasurement>
<ShrinkPrice>0</ShrinkPrice>
<ShrinkQuantity>0</ShrinkQuantity>
<ShrinkWeight>0</ShrinkWeight>
<UnitBarcode>String</UnitBarcode>
<UnitMeasurement>String</UnitMeasurement>
<UnitOfMeasureId>0</UnitOfMeasureId>
<UnitPrice>0</UnitPrice>
<UnitQuantity>0</UnitQuantity>
<UnitWeight>0</UnitWeight>
</ProductData>
</Products>
<UnitBarcode>String</UnitBarcode>
</ProductDataCategory>
</Products>
<SealNumberPerProduct>false</SealNumberPerProduct>
<ShowBatchCode>false</ShowBatchCode>
<ShowExpiryDate>false</ShowExpiryDate>
<ShowProductionDate>false</ShowProductionDate>
<ShowSealNumber>false</ShowSealNumber>
<ShowSealWeight>false</ShowSealWeight>
<UpliftPrefix>String</UpliftPrefix>
</Data>
</GetPrincipalResponse>