| 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 ArrayList<String> authLetterFileUrl = 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 allowProductLookup = null;
public Boolean hasLogo = null;
public Boolean hasAuthLetter = null;
public Boolean sealNetWeightMandatory = null;
public Boolean allowBillableSeals = null;
public Boolean captureSerialNumber = null;
public Boolean batchCodesMandatory = null;
public Boolean captureManufactureAndExpiryDate = null;
public ArrayList<ProductExceptionData> productExceptions = null;
public Boolean usesOwnSealNumbers = 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 ArrayList<String> getAuthLetterFileUrl() { return authLetterFileUrl; }
public PrincipalData setAuthLetterFileUrl(ArrayList<String> value) { this.authLetterFileUrl = 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 isAllowProductLookup() { return allowProductLookup; }
public PrincipalData setAllowProductLookup(Boolean value) { this.allowProductLookup = value; return this; }
public Boolean isHasLogo() { return hasLogo; }
public PrincipalData setHasLogo(Boolean value) { this.hasLogo = value; return this; }
public Boolean isHasAuthLetter() { return hasAuthLetter; }
public PrincipalData setHasAuthLetter(Boolean value) { this.hasAuthLetter = value; return this; }
public Boolean isSealNetWeightMandatory() { return sealNetWeightMandatory; }
public PrincipalData setSealNetWeightMandatory(Boolean value) { this.sealNetWeightMandatory = value; return this; }
public Boolean isAllowBillableSeals() { return allowBillableSeals; }
public PrincipalData setAllowBillableSeals(Boolean value) { this.allowBillableSeals = value; return this; }
public Boolean isCaptureSerialNumber() { return captureSerialNumber; }
public PrincipalData setCaptureSerialNumber(Boolean value) { this.captureSerialNumber = value; return this; }
public Boolean isBatchCodesMandatory() { return batchCodesMandatory; }
public PrincipalData setBatchCodesMandatory(Boolean value) { this.batchCodesMandatory = value; return this; }
public Boolean isCaptureManufactureAndExpiryDate() { return captureManufactureAndExpiryDate; }
public PrincipalData setCaptureManufactureAndExpiryDate(Boolean value) { this.captureManufactureAndExpiryDate = value; return this; }
public ArrayList<ProductExceptionData> getProductExceptions() { return productExceptions; }
public PrincipalData setProductExceptions(ArrayList<ProductExceptionData> value) { this.productExceptions = value; return this; }
public Boolean isUsesOwnSealNumbers() { return usesOwnSealNumbers; }
public PrincipalData setUsesOwnSealNumbers(Boolean value) { this.usesOwnSealNumbers = 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 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 maxQuantity = null;
public Integer maxPrice = 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 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 getMaxQuantity() { return maxQuantity; }
public ProductData setMaxQuantity(Integer value) { this.maxQuantity = value; return this; }
public Integer getMaxPrice() { return maxPrice; }
public ProductData setMaxPrice(Integer value) { this.maxPrice = value; return this; }
}
public static class ProductExceptionData
{
public String region = null;
public String channel = null;
public Integer productId = null;
public ArrayList<Integer> stockStatusIds = null;
public String getRegion() { return region; }
public ProductExceptionData setRegion(String value) { this.region = value; return this; }
public String getChannel() { return channel; }
public ProductExceptionData setChannel(String value) { this.channel = value; return this; }
public Integer getProductId() { return productId; }
public ProductExceptionData setProductId(Integer value) { this.productId = value; return this; }
public ArrayList<Integer> getStockStatusIds() { return stockStatusIds; }
public ProductExceptionData setStockStatusIds(ArrayList<Integer> value) { this.stockStatusIds = value; return this; }
}
}
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: antel.api.dev.86degrees.com 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.ServiceModel">
<Description xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</Description>
<Heading xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</Heading>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.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.ServiceModel.Base">false</WasSuccessful>
<Data>
<AllowBillableSeals>false</AllowBillableSeals>
<AllowProductLookup>false</AllowProductLookup>
<AuthLetterFileUrl xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</AuthLetterFileUrl>
<BatchCodesMandatory>false</BatchCodesMandatory>
<CaptureManufactureAndExpiryDate>false</CaptureManufactureAndExpiryDate>
<CaptureSerialNumber>false</CaptureSerialNumber>
<ContactEmail>String</ContactEmail>
<ContactName>String</ContactName>
<ContactNumber>String</ContactNumber>
<HasAuthLetter>false</HasAuthLetter>
<HasLogo>false</HasLogo>
<LogoImageUrl>String</LogoImageUrl>
<Name>String</Name>
<PrincipalId>0</PrincipalId>
<ProductExceptions>
<ProductExceptionData>
<Channel>String</Channel>
<ProductId>0</ProductId>
<Region>String</Region>
<StockStatusIds xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</StockStatusIds>
</ProductExceptionData>
</ProductExceptions>
<Products>
<ProductDataCategory>
<Products>
<ProductData>
<CartonMeasurement>String</CartonMeasurement>
<CartonPrice>0</CartonPrice>
<CartonQuantity>0</CartonQuantity>
<CartonWeight>0</CartonWeight>
<Category>String</Category>
<MaxPrice>0</MaxPrice>
<MaxQuantity>0</MaxQuantity>
<Name>String</Name>
<PrincipalId>0</PrincipalId>
<ProductCode>String</ProductCode>
<ProductId>0</ProductId>
<ShrinkMeasurement>String</ShrinkMeasurement>
<ShrinkPrice>0</ShrinkPrice>
<ShrinkQuantity>0</ShrinkQuantity>
<ShrinkWeight>0</ShrinkWeight>
<UnitBarcode>String</UnitBarcode>
<UnitMeasurement>String</UnitMeasurement>
<UnitPrice>0</UnitPrice>
<UnitQuantity>0</UnitQuantity>
<UnitWeight>0</UnitWeight>
</ProductData>
</Products>
<UnitBarcode>String</UnitBarcode>
</ProductDataCategory>
</Products>
<SealNetWeightMandatory>false</SealNetWeightMandatory>
<UpliftPrefix>String</UpliftPrefix>
<UsesOwnSealNumbers>false</UsesOwnSealNumbers>
</Data>
</GetPrincipalResponse>