2Service Services API

<back to all web services

GetShipment

The following routes are available for this service:
GET/dealers/shipment/{ShipmentId}Retrieves shipment based on it's ID.
namespace _2Service.Webservices.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ShipmentArticleResult() = 
        ///<summary>
        ///Order number.
        ///</summary>
        [<ApiMember(Description="Order number.")>]
        member val OrderNumber:String = null with get,set

        ///<summary>
        ///Article number.
        ///</summary>
        [<ApiMember(Description="Article number.")>]
        member val ArticleNumber:String = null with get,set

        ///<summary>
        ///Quantity.
        ///</summary>
        [<ApiMember(Description="Quantity.")>]
        member val Quantity:Int32 = new Int32() with get,set

        ///<summary>
        ///Custom reference.
        ///</summary>
        [<ApiMember(Description="Custom reference.")>]
        member val CustomReference:String = null with get,set

    [<AllowNullLiteral>]
    type ShipmentPackageResult() = 
        ///<summary>
        ///Shipment method.
        ///</summary>
        [<ApiMember(Description="Shipment method.")>]
        member val ShipmentMethod:String = null with get,set

        ///<summary>
        ///Tracking number.
        ///</summary>
        [<ApiMember(Description="Tracking number.")>]
        member val TrackingNumber:String = null with get,set

        ///<summary>
        ///Tracking URL.
        ///</summary>
        [<ApiMember(Description="Tracking URL.")>]
        member val TrackingUrl:String = null with get,set

    [<AllowNullLiteral>]
    type ShipmentResult() = 
        ///<summary>
        ///ID of the shipment.
        ///</summary>
        [<ApiMember(Description="ID of the shipment.")>]
        member val ShipmentId:Int32 = new Int32() with get,set

        ///<summary>
        ///Determines of the shipment has been dispatched.
        ///</summary>
        [<ApiMember(Description="Determines of the shipment has been dispatched.")>]
        member val HasBeenDispatched:Boolean = new Boolean() with get,set

        ///<summary>
        ///Date/time of dispatch.
        ///</summary>
        [<ApiMember(Description="Date/time of dispatch.")>]
        member val DispatchDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///List of articles in shipment.
        ///</summary>
        [<ApiMember(Description="List of articles in shipment.")>]
        member val Articles:ResizeArray<ShipmentArticleResult> = null with get,set

        ///<summary>
        ///List of packages for shipment.
        ///</summary>
        [<ApiMember(Description="List of packages for shipment.")>]
        member val Packages:ResizeArray<ShipmentPackageResult> = null with get,set

    [<AllowNullLiteral>]
    type OperationResult() = 
        ///<summary>
        ///Specifies if the operation was successful.
        ///</summary>
        [<ApiMember(Description="Specifies if the operation was successful.", ParameterType="model")>]
        member val IsSuccessful:Boolean = new Boolean() with get,set

        ///<summary>
        ///States error message in case of unsuccessful operation.
        ///</summary>
        [<ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model")>]
        member val ErrorMessage:String = null with get,set

    [<AllowNullLiteral>]
    type PartInfoResultImage() = 
        ///<summary>
        ///Image number
        ///</summary>
        [<ApiMember(Description="Image number")>]
        member val ImageNumber:Int32 = new Int32() with get,set

        ///<summary>
        ///Image URL
        ///</summary>
        [<ApiMember(Description="Image URL")>]
        member val ImageUrl:String = null with get,set

    [<AllowNullLiteral>]
    type PartStockQuantity() = 
        ///<summary>
        ///Location ID
        ///</summary>
        [<ApiMember(Description="Location ID")>]
        member val LocationId:Int32 = new Int32() with get,set

        ///<summary>
        ///Location code
        ///</summary>
        [<ApiMember(Description="Location code")>]
        member val LocationCode:String = null with get,set

        ///<summary>
        ///Stock quantity in location
        ///</summary>
        [<ApiMember(Description="Stock quantity in location")>]
        member val StockQuantity:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type PartInfoResult() = 
        ///<summary>
        ///Unique ID for the part.
        ///</summary>
        [<ApiMember(Description="Unique ID for the part.")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///Part number.
        ///</summary>
        [<ApiMember(Description="Part number.")>]
        member val PartNumber:String = null with get,set

        ///<summary>
        ///Description of the part.
        ///</summary>
        [<ApiMember(Description="Description of the part.")>]
        member val Description:String = null with get,set

        ///<summary>
        ///Part manufacturer.
        ///</summary>
        [<ApiMember(Description="Part manufacturer.")>]
        member val Manufacturer:String = null with get,set

        ///<summary>
        ///Determines if the part can be ordered.
        ///</summary>
        [<ApiMember(Description="Determines if the part can be ordered.")>]
        member val CanBeOrdered:Boolean = new Boolean() with get,set

        ///<summary>
        ///Textual representation of the status of the part.
        ///</summary>
        [<ApiMember(Description="Textual representation of the status of the part.")>]
        member val StatusText:String = null with get,set

        ///<summary>
        ///Available stock to order.
        ///</summary>
        [<ApiMember(Description="Available stock to order.")>]
        member val AvailableStockQuantity:Int32 = new Int32() with get,set

        ///<summary>
        ///Average days needed for delivery.
        ///</summary>
        [<ApiMember(Description="Average days needed for delivery.")>]
        member val AverageDeliveryInDays:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Price of a single unit, excluding VAT.
        ///</summary>
        [<ApiMember(Description="Price of a single unit, excluding VAT.")>]
        member val UnitPrice:Nullable<Decimal> = new Nullable<Decimal>() with get,set

        ///<summary>
        ///EAN number.
        ///</summary>
        [<ApiMember(Description="EAN number.")>]
        member val EanNumber:String = null with get,set

        ///<summary>
        ///Images
        ///</summary>
        [<ApiMember(Description="Images")>]
        member val Images:ResizeArray<PartInfoResultImage> = null with get,set

        ///<summary>
        ///Secondary article numbers
        ///</summary>
        [<ApiMember(Description="Secondary article numbers")>]
        member val SecondaryArticleNumbers:ResizeArray<String> = null with get,set

        ///<summary>
        ///Replacement article numbers
        ///</summary>
        [<ApiMember(Description="Replacement article numbers")>]
        member val ReplacementArticleNumbers:ResizeArray<String> = null with get,set

        ///<summary>
        ///Stock quantities
        ///</summary>
        [<ApiMember(Description="Stock quantities")>]
        member val StockQuantities:ResizeArray<PartStockQuantity> = null with get,set

    [<AllowNullLiteral>]
    type PartResults() = 
        ///<summary>
        ///Total number of parts available.
        ///</summary>
        [<ApiMember(Description="Total number of parts available.")>]
        member val TotalNumberOfParts:Int32 = new Int32() with get,set

        ///<summary>
        ///Indication if there are more parts to retrieve.
        ///</summary>
        [<ApiMember(Description="Indication if there are more parts to retrieve.")>]
        member val HasMoreRecords:Boolean = new Boolean() with get,set

        ///<summary>
        ///Part records.
        ///</summary>
        [<ApiMember(Description="Part records.")>]
        member val Parts:ResizeArray<PartInfoResult> = null with get,set

    [<AllowNullLiteral>]
    type OperationResult<T>() = 
        inherit OperationResult()
        ///<summary>
        ///Result value
        ///</summary>
        [<ApiMember(Description="Result value", ParameterType="model")>]
        member val Result:PartResults = null with get,set

    [<AllowNullLiteral>]
    type ShipmentResponse() = 
        inherit OperationResult<ShipmentResult>()

    [<AllowNullLiteral>]
    type AuthenticatedRequest() = 
        ///<summary>
        ///Session token received from successful authentication.
        ///</summary>
        [<ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query")>]
        member val SessionToken:String = null with get,set

    [<AllowNullLiteral>]
    type GetShipment() = 
        inherit AuthenticatedRequest()
        ///<summary>
        ///Shipment ID to retrieve the status for.
        ///</summary>
        [<ApiMember(Description="Shipment ID to retrieve the status for.", IsRequired=true, ParameterType="path")>]
        member val ShipmentId:Int32 = new Int32() with get,set

F# GetShipment DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /dealers/shipment/{ShipmentId} HTTP/1.1 
Host: services.acct.2service.nl 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Result":{"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"}