2Service Services API

<back to all web services

GetShipments

The following routes are available for this service:
GET/dealers/shipmentsRetrieves shipments.
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports _2Service.Webservices.ServiceModel.Dealers
Imports _2Service.Webservices.ServiceModel

Namespace Global

    Namespace _2Service.Webservices.ServiceModel

        Public Partial Class OperationResult
            '''<Summary>
            '''Specifies if the operation was successful.
            '''</Summary>
            <ApiMember(Description:="Specifies if the operation was successful.", ParameterType:="model")>
            Public Overridable Property IsSuccessful As Boolean

            '''<Summary>
            '''States error message in case of unsuccessful operation.
            '''</Summary>
            <ApiMember(Description:="States error message in case of unsuccessful operation.", ParameterType:="model")>
            Public Overridable Property ErrorMessage As String
        End Class

        Public Partial Class OperationResult(Of T)
            Inherits OperationResult
            '''<Summary>
            '''Result value
            '''</Summary>
            <ApiMember(Description:="Result value", ParameterType:="model")>
            Public Overridable Property Result As PartResults
        End Class
    End Namespace

    Namespace _2Service.Webservices.ServiceModel.Dealers

        Public Partial Class AuthenticatedRequest
            '''<Summary>
            '''Session token received from successful authentication.
            '''</Summary>
            <ApiMember(Description:="Session token received from successful authentication.", IsRequired:=true, ParameterType:="query")>
            Public Overridable Property SessionToken As String
        End Class

        Public Partial Class GetShipments
            Inherits AuthenticatedRequest
            '''<Summary>
            '''Start of date range to retrieve shipments for.
            '''</Summary>
            <ApiMember(Description:="Start of date range to retrieve shipments for.", IsRequired:=true)>
            Public Overridable Property DateFrom As Date

            '''<Summary>
            '''End of date range to retrieve shipments for.
            '''</Summary>
            <ApiMember(Description:="End of date range to retrieve shipments for.")>
            Public Overridable Property DateTo As Date?
        End Class

        Public Partial Class PartInfoResult
            '''<Summary>
            '''Unique ID for the part.
            '''</Summary>
            <ApiMember(Description:="Unique ID for the part.")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''Part number.
            '''</Summary>
            <ApiMember(Description:="Part number.")>
            Public Overridable Property PartNumber As String

            '''<Summary>
            '''Description of the part.
            '''</Summary>
            <ApiMember(Description:="Description of the part.")>
            Public Overridable Property Description As String

            '''<Summary>
            '''Part manufacturer.
            '''</Summary>
            <ApiMember(Description:="Part manufacturer.")>
            Public Overridable Property Manufacturer As String

            '''<Summary>
            '''Determines if the part can be ordered.
            '''</Summary>
            <ApiMember(Description:="Determines if the part can be ordered.")>
            Public Overridable Property CanBeOrdered As Boolean

            '''<Summary>
            '''Textual representation of the status of the part.
            '''</Summary>
            <ApiMember(Description:="Textual representation of the status of the part.")>
            Public Overridable Property StatusText As String

            '''<Summary>
            '''Available stock to order.
            '''</Summary>
            <ApiMember(Description:="Available stock to order.")>
            Public Overridable Property AvailableStockQuantity As Integer

            '''<Summary>
            '''Average days needed for delivery.
            '''</Summary>
            <ApiMember(Description:="Average days needed for delivery.")>
            Public Overridable Property AverageDeliveryInDays As Integer?

            '''<Summary>
            '''Price of a single unit, excluding VAT.
            '''</Summary>
            <ApiMember(Description:="Price of a single unit, excluding VAT.")>
            Public Overridable Property UnitPrice As Decimal?

            '''<Summary>
            '''EAN number.
            '''</Summary>
            <ApiMember(Description:="EAN number.")>
            Public Overridable Property EanNumber As String

            '''<Summary>
            '''Images
            '''</Summary>
            <ApiMember(Description:="Images")>
            Public Overridable Property Images As List(Of PartInfoResultImage)

            '''<Summary>
            '''Secondary article numbers
            '''</Summary>
            <ApiMember(Description:="Secondary article numbers")>
            Public Overridable Property SecondaryArticleNumbers As List(Of String)

            '''<Summary>
            '''Replacement article numbers
            '''</Summary>
            <ApiMember(Description:="Replacement article numbers")>
            Public Overridable Property ReplacementArticleNumbers As List(Of String)

            '''<Summary>
            '''Stock quantities
            '''</Summary>
            <ApiMember(Description:="Stock quantities")>
            Public Overridable Property StockQuantities As List(Of PartStockQuantity)
        End Class

        Public Partial Class PartInfoResultImage
            '''<Summary>
            '''Image number
            '''</Summary>
            <ApiMember(Description:="Image number")>
            Public Overridable Property ImageNumber As Integer

            '''<Summary>
            '''Image URL
            '''</Summary>
            <ApiMember(Description:="Image URL")>
            Public Overridable Property ImageUrl As String
        End Class

        Public Partial Class PartResults
            '''<Summary>
            '''Total number of parts available.
            '''</Summary>
            <ApiMember(Description:="Total number of parts available.")>
            Public Overridable Property TotalNumberOfParts As Integer

            '''<Summary>
            '''Indication if there are more parts to retrieve.
            '''</Summary>
            <ApiMember(Description:="Indication if there are more parts to retrieve.")>
            Public Overridable Property HasMoreRecords As Boolean

            '''<Summary>
            '''Part records.
            '''</Summary>
            <ApiMember(Description:="Part records.")>
            Public Overridable Property Parts As List(Of PartInfoResult)
        End Class

        Public Partial Class PartStockQuantity
            '''<Summary>
            '''Location ID
            '''</Summary>
            <ApiMember(Description:="Location ID")>
            Public Overridable Property LocationId As Integer

            '''<Summary>
            '''Location code
            '''</Summary>
            <ApiMember(Description:="Location code")>
            Public Overridable Property LocationCode As String

            '''<Summary>
            '''Stock quantity in location
            '''</Summary>
            <ApiMember(Description:="Stock quantity in location")>
            Public Overridable Property StockQuantity As Integer
        End Class

        Public Partial Class ShipmentsResponse
            Inherits OperationResult(Of List(Of ShipmentResult))
        End Class
    End Namespace
End Namespace

VB.NET GetShipments 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/shipments 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"}