| GET | /dealers/order/tracking | Retrieves tracking numbers based on order number. |
|---|
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 GetOrderTracking
Inherits AuthenticatedRequest
'''<Summary>
'''Order number to retrieve tracking for.
'''</Summary>
<ApiMember(Description:="Order number to retrieve tracking for.", IsRequired:=true)>
Public Overridable Property OrderNumber As String
End Class
Public Enum OrderStatus
Open = 1
Completed = 2
Cancelled = 3
End Enum
Public Partial Class OrderTrackingResponse
Inherits OperationResult(Of OrderTrackingResult)
End Class
Public Partial Class OrderTrackingResult
'''<Summary>
'''Order number.
'''</Summary>
<ApiMember(Description:="Order number.")>
Public Overridable Property OrderNumber As String
'''<Summary>
'''Order date.
'''</Summary>
<ApiMember(Description:="Order date.")>
Public Overridable Property OrderDate As Date
'''<Summary>
'''Order status.
'''</Summary>
<ApiMember(Description:="Order status.")>
Public Overridable Property Status As OrderStatus
'''<Summary>
'''List of shipments (if any).
'''</Summary>
<ApiMember(Description:="List of shipments (if any).")>
Public Overridable Property Shipments As List(Of ShipmentResult)
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 ShipmentArticleResult
'''<Summary>
'''Order number.
'''</Summary>
<ApiMember(Description:="Order number.")>
Public Overridable Property OrderNumber As String
'''<Summary>
'''Article number.
'''</Summary>
<ApiMember(Description:="Article number.")>
Public Overridable Property ArticleNumber As String
'''<Summary>
'''Quantity.
'''</Summary>
<ApiMember(Description:="Quantity.")>
Public Overridable Property Quantity As Integer
'''<Summary>
'''Custom reference.
'''</Summary>
<ApiMember(Description:="Custom reference.")>
Public Overridable Property CustomReference As String
End Class
Public Partial Class ShipmentPackageResult
'''<Summary>
'''Shipment method.
'''</Summary>
<ApiMember(Description:="Shipment method.")>
Public Overridable Property ShipmentMethod As String
'''<Summary>
'''Tracking number.
'''</Summary>
<ApiMember(Description:="Tracking number.")>
Public Overridable Property TrackingNumber As String
'''<Summary>
'''Tracking URL.
'''</Summary>
<ApiMember(Description:="Tracking URL.")>
Public Overridable Property TrackingUrl As String
End Class
Public Partial Class ShipmentResult
'''<Summary>
'''ID of the shipment.
'''</Summary>
<ApiMember(Description:="ID of the shipment.")>
Public Overridable Property ShipmentId As Integer
'''<Summary>
'''Determines of the shipment has been dispatched.
'''</Summary>
<ApiMember(Description:="Determines of the shipment has been dispatched.")>
Public Overridable Property HasBeenDispatched As Boolean
'''<Summary>
'''Date/time of dispatch.
'''</Summary>
<ApiMember(Description:="Date/time of dispatch.")>
Public Overridable Property DispatchDate As Date?
'''<Summary>
'''List of articles in shipment.
'''</Summary>
<ApiMember(Description:="List of articles in shipment.")>
Public Overridable Property Articles As List(Of ShipmentArticleResult)
'''<Summary>
'''List of packages for shipment.
'''</Summary>
<ApiMember(Description:="List of packages for shipment.")>
Public Overridable Property Packages As List(Of ShipmentPackageResult)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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"}