2Service Services API

<back to all web services

GetOrderTracking

The following routes are available for this service:
GET/dealers/order/trackingRetrieves tracking numbers based on order number.
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class GetOrderTracking : AuthenticatedRequest()
{
    /**
    * Order number to retrieve tracking for.
    */
    @ApiMember(Description="Order number to retrieve tracking for.", IsRequired=true)
    open var OrderNumber:String? = null
}

open class AuthenticatedRequest
{
    /**
    * Session token received from successful authentication.
    */
    @ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query")
    open var SessionToken:String? = null
}

open class OrderTrackingResponse : OperationResult_1<OrderTrackingResult>()
{
}

open class OperationResult_1<T> : OperationResult()
{
    /**
    * Result value
    */
    @ApiMember(Description="Result value", ParameterType="model")
    open var Result:PartResults? = null
}

open class OperationResult
{
    /**
    * Specifies if the operation was successful.
    */
    @ApiMember(Description="Specifies if the operation was successful.", ParameterType="model")
    open var IsSuccessful:Boolean? = null

    /**
    * States error message in case of unsuccessful operation.
    */
    @ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model")
    open var ErrorMessage:String? = null
}

open class PartResults
{
    /**
    * Total number of parts available.
    */
    @ApiMember(Description="Total number of parts available.")
    open var TotalNumberOfParts:Int? = null

    /**
    * Indication if there are more parts to retrieve.
    */
    @ApiMember(Description="Indication if there are more parts to retrieve.")
    open var HasMoreRecords:Boolean? = null

    /**
    * Part records.
    */
    @ApiMember(Description="Part records.")
    open var Parts:ArrayList<PartInfoResult>? = null
}

open class PartInfoResult
{
    /**
    * Unique ID for the part.
    */
    @ApiMember(Description="Unique ID for the part.")
    open var Id:Int? = null

    /**
    * Part number.
    */
    @ApiMember(Description="Part number.")
    open var PartNumber:String? = null

    /**
    * Description of the part.
    */
    @ApiMember(Description="Description of the part.")
    open var Description:String? = null

    /**
    * Part manufacturer.
    */
    @ApiMember(Description="Part manufacturer.")
    open var Manufacturer:String? = null

    /**
    * Determines if the part can be ordered.
    */
    @ApiMember(Description="Determines if the part can be ordered.")
    open var CanBeOrdered:Boolean? = null

    /**
    * Textual representation of the status of the part.
    */
    @ApiMember(Description="Textual representation of the status of the part.")
    open var StatusText:String? = null

    /**
    * Available stock to order.
    */
    @ApiMember(Description="Available stock to order.")
    open var AvailableStockQuantity:Int? = null

    /**
    * Average days needed for delivery.
    */
    @ApiMember(Description="Average days needed for delivery.")
    open var AverageDeliveryInDays:Int? = null

    /**
    * Price of a single unit, excluding VAT.
    */
    @ApiMember(Description="Price of a single unit, excluding VAT.")
    open var UnitPrice:BigDecimal? = null

    /**
    * EAN number.
    */
    @ApiMember(Description="EAN number.")
    open var EanNumber:String? = null

    /**
    * Images
    */
    @ApiMember(Description="Images")
    open var Images:ArrayList<PartInfoResultImage>? = null

    /**
    * Secondary article numbers
    */
    @ApiMember(Description="Secondary article numbers")
    open var SecondaryArticleNumbers:ArrayList<String>? = null

    /**
    * Replacement article numbers
    */
    @ApiMember(Description="Replacement article numbers")
    open var ReplacementArticleNumbers:ArrayList<String>? = null

    /**
    * Stock quantities
    */
    @ApiMember(Description="Stock quantities")
    open var StockQuantities:ArrayList<PartStockQuantity>? = null
}

open class PartInfoResultImage
{
    /**
    * Image number
    */
    @ApiMember(Description="Image number")
    open var ImageNumber:Int? = null

    /**
    * Image URL
    */
    @ApiMember(Description="Image URL")
    open var ImageUrl:String? = null
}

open class PartStockQuantity
{
    /**
    * Location ID
    */
    @ApiMember(Description="Location ID")
    open var LocationId:Int? = null

    /**
    * Location code
    */
    @ApiMember(Description="Location code")
    open var LocationCode:String? = null

    /**
    * Stock quantity in location
    */
    @ApiMember(Description="Stock quantity in location")
    open var StockQuantity:Int? = null
}

open class OrderTrackingResult
{
    /**
    * Order number.
    */
    @ApiMember(Description="Order number.")
    open var OrderNumber:String? = null

