Trendsic Platform Service

<back to all web services

CourierRunReturnScanRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/worker/dispatch/od/runs/{RunId}/returns
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class CourierDriverOrder
            Public Overridable Property Code As String
            Public Overridable Property CourierStep As String
            Public Overridable Property RouteShape As String
            Public Overridable Property ProfileName As String
            Public Overridable Property UnitOne As String
            Public Overridable Property UnitMany As String
            Public Overridable Property FacilityNoun As String
            Public Overridable Property FacilityName As String
            Public Overridable Property LevelName As String
            Public Overridable Property DueUtc As Date?
            Public Overridable Property DueText As String
            Public Overridable Property Units As Integer
            Public Overridable Property UnitsFound As Integer?
            Public Overridable Property Area As String
            Public Overridable Property Minutes As Integer?
            Public Overridable Property Address As String
            Public Overridable Property Unit As String
            Public Overridable Property City As String
            Public Overridable Property Lat As Decimal?
            Public Overridable Property Lng As Decimal?
            Public Overridable Property CustomerName As String
            Public Overridable Property CustomerPhone As String
            Public Overridable Property Handoff As String
            Public Overridable Property GateCode As String
            Public Overridable Property Instructions As String
            Public Overridable Property DropoffAddress As String
            Public Overridable Property DropoffContactName As String
            Public Overridable Property DropLat As Decimal?
            Public Overridable Property DropLng As Decimal?
            Public Overridable Property ArrivedUtc As Date?
            Public Overridable Property Tags As List(Of CourierItemView) = New List(Of CourierItemView)
            Public Overridable Property Proof As Dictionary(Of String, String) = New Dictionary(Of String, String)
            Public Overridable Property Photos As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer)
            Public Overridable Property Needs As List(Of String) = New List(Of String)
            Public Overridable Property MissedWaitMin As Integer
            Public Overridable Property MissedRequireContact As Boolean
            Public Overridable Property MissedRequirePhoto As Boolean
            Public Overridable Property MissedFee As Decimal
        End Class

        Public Partial Class CourierDriverResponse
            Public Overridable Property Courier As CourierDriverView
            Public Overridable Property Result As String
            Public Overridable Property Detail As String
            Public Overridable Property Message As String
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class CourierDriverView
            Public Overridable Property DriverCode As String
            Public Overridable Property Name As String
            Public Overridable Property Online As Boolean
            Public Overridable Property OnRoster As Boolean
            Public Overridable Property Van As CourierVanView
            Public Overridable Property Current As CourierDriverOrder
            Public Overridable Property Queue As List(Of CourierDriverOrder) = New List(Of CourierDriverOrder)
            Public Overridable Property Aboard As List(Of CourierDriverOrder) = New List(Of CourierDriverOrder)
            Public Overridable Property Runs As List(Of CourierRunView) = New List(Of CourierRunView)
            Public Overridable Property UpNext As CourierDriverOrder
        End Class

        Public Partial Class CourierItemView
            Public Overridable Property CourierItemID As Integer
            Public Overridable Property DispatchOdRequestID As Integer
            Public Overridable Property Seq As Integer
            Public Overridable Property TagCode As String
            Public Overridable Property Custody As String
            Public Overridable Property IsOpen As Boolean
            Public Overridable Property IsMissing As Boolean
            Public Overridable Property MissingReason As String
            Public Overridable Property IsManual As Boolean
            Public Overridable Property ReTagFlag As Boolean
            Public Overridable Property Scanned As Boolean
        End Class

        Public Partial Class CourierRunReturnScanRequest
            Public Overridable Property RunId As Integer
            Public Overridable Property TagCode As String
            Public Overridable Property Lat As Decimal?
            Public Overridable Property Lng As Decimal?
        End Class

        Public Partial Class CourierRunView
            Public Overridable Property CourierRunID As Integer
            Public Overridable Property Code As String
            Public Overridable Property Status As String
            Public Overridable Property CourierProfileId As Integer
            Public Overridable Property ProfileName As String
            Public Overridable Property CourierFacilityId As Integer
            Public Overridable Property FacilityName As String
            Public Overridable Property FacilityAddress As String
            Public Overridable Property DriverContactId As Integer?
            Public Overridable Property DriverName As String
            Public Overridable Property EquipmentID As Integer?
            Public Overridable Property VehicleUnit As String
            Public Overridable Property UnitOne As String
            Public Overridable Property UnitMany As String
            Public Overridable Property Units As Integer
            Public Overridable Property StopCount As Integer
            Public Overridable Property StopsDone As Integer
            Public Overridable Property Pay As Decimal?
            Public Overridable Property BuiltUtc As Date?
            Public Overridable Property StartedUtc As Date?
            Public Overridable Property CompletedUtc As Date?
            Public Overridable Property ToLoad As Integer
            Public Overridable Property ToReturn As Integer
            Public Overridable Property Stops As List(Of CourierStopView) = New List(Of CourierStopView)
        End Class

        Public Partial Class CourierStopView
            Public Overridable Property Sequence As Integer
            Public Overridable Property Status As String
            Public Overridable Property DispatchOdRequestID As Integer
            Public Overridable Property Code As String
            Public Overridable Property CourierStep As String
            Public Overridable Property Address As String
            Public Overridable Property Unit As String
            Public Overridable Property City As String
            Public Overridable Property Zip As String
            Public Overridable Property Lat As Decimal?
            Public Overridable Property Lng As Decimal?
            Public Overridable Property CustomerName As String
            Public Overridable Property CustomerPhone As String
            Public Overridable Property Handoff As String
            Public Overridable Property GateCode As String
            Public Overridable Property Instructions As String
            Public Overridable Property Units As Integer
            Public Overridable Property DueText As String
            Public Overridable Property Note As String
            Public Overridable Property Needs As List(Of String) = New List(Of String)
            Public Overridable Property Items As List(Of CourierItemView) = New List(Of CourierItemView)
        End Class

        Public Partial Class CourierVanView
            Public Overridable Property State As String
            Public Overridable Property LeaveByUtc As Date?
            Public Overridable Property LeaveByText As String
            Public Overridable Property SlackMin As Integer?
            Public Overridable Property InVan As Integer
            Public Overridable Property Committed As Integer
            Public Overridable Property Cap As Decimal?
            Public Overridable Property CapUnit As String
            Public Overridable Property VehicleUnit As String
            Public Overridable Property CriticalCode As String
            Public Overridable Property DriveMin As Integer
            Public Overridable Property FacilityName As String
            Public Overridable Property SendNote As String
        End Class
    End Namespace
