| POST | /upliftrequest |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class SaveUpliftRequest extends ApiServiceRequest
{
public UpliftRequestData UpliftRequest = null;
public UpliftRequestData getUpliftRequest() { return UpliftRequest; }
public SaveUpliftRequest setUpliftRequest(UpliftRequestData value) { this.UpliftRequest = 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 UpliftRequestData
{
public Integer UpliftRequestId = null;
public UUID Id = null;
public Integer OutletId = null;
public ArrayList<UpliftRequestProductData> Products = null;
public String OutletEmailAddress = null;
public String OutletContactName = null;
public String OutletChannel = null;
public String OutletRegion = null;
public String AdditionalNotes = null;
public Object MerchandiserSignatureImage = null;
public String StartTime = null;
public Double StartLatitude = null;
public Double StartLongitude = null;
public String EndTime = null;
public Double EndLatitude = null;
public Double EndLongitude = null;
public Date LastUpdated = null;
public Date LastSynced = null;
public String IncompleteUpliftRequestId = null;
public UUID AuthRequestId = null;
public Boolean Authorised = null;
public Integer PrincipalId = null;
public ArrayList<SealData> Seals = null;
public Boolean Confirmed = null;
public Boolean Cancelled = null;
public ArrayList<Object> Images = null;
public Boolean SubmitImmediately = null;
public Integer getUpliftRequestId() { return UpliftRequestId; }
public UpliftRequestData setUpliftRequestId(Integer value) { this.UpliftRequestId = value; return this; }
public UUID getId() { return Id; }
public UpliftRequestData setId(UUID value) { this.Id = value; return this; }
public Integer getOutletId() { return OutletId; }
public UpliftRequestData setOutletId(Integer value) { this.OutletId = value; return this; }
public ArrayList<UpliftRequestProductData> getProducts() { return Products; }
public UpliftRequestData setProducts(ArrayList<UpliftRequestProductData> value) { this.Products = value; return this; }
public String getOutletEmailAddress() { return OutletEmailAddress; }
public UpliftRequestData setOutletEmailAddress(String value) { this.OutletEmailAddress = value; return this; }
public String getOutletContactName() { return OutletContactName; }
public UpliftRequestData setOutletContactName(String value) { this.OutletContactName = value; return this; }
public String getOutletChannel() { return OutletChannel; }
public UpliftRequestData setOutletChannel(String value) { this.OutletChannel = value; return this; }
public String getOutletRegion() { return OutletRegion; }
public UpliftRequestData setOutletRegion(String value) { this.OutletRegion = value; return this; }
public String getAdditionalNotes() { return AdditionalNotes; }
public UpliftRequestData setAdditionalNotes(String value) { this.AdditionalNotes = value; return this; }
public Object getMerchandiserSignatureImage() { return MerchandiserSignatureImage; }
public UpliftRequestData setMerchandiserSignatureImage(Object value) { this.MerchandiserSignatureImage = value; return this; }
public String getStartTime() { return StartTime; }
public UpliftRequestData setStartTime(String value) { this.StartTime = value; return this; }
public Double getStartLatitude() { return StartLatitude; }
public UpliftRequestData setStartLatitude(Double value) { this.StartLatitude = value; return this; }
public Double getStartLongitude() { return StartLongitude; }
public UpliftRequestData setStartLongitude(Double value) { this.StartLongitude = value; return this; }
public String getEndTime() { return EndTime; }
public UpliftRequestData setEndTime(String value) { this.EndTime = value; return this; }
public Double getEndLatitude() { return EndLatitude; }
public UpliftRequestData setEndLatitude(Double value) { this.EndLatitude = value; return this; }
public Double getEndLongitude() { return EndLongitude; }
public UpliftRequestData setEndLongitude(Double value) { this.EndLongitude = value; return this; }
public Date getLastUpdated() { return LastUpdated; }
public UpliftRequestData setLastUpdated(Date value) { this.LastUpdated = value; return this; }
public Date getLastSynced() { return LastSynced; }
public UpliftRequestData setLastSynced(Date value) { this.LastSynced = value; return this; }
public String getIncompleteUpliftRequestId() { return IncompleteUpliftRequestId; }
public UpliftRequestData setIncompleteUpliftRequestId(String value) { this.IncompleteUpliftRequestId = value; return this; }
public UUID getAuthRequestId() { return AuthRequestId; }
public UpliftRequestData setAuthRequestId(UUID value) { this.AuthRequestId = value; return this; }
public Boolean isAuthorised() { return Authorised; }
public UpliftRequestData setAuthorised(Boolean value) { this.Authorised = value; return this; }
public Integer getPrincipalId() { return PrincipalId; }
public UpliftRequestData setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
public ArrayList<SealData> getSeals() { return Seals; }
public UpliftRequestData setSeals(ArrayList<SealData> value) { this.Seals = value; return this; }
public Boolean isConfirmed() { return Confirmed; }
public UpliftRequestData setConfirmed(Boolean value) { this.Confirmed = value; return this; }
public Boolean isCancelled() { return Cancelled; }
public UpliftRequestData setCancelled(Boolean value) { this.Cancelled = value; return this; }
public ArrayList<Object> getImages() { return Images; }
public UpliftRequestData setImages(ArrayList<Object> value) { this.Images = value; return this; }
public Boolean isSubmitImmediately() { return SubmitImmediately; }
public UpliftRequestData setSubmitImmediately(Boolean value) { this.SubmitImmediately = value; return this; }
}
public static class UpliftRequestProductData
{
public UUID Id = null;
public Integer UpliftRequestProductId = null;
public Integer ProductId = null;
public Integer PrincipalId = null;
public BigDecimal UnitPrice = null;
public String Name = null;
public String Category = null;
public String UnitBarcode = null;
public String UnitSize = null;
public BigDecimal UnitWeight = null;
public String Code = null;
public ArrayList<Object> Images = null;
public Double Quantity = null;
public BigDecimal Value = null;
public String ProductionDate = null;
public String ExpiryDate = null;
public String BatchCode = null;
public SealData Seal = null;
public String SerialNumber = null;
public Integer StockStatusId = null;
public String PrincipalLogoUrl = null;
public String PrincipalName = null;
public String StockStatusName = null;
public String StockStatusColor = null;
public Integer UnitOfMeasureId = null;
public UUID getId() { return Id; }
public UpliftRequestProductData setId(UUID value) { this.Id = value; return this; }
public Integer getUpliftRequestProductId() { return UpliftRequestProductId; }
public UpliftRequestProductData setUpliftRequestProductId(Integer value) { this.UpliftRequestProductId = value; return this; }
public Integer getProductId() { return ProductId; }
public UpliftRequestProductData setProductId(Integer value) { this.ProductId = value; return this; }
public Integer getPrincipalId() { return PrincipalId; }
public UpliftRequestProductData setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
public BigDecimal getUnitPrice() { return UnitPrice; }
public UpliftRequestProductData setUnitPrice(BigDecimal value) { this.UnitPrice = value; return this; }
public String getName() { return Name; }
public UpliftRequestProductData setName(String value) { this.Name = value; return this; }
public String getCategory() { return Category; }
public UpliftRequestProductData setCategory(String value) { this.Category = value; return this; }
public String getUnitBarcode() { return UnitBarcode; }
public UpliftRequestProductData setUnitBarcode(String value) { this.UnitBarcode = value; return this; }
public String getUnitSize() { return UnitSize; }
public UpliftRequestProductData setUnitSize(String value) { this.UnitSize = value; return this; }
public BigDecimal getUnitWeight() { return UnitWeight; }
public UpliftRequestProductData setUnitWeight(BigDecimal value) { this.UnitWeight = value; return this; }
public String getCode() { return Code; }
public UpliftRequestProductData setCode(String value) { this.Code = value; return this; }
public ArrayList<Object> getImages() { return Images; }
public UpliftRequestProductData setImages(ArrayList<Object> value) { this.Images = value; return this; }
public Double getQuantity() { return Quantity; }
public UpliftRequestProductData setQuantity(Double value) { this.Quantity = value; return this; }
public BigDecimal getValue() { return Value; }
public UpliftRequestProductData setValue(BigDecimal value) { this.Value = value; return this; }
public String getProductionDate() { return ProductionDate; }
public UpliftRequestProductData setProductionDate(String value) { this.ProductionDate = value; return this; }
public String getExpiryDate() { return ExpiryDate; }
public UpliftRequestProductData setExpiryDate(String value) { this.ExpiryDate = value; return this; }
public String getBatchCode() { return BatchCode; }
public UpliftRequestProductData setBatchCode(String value) { this.BatchCode = value; return this; }
public SealData getSeal() { return Seal; }
public UpliftRequestProductData setSeal(SealData value) { this.Seal = value; return this; }
public String getSerialNumber() { return SerialNumber; }
public UpliftRequestProductData setSerialNumber(String value) { this.SerialNumber = value; return this; }
public Integer getStockStatusId() { return StockStatusId; }
public UpliftRequestProductData setStockStatusId(Integer value) { this.StockStatusId = value; return this; }
public String getPrincipalLogoUrl() { return PrincipalLogoUrl; }
public UpliftRequestProductData setPrincipalLogoUrl(String value) { this.PrincipalLogoUrl = value; return this; }
public String getPrincipalName() { return PrincipalName; }
public UpliftRequestProductData setPrincipalName(String value) { this.PrincipalName = value; return this; }
public String getStockStatusName() { return StockStatusName; }
public UpliftRequestProductData setStockStatusName(String value) { this.StockStatusName = value; return this; }
public String getStockStatusColor() { return StockStatusColor; }
public UpliftRequestProductData setStockStatusColor(String value) { this.StockStatusColor = value; return this; }
public Integer getUnitOfMeasureId() { return UnitOfMeasureId; }
public UpliftRequestProductData setUnitOfMeasureId(Integer value) { this.UnitOfMeasureId = value; return this; }
}
public static class SealData extends Seal
{
}
public static class Seal
{
public String Number = null;
public Double Weight = null;
public String getNumber() { return Number; }
public Seal setNumber(String value) { this.Number = value; return this; }
public Double getWeight() { return Weight; }
public Seal setWeight(Double value) { this.Weight = value; return this; }
}
public static class SaveUpliftRequestResponse extends ApiServiceResponse
{
public ArrayList<Integer> UpliftRequestProductIds = null;
public UUID AuthRequestId = null;
public Integer UpliftRequestId = null;
public Boolean DeleteFromDevice = null;
public ArrayList<String> ImageIds = null;
public ArrayList<Integer> getUpliftRequestProductIds() { return UpliftRequestProductIds; }
public SaveUpliftRequestResponse setUpliftRequestProductIds(ArrayList<Integer> value) { this.UpliftRequestProductIds = value; return this; }
public UUID getAuthRequestId() { return AuthRequestId; }
public SaveUpliftRequestResponse setAuthRequestId(UUID value) { this.AuthRequestId = value; return this; }
public Integer getUpliftRequestId() { return UpliftRequestId; }
public SaveUpliftRequestResponse setUpliftRequestId(Integer value) { this.UpliftRequestId = value; return this; }
public Boolean isDeleteFromDevice() { return DeleteFromDevice; }
public SaveUpliftRequestResponse setDeleteFromDevice(Boolean value) { this.DeleteFromDevice = value; return this; }
public ArrayList<String> getImageIds() { return ImageIds; }
public SaveUpliftRequestResponse setImageIds(ArrayList<String> value) { this.ImageIds = 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; }
}
}
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.
POST /upliftrequest HTTP/1.1
Host: returnit-api-dev.happen.zone
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SaveUpliftRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models">
<ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">String</ApiKey>
<Latitude xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">0</Latitude>
<Longitude xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">0</Longitude>
<UpliftRequest>
<AdditionalNotes>String</AdditionalNotes>
<AuthRequestId>00000000-0000-0000-0000-000000000000</AuthRequestId>
<Authorised>false</Authorised>
<Cancelled>false</Cancelled>
<Confirmed>false</Confirmed>
<EndLatitude>0</EndLatitude>
<EndLongitude>0</EndLongitude>
<EndTime>String</EndTime>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Images xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:anyType />
</Images>
<IncompleteUpliftRequestId>String</IncompleteUpliftRequestId>
<LastSynced>0001-01-01T00:00:00</LastSynced>
<LastUpdated>0001-01-01T00:00:00</LastUpdated>
<MerchandiserSignatureImage />
<OutletChannel>String</OutletChannel>
<OutletContactName>String</OutletContactName>
<OutletEmailAddress>String</OutletEmailAddress>
<OutletId>0</OutletId>
<OutletRegion>String</OutletRegion>
<PrincipalId>0</PrincipalId>
<Products>
<UpliftRequestProductData>
<BatchCode>String</BatchCode>
<Category>String</Category>
<Code>String</Code>
<ExpiryDate>String</ExpiryDate>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Images xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:anyType />
</Images>
<Name>String</Name>
<PrincipalId>0</PrincipalId>
<PrincipalLogoUrl>String</PrincipalLogoUrl>
<PrincipalName>String</PrincipalName>
<ProductId>0</ProductId>
<ProductionDate>String</ProductionDate>
<Quantity>0</Quantity>
<Seal>
<Number xmlns="http://schemas.datacontract.org/2004/07/BusinessLogic.Entities">String</Number>
<Weight xmlns="http://schemas.datacontract.org/2004/07/BusinessLogic.Entities">0</Weight>
</Seal>
<SerialNumber>String</SerialNumber>
<StockStatusColor>String</StockStatusColor>
<StockStatusId>0</StockStatusId>
<StockStatusName>String</StockStatusName>
<UnitBarcode>String</UnitBarcode>
<UnitOfMeasureId>0</UnitOfMeasureId>
<UnitPrice>0</UnitPrice>
<UnitSize>String</UnitSize>
<UnitWeight>0</UnitWeight>
<UpliftRequestProductId>0</UpliftRequestProductId>
<Value>0</Value>
</UpliftRequestProductData>
</Products>
<Seals>
<SealData>
<Number xmlns="http://schemas.datacontract.org/2004/07/BusinessLogic.Entities">String</Number>
<Weight xmlns="http://schemas.datacontract.org/2004/07/BusinessLogic.Entities">0</Weight>
</SealData>
</Seals>
<StartLatitude>0</StartLatitude>
<StartLongitude>0</StartLongitude>
<StartTime>String</StartTime>
<SubmitImmediately>false</SubmitImmediately>
<UpliftRequestId>0</UpliftRequestId>
</UpliftRequest>
</SaveUpliftRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SaveUpliftRequestResponse 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>
<AuthRequestId>00000000-0000-0000-0000-000000000000</AuthRequestId>
<DeleteFromDevice>false</DeleteFromDevice>
<ImageIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</ImageIds>
<UpliftRequestId>0</UpliftRequestId>
<UpliftRequestProductIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</UpliftRequestProductIds>
</SaveUpliftRequestResponse>