| 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 .other suffix or ?format=other
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/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}}}