| GET | /dealers/order/tracking | Retrieves tracking numbers based on order number. |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class GetOrderTracking extends AuthenticatedRequest
{
/**
* Order number to retrieve tracking for.
*/
@ApiMember(Description="Order number to retrieve tracking for.", IsRequired=true)
public String OrderNumber = null;
public String getOrderNumber() { return OrderNumber; }
public GetOrderTracking setOrderNumber(String value) { this.OrderNumber = value; return this; }
}
public static class AuthenticatedRequest
{
/**
* Session token received from successful authentication.
*/
@ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query")
public String SessionToken = null;
public String getSessionToken() { return SessionToken; }
public AuthenticatedRequest setSessionToken(String value) { this.SessionToken = value; return this; }
}
public static class OrderTrackingResponse extends OperationResult_1<OrderTrackingResult>
{
}
public static class OperationResult_1<T> extends OperationResult
{
/**
* Result value
*/
@ApiMember(Description="Result value", ParameterType="model")
public PartResults Result = null;
public PartResults getResult() { return Result; }
public OperationResult_1<T> setResult(PartResults value) { this.Result = value; return this; }
}
public static class OperationResult
{
/**
* Specifies if the operation was successful.
*/
@ApiMember(Description="Specifies if the operation was successful.", ParameterType="model")
public Boolean IsSuccessful = null;
/**
* States error message in case of unsuccessful operation.
*/
@ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model")
public String ErrorMessage = null;
public Boolean getIsSuccessful() { return IsSuccessful; }
public OperationResult setIsSuccessful(Boolean value) { this.IsSuccessful = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public OperationResult setErrorMessage(String value) { this.ErrorMessage = value; return this; }
}
public static class PartResults
{
/**
* Total number of parts available.
*/
@ApiMember(Description="Total number of parts available.")
public Integer TotalNumberOfParts = null;
/**
* Indication if there are more parts to retrieve.
*/
@ApiMember(Description="Indication if there are more parts to retrieve.")
public Boolean HasMoreRecords = null;
/**
* Part records.
*/
@ApiMember(Description="Part records.")
public ArrayList<PartInfoResult> Parts = null;
public Integer getTotalNumberOfParts() { return TotalNumberOfParts; }
public PartResults setTotalNumberOfParts(Integer value) { this.TotalNumberOfParts = value; return this; }
public Boolean isHasMoreRecords() { return HasMoreRecords; }
public PartResults setHasMoreRecords(Boolean value) { this.HasMoreRecords = value; return this; }
public ArrayList<PartInfoResult> getParts() { return Parts; }
public PartResults setParts(ArrayList<PartInfoResult> value) { this.Parts = value; return this; }
}
public static class PartInfoResult
{
/**
* Unique ID for the part.
*/
@ApiMember(Description="Unique ID for the part.")
public Integer Id = null;
/**
* Part number.
*/
@ApiMember(Description="Part number.")
public String PartNumber = null;
/**
* Description of the part.
*/
@ApiMember(Description="Description of the part.")
public String Description = null;
/**
* Part manufacturer.
*/
@ApiMember(Description="Part manufacturer.")
public String Manufacturer = null;
/**
* Determines if the part can be ordered.
*/
@ApiMember(Description="Determines if the part can be ordered.")
public Boolean CanBeOrdered = null;
/**
* Textual representation of the status of the part.
*/
@ApiMember(Description="Textual representation of the status of the part.")
public String StatusText = null;
/**
* Available stock to order.
*/
@ApiMember(Description="Available stock to order.")
public Integer AvailableStockQuantity = null;
/**
* Average days needed for delivery.
*/
@ApiMember(Description="Average days needed for delivery.")
public Integer AverageDeliveryInDays = null;
/**
* Price of a single unit, excluding VAT.
*/
@ApiMember(Description="Price of a single unit, excluding VAT.")
public BigDecimal UnitPrice = null;
/**
* EAN number.
*/
@ApiMember(Description="EAN number.")
public String EanNumber = null;
/**
* Images
*/
@ApiMember(Description="Images")
public ArrayList<PartInfoResultImage> Images = null;
/**
* Secondary article numbers
*/
@ApiMember(Description="Secondary article numbers")
public ArrayList<String> SecondaryArticleNumbers = null;
/**
* Replacement article numbers
*/
@ApiMember(Description="Replacement article numbers")
public ArrayList<String> ReplacementArticleNumbers = null;
/**
* Stock quantities
*/
@ApiMember(Description="Stock quantities")
public ArrayList<PartStockQuantity> StockQuantities = null;
public Integer getId() { return Id; }
public PartInfoResult setId(Integer value) { this.Id = value; return this; }
public String getPartNumber() { return PartNumber; }
public PartInfoResult setPartNumber(String value) { this.PartNumber = value; return this; }
public String getDescription() { return Description; }
public PartInfoResult setDescription(String value) { this.Description = value; return this; }
public String getManufacturer() { return Manufacturer; }
public PartInfoResult setManufacturer(String value) { this.Manufacturer = value; return this; }
public Boolean isCanBeOrdered() { return CanBeOrdered; }
public PartInfoResult setCanBeOrdered(Boolean value) { this.CanBeOrdered = value; return this; }
public String getStatusText() { return StatusText; }
public PartInfoResult setStatusText(String value) { this.StatusText = value; return this; }
public Integer getAvailableStockQuantity() { return AvailableStockQuantity; }
public PartInfoResult setAvailableStockQuantity(Integer value) { this.AvailableStockQuantity = value; return this; }
public Integer getAverageDeliveryInDays() { return AverageDeliveryInDays; }
public PartInfoResult setAverageDeliveryInDays(Integer value) { this.AverageDeliveryInDays = value; return this; }
public BigDecimal getUnitPrice() { return UnitPrice; }
public PartInfoResult setUnitPrice(BigDecimal value) { this.UnitPrice = value; return this; }
public String getEanNumber() { return EanNumber; }
public PartInfoResult setEanNumber(String value) { this.EanNumber = value; return this; }
public ArrayList<PartInfoResultImage> getImages() { return Images; }
public PartInfoResult setImages(ArrayList<PartInfoResultImage> value) { this.Images = value; return this; }
public ArrayList<String> getSecondaryArticleNumbers() { return SecondaryArticleNumbers; }
public PartInfoResult setSecondaryArticleNumbers(ArrayList<String> value) { this.SecondaryArticleNumbers = value; return this; }
public ArrayList<String> getReplacementArticleNumbers() { return ReplacementArticleNumbers; }
public PartInfoResult setReplacementArticleNumbers(ArrayList<String> value) { this.ReplacementArticleNumbers = value; return this; }
public ArrayList<PartStockQuantity> getStockQuantities() { return StockQuantities; }
public PartInfoResult setStockQuantities(ArrayList<PartStockQuantity> value) { this.StockQuantities = value; return this; }
}
public static class PartInfoResultImage
{
/**
* Image number
*/
@ApiMember(Description="Image number")
public Integer ImageNumber = null;
/**
* Image URL
*/
@ApiMember(Description="Image URL")
public String ImageUrl = null;
public Integer getImageNumber() { return ImageNumber; }
public PartInfoResultImage setImageNumber(Integer value) { this.ImageNumber = value; return this; }
public String getImageUrl() { return ImageUrl; }
public PartInfoResultImage setImageUrl(String value) { this.ImageUrl = value; return this; }
}
public static class PartStockQuantity
{
/**
* Location ID
*/
@ApiMember(Description="Location ID")
public Integer LocationId = null;
/**
* Location code
*/
@ApiMember(Description="Location code")
public String LocationCode = null;
/**
* Stock quantity in location
*/
@ApiMember(Description="Stock quantity in location")
public Integer StockQuantity = null;
public Integer getLocationId() { return LocationId; }
public PartStockQuantity setLocationId(Integer value) { this.LocationId = value; return this; }
public String getLocationCode() { return LocationCode; }
public PartStockQuantity setLocationCode(String value) { this.LocationCode = value; return this; }
public Integer getStockQuantity() { return StockQuantity; }
public PartStockQuantity setStockQuantity(Integer value) { this.StockQuantity = value; return this; }
}
public static class OrderTrackingResult
{
/**
* Order number.
*/
@ApiMember(Description="Order number.")
public String OrderNumber = null;
/**
* Order date.
*/
@ApiMember(Description="Order date.")
public Date OrderDate = null;
/**
* Order status.
*/
@ApiMember(Description="Order status.")
public OrderStatus Status = null;
/**
* List of shipments (if any).
*/
@ApiMember(Description="List of shipments (if any).")
public ArrayList<ShipmentResult> Shipments = null;
public String getOrderNumber() { return OrderNumber; }
public OrderTrackingResult setOrderNumber(String value) { this.OrderNumber = value; return this; }
public Date getOrderDate() { return OrderDate; }
public OrderTrackingResult setOrderDate(Date value) { this.OrderDate = value; return this; }
public OrderStatus getStatus() { return Status; }
public OrderTrackingResult setStatus(OrderStatus value) { this.Status = value; return this; }
public ArrayList<ShipmentResult> getShipments() { return Shipments; }
public OrderTrackingResult setShipments(ArrayList<ShipmentResult> value) { this.Shipments = value; return this; }
}
public static enum OrderStatus
{
Open(1),
Completed(2),
Cancelled(3);
private final int value;
OrderStatus(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class ShipmentResult
{
/**
* ID of the shipment.
*/
@ApiMember(Description="ID of the shipment.")
public Integer ShipmentId = null;
/**
* Determines of the shipment has been dispatched.
*/
@ApiMember(Description="Determines of the shipment has been dispatched.")
public Boolean HasBeenDispatched = null;
/**
* Date/time of dispatch.
*/
@ApiMember(Description="Date/time of dispatch.")
public Date DispatchDate = null;
/**
* List of articles in shipment.
*/
@ApiMember(Description="List of articles in shipment.")
public ArrayList<ShipmentArticleResult> Articles = null;
/**
* List of packages for shipment.
*/
@ApiMember(Description="List of packages for shipment.")
public ArrayList<ShipmentPackageResult> Packages = null;
public Integer getShipmentId() { return ShipmentId; }
public ShipmentResult setShipmentId(Integer value) { this.ShipmentId = value; return this; }
public Boolean isHasBeenDispatched() { return HasBeenDispatched; }
public ShipmentResult setHasBeenDispatched(Boolean value) { this.HasBeenDispatched = value; return this; }
public Date getDispatchDate() { return DispatchDate; }
public ShipmentResult setDispatchDate(Date value) { this.DispatchDate = value; return this; }
public ArrayList<ShipmentArticleResult> getArticles() { return Articles; }
public ShipmentResult setArticles(ArrayList<ShipmentArticleResult> value) { this.Articles = value; return this; }
public ArrayList<ShipmentPackageResult> getPackages() { return Packages; }
public ShipmentResult setPackages(ArrayList<ShipmentPackageResult> value) { this.Packages = value; return this; }
}
public static class ShipmentArticleResult
{
/**
* Order number.
*/
@ApiMember(Description="Order number.")
public String OrderNumber = null;
/**
* Article number.
*/
@ApiMember(Description="Article number.")
public String ArticleNumber = null;
/**
* Quantity.
*/
@ApiMember(Description="Quantity.")
public Integer Quantity = null;
/**
* Custom reference.
*/
@ApiMember(Description="Custom reference.")
public String CustomReference = null;
public String getOrderNumber() { return OrderNumber; }
public ShipmentArticleResult setOrderNumber(String value) { this.OrderNumber = value; return this; }
public String getArticleNumber() { return ArticleNumber; }
public ShipmentArticleResult setArticleNumber(String value) { this.ArticleNumber = value; return this; }
public Integer getQuantity() { return Quantity; }
public ShipmentArticleResult setQuantity(Integer value) { this.Quantity = value; return this; }
public String getCustomReference() { return CustomReference; }
public ShipmentArticleResult setCustomReference(String value) { this.CustomReference = value; return this; }
}
public static class ShipmentPackageResult
{
/**
* Shipment method.
*/
@ApiMember(Description="Shipment method.")
public String ShipmentMethod = null;
/**
* Tracking number.
*/
@ApiMember(Description="Tracking number.")
public String TrackingNumber = null;
/**
* Tracking URL.
*/
@ApiMember(Description="Tracking URL.")
public String TrackingUrl = null;
public String getShipmentMethod() { return ShipmentMethod; }
public ShipmentPackageResult setShipmentMethod(String value) { this.ShipmentMethod = value; return this; }
public String getTrackingNumber() { return TrackingNumber; }
public ShipmentPackageResult setTrackingNumber(String value) { this.TrackingNumber = value; return this; }
public String getTrackingUrl() { return TrackingUrl; }
public ShipmentPackageResult setTrackingUrl(String value) { this.TrackingUrl = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /dealers/order/tracking HTTP/1.1 Host: services.acct.2service.nl Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Result":{"OrderNumber":"String","OrderDate":"0001-01-01T00:00:00.0000000","Status":"Open","Shipments":[{"ShipmentId":0,"HasBeenDispatched":false,"DispatchDate":"0001-01-01T00:00:00.0000000","Articles":[{"OrderNumber":"String","ArticleNumber":"String","Quantity":0,"CustomReference":"String"}],"Packages":[{"ShipmentMethod":"String","TrackingNumber":"String","TrackingUrl":"String"}]}]},"IsSuccessful":false,"ErrorMessage":"String"}