    /**
    * Order date.
    */
    @ApiMember(Description="Order date.")
    open var OrderDate:Date? = null

    /**
    * Order status.
    */
    @ApiMember(Description="Order status.")
    open var Status:OrderStatus? = null

    /**
    * List of shipments (if any).
    */
    @ApiMember(Description="List of shipments (if any).")
    open var Shipments:ArrayList<ShipmentResult>? = null
}

enum class OrderStatus(val value:Int)
{
    Open(1),
    Completed(2),
    Cancelled(3),
}

open class ShipmentResult
{
    /**
    * ID of the shipment.
    */
    @ApiMember(Description="ID of the shipment.")
    open var ShipmentId:Int? = null

    /**
    * Determines of the shipment has been dispatched.
    */
    @ApiMember(Description="Determines of the shipment has been dispatched.")
    open var HasBeenDispatched:Boolean? = null

    /**
    * Date/time of dispatch.
    */
    @ApiMember(Description="Date/time of dispatch.")
    open var DispatchDate:Date? = null

    /**
    * List of articles in shipment.
    */
    @ApiMember(Description="List of articles in shipment.")
    open var Articles:ArrayList<ShipmentArticleResult>? = null

    /**
    * List of packages for shipment.
    */
    @ApiMember(Description="List of packages for shipment.")
    open var Packages:ArrayList<ShipmentPackageResult>? = null
}

open class ShipmentArticleResult
{
    /**
    * Order number.
    */
    @ApiMember(Description="Order number.")
    open var OrderNumber:String? = null

    /**
    * Article number.
    */
    @ApiMember(Description="Article number.")
    open var ArticleNumber:String? = null

    /**
    * Quantity.
    */
    @ApiMember(Description="Quantity.")
    open var Quantity:Int? = null

    /**
    * Custom reference.
    */
    @ApiMember(Description="Custom reference.")
    open var CustomReference:String? = null
}

open class ShipmentPackageResult
{
    /**
    * Shipment method.
    */
    @ApiMember(Description="Shipment method.")
    open var ShipmentMethod:String? = null

    /**
    * Tracking number.
    */
    @ApiMember(Description="Tracking number.")
    open var TrackingNumber:String? = null

    /**
    * Tracking URL.
    */
    @ApiMember(Description="Tracking URL.")
    open var TrackingUrl:String? = null
}

Kotlin GetOrderTracking 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 /dealers/order/tracking HTTP/1.1 
Host: services.acct.2service.nl 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<OrderTrackingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/_2Service.Webservices.ServiceModel.Dealers">
  <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/_2Service.Webservices.ServiceModel">String</ErrorMessage>
  <IsSuccessful xmlns="http://schemas.datacontract.org/2004/07/_2Service.Webservices.ServiceModel">false</IsSuccessful>
  <Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/_2Service.Webservices.ServiceModel.Dealers" xmlns="http://schemas.datacontract.org/2004/07/_2Service.Webservices.ServiceModel">
    <d2p1:OrderDate>0001-01-01T00:00:00</d2p1:OrderDate>
    <d2p1:OrderNumber>String</d2p1:OrderNumber>
    <d2p1:Shipments>
      <d2p1:ShipmentResult>
        <d2p1:Articles>
          <d2p1:ShipmentArticleResult>
            <d2p1:ArticleNumber>String</d2p1:ArticleNumber>
            <d2p1:CustomReference>String</d2p1:CustomReference>
            <d2p1:OrderNumber>String</d2p1:OrderNumber>
            <d2p1:Quantity>0</d2p1:Quantity>
          </d2p1:ShipmentArticleResult>
        </d2p1:Articles>
        <d2p1:DispatchDate>0001-01-01T00:00:00</d2p1:DispatchDate>
        <d2p1:HasBeenDispatched>false</d2p1:HasBeenDispatched>
        <d2p1:Packages>
          <d2p1:ShipmentPackageResult>
            <d2p1:ShipmentMethod>String</d2p1:ShipmentMethod>
            <d2p1:TrackingNumber>String</d2p1:TrackingNumber>
            <d2p1:TrackingUrl>String</d2p1:TrackingUrl>
          </d2p1:ShipmentPackageResult>
        </d2p1:Packages>
        <d2p1:ShipmentId>0</d2p1:ShipmentId>
      </d2p1:ShipmentResult>
    </d2p1:Shipments>
    <d2p1:Status>Open</d2p1:Status>
  </Result>
</OrderTrackingResponse>