End Namespace

VB.NET CourierRunReturnScanRequest DTOs

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

HTTP + CSV

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

POST /v1/worker/dispatch/od/runs/{RunId}/returns HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"RunId":0,"TagCode":"String","Lat":0,"Lng":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Courier":{"DriverCode":"String","Name":"String","Online":false,"OnRoster":false,"Van":{"State":"String","LeaveByUtc":"0001-01-01T00:00:00.0000000","LeaveByText":"String","SlackMin":0,"InVan":0,"Committed":0,"Cap":0,"CapUnit":"String","VehicleUnit":"String","CriticalCode":"String","DriveMin":0,"FacilityName":"String","SendNote":"String"},"Current":{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0},"Queue":[{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0}],"Aboard":[{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0}],"Runs":[{"CourierRunID":0,"Code":"String","Status":"String","CourierProfileId":0,"ProfileName":"String","CourierFacilityId":0,"FacilityName":"String","FacilityAddress":"String","DriverContactId":0,"DriverName":"String","EquipmentID":0,"VehicleUnit":"String","UnitOne":"String","UnitMany":"String","Units":0,"StopCount":0,"StopsDone":0,"Pay":0,"BuiltUtc":"0001-01-01T00:00:00.0000000","StartedUtc":"0001-01-01T00:00:00.0000000","CompletedUtc":"0001-01-01T00:00:00.0000000","ToLoad":0,"ToReturn":0,"Stops":[{"Sequence":0,"Status":"String","DispatchOdRequestID":0,"Code":"String","CourierStep":"String","Address":"String","Unit":"String","City":"String","Zip":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","Units":0,"DueText":"String","Note":"String","Needs":["String"],"Items":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}]}]}],"UpNext":{"Code":"String","CourierStep":"String","RouteShape":"String","ProfileName":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","FacilityName":"String","LevelName":"String","DueUtc":"0001-01-01T00:00:00.0000000","DueText":"String","Units":0,"UnitsFound":0,"Area":"String","Minutes":0,"Address":"String","Unit":"String","City":"String","Lat":0,"Lng":0,"CustomerName":"String","CustomerPhone":"String","Handoff":"String","GateCode":"String","Instructions":"String","DropoffAddress":"String","DropoffContactName":"String","DropLat":0,"DropLng":0,"ArrivedUtc":"0001-01-01T00:00:00.0000000","Tags":[{"CourierItemID":0,"DispatchOdRequestID":0,"Seq":0,"TagCode":"String","Custody":"String","IsOpen":false,"IsMissing":false,"MissingReason":"String","IsManual":false,"ReTagFlag":false,"Scanned":false}],"Proof":{"String":"String"},"Photos":{"String":0},"Needs":["String"],"MissedWaitMin":0,"MissedRequireContact":false,"MissedRequirePhoto":false,"MissedFee":0}},"Result":"String","Detail":"String","Message":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}