Antel Merchandiser App API

<back to all web services

GetPrincipal

Requires Authentication
The following routes are available for this service:
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

VB.NET GetPrincipal DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Data":{"PrincipalId":0,"Name":"String","LogoImageUrl":"String","Products":[{"UnitBarcode":"String","Products":[{"ProductId":0,"PrincipalId":0,"PrincipalPrefix":"String","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,"UnitOfMeasureId":0}]}],"UpliftPrefix":"String","ContactName":"String","ContactNumber":"String","ContactEmail":"String","HasLogo":false,"AllowProductLookup":false,"CaptureSerialNumber":false,"ShowProductionDate":false,"ShowExpiryDate":false,"ShowBatchCode":false,"SealNumberPerProduct":false,"AllowedProductStockStatuses":[{"Id":0,"Name":"String","PhotoRequired":false,"BatchCodeMandatory":false,"Color":"String"}],"Enabled":false,"ShowSealNumber":false,"ShowSealWeight":false,"ConsolidationEnabled":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"}}}