Antel Merchandiser App API

<back to all web services

GetPrincipal

Requires Authentication
The following routes are available for this service:
GET/principal/get
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class GetPrincipal extends ApiServiceRequest
    {
        public Integer PrincipalId = null;
        
        public Integer getPrincipalId() { return PrincipalId; }
        public GetPrincipal setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
    }

    public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
    {
        /**
        * The API Key required for authentication
        */
        @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
        public String ApiKey = null;

        /**
        * Latitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Latitude of the user making this request")
        public Double Latitude = null;

        /**
        * Longitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Longitude of the user making this request")
        public Double Longitude = null;
        
        public String getApiKey() { return ApiKey; }
        public ApiServiceRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public Double getLatitude() { return Latitude; }
        public ApiServiceRequest setLatitude(Double value) { this.Latitude = value; return this; }
        public Double getLongitude() { return Longitude; }
        public ApiServiceRequest setLongitude(Double value) { this.Longitude = value; return this; }
    }

    public static class GetPrincipalResponse extends ApiServiceResponse
    {
        public PrincipalData Data = null;
        
        public PrincipalData getData() { return Data; }
        public GetPrincipalResponse setData(PrincipalData value) { this.Data = value; return this; }
    }

    public static class ApiServiceResponse implements IServiceResponse
    {
        /**
        * Information about the response.
        */
        @ApiMember(Description="Information about the response.", IsRequired=true)
        public String Description = null;

        /**
        * Heading or summary of the response.
        */
        @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
        public String Heading = null;

        /**
        * Did the intended operation for this response complete successfully?
        */
        @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
        public Boolean WasSuccessful = null;

        public ResponseStatus ResponseStatus = null;
        
        public String getDescription() { return Description; }
        public ApiServiceResponse setDescription(String value) { this.Description = value; return this; }
        public String getHeading() { return Heading; }
        public ApiServiceResponse setHeading(String value) { this.Heading = value; return this; }
        public Boolean isWasSuccessful() { return WasSuccessful; }
        public ApiServiceResponse setWasSuccessful(Boolean value) { this.WasSuccessful = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ApiServiceResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class PrincipalData
    {
        public Integer PrincipalId = null;
        public String Name = null;
        public String LogoImageUrl = null;
        public ArrayList<ProductDataCategory> Products = null;
        public String UpliftPrefix = null;
        public String ContactName = null;
        public String ContactNumber = null;
        public String ContactEmail = null;
        public Boolean HasLogo = null;
        public Boolean AllowProductLookup = null;
        public Boolean CaptureSerialNumber = null;
        public Boolean ShowProductionDate = null;
        public Boolean ShowExpiryDate = null;
        public Boolean ShowBatchCode = null;
        public Boolean SealNumberPerProduct = null;
        public ArrayList<StockStatusData> AllowedProductStockStatuses = null;
        public Boolean Enabled = null;
        public Boolean ShowSealNumber = null;
        public Boolean ShowSealWeight = null;
        public Boolean ConsolidationEnabled = null;
        
        public Integer getPrincipalId() { return PrincipalId; }
        public PrincipalData setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
        public String getName() { return Name; }
        public PrincipalData setName(String value) { this.Name = value; return this; }
        public String getLogoImageUrl() { return LogoImageUrl; }
        public PrincipalData setLogoImageUrl(String value) { this.LogoImageUrl = value; return this; }
        public ArrayList<ProductDataCategory> getProducts() { return Products; }
        public PrincipalData setProducts(ArrayList<ProductDataCategory> value) { this.Products = value; return this; }
        public String getUpliftPrefix() { return UpliftPrefix; }
        public PrincipalData setUpliftPrefix(String value) { this.UpliftPrefix = value; return this; }
        public String getContactName() { return ContactName; }
        public PrincipalData setContactName(String value) { this.ContactName = value; return this; }
        public String getContactNumber() { return ContactNumber; }
        public PrincipalData setContactNumber(String value) { this.ContactNumber = value; return this; }
        public String getContactEmail() { return ContactEmail; }
        public PrincipalData setContactEmail(String value) { this.ContactEmail = value; return this; }
        public Boolean isHasLogo() { return HasLogo; }
        public PrincipalData setHasLogo(Boolean value) { this.HasLogo = value; return this; }
        public Boolean isAllowProductLookup() { return AllowProductLookup; }
        public PrincipalData setAllowProductLookup(Boolean value) { this.AllowProductLookup = value; return this; }
        public Boolean isCaptureSerialNumber() { return CaptureSerialNumber; }
        public PrincipalData setCaptureSerialNumber(Boolean value) { this.CaptureSerialNumber = value; return this; }
        public Boolean isShowProductionDate() { return ShowProductionDate; }
        public PrincipalData setShowProductionDate(Boolean value) { this.ShowProductionDate = value; return this; }
        public Boolean isShowExpiryDate() { return ShowExpiryDate; }
        public PrincipalData setShowExpiryDate(Boolean value) { this.ShowExpiryDate = value; return this; }
        public Boolean isShowBatchCode() { return ShowBatchCode; }
        public PrincipalData setShowBatchCode(Boolean value) { this.ShowBatchCode = value; return this; }
        public Boolean isSealNumberPerProduct() { return SealNumberPerProduct; }
        public PrincipalData setSealNumberPerProduct(Boolean value) { this.SealNumberPerProduct = value; return this; }
        public ArrayList<StockStatusData> getAllowedProductStockStatuses() { return AllowedProductStockStatuses; }
        public PrincipalData setAllowedProductStockStatuses(ArrayList<StockStatusData> value) { this.AllowedProductStockStatuses = value; return this; }
        public Boolean isEnabled() { return Enabled; }
        public PrincipalData setEnabled(Boolean value) { this.Enabled = value; return this; }
        public Boolean isShowSealNumber() { return ShowSealNumber; }
        public PrincipalData setShowSealNumber(Boolean value) { this.ShowSealNumber = value; return this; }
        public Boolean isShowSealWeight() { return ShowSealWeight; }
        public PrincipalData setShowSealWeight(Boolean value) { this.ShowSealWeight = value; return this; }
        public Boolean isConsolidationEnabled() { return ConsolidationEnabled; }
        public PrincipalData setConsolidationEnabled(Boolean value) { this.ConsolidationEnabled = value; return this; }
    }

    public static class ProductDataCategory
    {
        public String UnitBarcode = null;
        public ArrayList<ProductData> Products = null;
        
        public String getUnitBarcode() { return UnitBarcode; }
        public ProductDataCategory setUnitBarcode(String value) { this.UnitBarcode = value; return this; }
        public ArrayList<ProductData> getProducts() { return Products; }
        public ProductDataCategory setProducts(ArrayList<ProductData> value) { this.Products = value; return this; }
    }

    public static class ProductData
    {
        public Integer ProductId = null;
        public Integer PrincipalId = null;
        public String PrincipalPrefix = null;
        public String Name = null;
        public String Category = null;
        public String ProductCode = null;
        public String UnitBarcode = null;
        public Integer CartonQuantity = null;
        public Integer ShrinkQuantity = null;
        public Integer UnitQuantity = null;
        public String CartonMeasurement = null;
        public String ShrinkMeasurement = null;
        public String UnitMeasurement = null;
        public Double CartonWeight = null;
        public Double ShrinkWeight = null;
        public BigDecimal UnitWeight = null;
        public BigDecimal CartonPrice = null;
        public BigDecimal ShrinkPrice = null;
        public BigDecimal UnitPrice = null;
        public Integer UnitOfMeasureId = null;
        
        public Integer getProductId() { return ProductId; }
        public ProductData setProductId(Integer value) { this.ProductId = value; return this; }
        public Integer getPrincipalId() { return PrincipalId; }
        public ProductData setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
        public String getPrincipalPrefix() { return PrincipalPrefix; }
        public ProductData setPrincipalPrefix(String value) { this.PrincipalPrefix = value; return this; }
        public String getName() { return Name; }
        public ProductData setName(String value) { this.Name = value; return this; }
        public String getCategory() { return Category; }
        public ProductData setCategory(String value) { this.Category = value; return this; }
        public String getProductCode() { return ProductCode; }
        public ProductData setProductCode(String value) { this.ProductCode = value; return this; }
        public String getUnitBarcode() { return UnitBarcode; }
        public ProductData setUnitBarcode(String value) { this.UnitBarcode = value; return this; }
        public Integer getCartonQuantity() { return CartonQuantity; }
        public ProductData setCartonQuantity(Integer value) { this.CartonQuantity = value; return this; }
        public Integer getShrinkQuantity() { return ShrinkQuantity; }
        public ProductData setShrinkQuantity(Integer value) { this.ShrinkQuantity = value; return this; }
        public Integer getUnitQuantity() { return UnitQuantity; }
        public ProductData setUnitQuantity(Integer value) { this.UnitQuantity = value; return this; }
        public String getCartonMeasurement() { return CartonMeasurement; }
        public ProductData setCartonMeasurement(String value) { this.CartonMeasurement = value; return this; }
        public String getShrinkMeasurement() { return ShrinkMeasurement; }
        public ProductData setShrinkMeasurement(String value) { this.ShrinkMeasurement = value; return this; }
        public String getUnitMeasurement() { return UnitMeasurement; }
        public ProductData setUnitMeasurement(String value) { this.UnitMeasurement = value; return this; }
        public Double getCartonWeight() { return CartonWeight; }
        public ProductData setCartonWeight(Double value) { this.CartonWeight = value; return this; }
        public Double getShrinkWeight() { return ShrinkWeight; }
        public ProductData setShrinkWeight(Double value) { this.ShrinkWeight = value; return this; }
        public BigDecimal getUnitWeight() { return UnitWeight; }
        public ProductData setUnitWeight(BigDecimal value) { this.UnitWeight = value; return this; }
        public BigDecimal getCartonPrice() { return CartonPrice; }
        public ProductData setCartonPrice(BigDecimal value) { this.CartonPrice = value; return this; }
        public BigDecimal getShrinkPrice() { return ShrinkPrice; }
        public ProductData setShrinkPrice(BigDecimal value) { this.ShrinkPrice = value; return this; }
        public BigDecimal getUnitPrice() { return UnitPrice; }
        public ProductData setUnitPrice(BigDecimal value) { this.UnitPrice = value; return this; }
        public Integer getUnitOfMeasureId() { return UnitOfMeasureId; }
        public ProductData setUnitOfMeasureId(Integer value) { this.UnitOfMeasureId = value; return this; }
    }

    public static class StockStatusData
    {
        public Integer Id = null;
        public String Name = null;
        public Boolean PhotoRequired = null;
        public Boolean BatchCodeMandatory = null;
        public String Color = null;
        
        public Integer getId() { return Id; }
        public StockStatusData setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public StockStatusData setName(String value) { this.Name = value; return this; }
        public Boolean isPhotoRequired() { return PhotoRequired; }
        public StockStatusData setPhotoRequired(Boolean value) { this.PhotoRequired = value; return this; }
        public Boolean isBatchCodeMandatory() { return BatchCodeMandatory; }
        public StockStatusData setBatchCodeMandatory(Boolean value) { this.BatchCodeMandatory = value; return this; }
        public String getColor() { return Color; }
        public StockStatusData setColor(String value) { this.Color = value; return this; }
    }

}

Java GetPrincipal DTOs

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

HTTP + 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>