| POST,OPTIONS | /v1/Equipment/{EquipmentID}/dvir/signoff |
|---|
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 DvirDefectView
Public Overridable Property DvirDefectID As Integer
Public Overridable Property ClientKey As String
Public Overridable Property DvirReportID As Integer?
Public Overridable Property ReportNumber As String
Public Overridable Property EquipmentID As Integer
Public Overridable Property Unit As String
Public Overridable Property ItemKey As String
Public Overridable Property Label As String
Public Overridable Property FormLine As String
Public Overridable Property IsCustom As Boolean
Public Overridable Property Severity As String
Public Overridable Property SeverityText As String
Public Overridable Property Note As String
Public Overridable Property Source As String
Public Overridable Property ReportedByName As String
Public Overridable Property ReportedAtUtc As Date?
Public Overridable Property EquipmentMaintenanceID As Integer?
Public Overridable Property Outcome As String
Public Overridable Property OutcomeText As String
Public Overridable Property OutcomeNote As String
Public Overridable Property ScheduledFor As String
Public Overridable Property SignedOffByName As String
Public Overridable Property SignedOffAtUtc As Date?
Public Overridable Property IsOpen As Boolean
Public Overridable Property Withdrawn As Boolean
Public Overridable Property PhotoCount As Integer
Public Overridable Property Photos As List(Of DvirPhotoView) = New List(Of DvirPhotoView)
End Class
Public Partial Class DvirPhotoView
Public Overridable Property WorkPhotoID As Integer
Public Overridable Property DefectKey As String
Public Overridable Property Url As String
Public Overridable Property MarkedUrl As String
Public Overridable Property CapturedAtUtc As Date?
Public Overridable Property Lat As Decimal?
Public Overridable Property Lng As Decimal?
End Class
Public Partial Class DvirReportView
Public Overridable Property DvirReportID As Integer
Public Overridable Property Number As String
Public Overridable Property Kind As String
Public Overridable Property KindText As String
Public Overridable Property EquipmentID As Integer
Public Overridable Property Unit As String
Public Overridable Property Trailers As List(Of DvirUnitRef) = New List(Of DvirUnitRef)
Public Overridable Property ContactID As Integer
Public Overridable Property DriverName As String
Public Overridable Property Board As String
Public Overridable Property ForDate As String
Public Overridable Property FiledAtUtc As Date
Public Overridable Property SavedAtUtc As Date?
Public Overridable Property IsLate As Boolean
Public Overridable Property IsAway As Boolean
Public Overridable Property IsSatisfactory As Boolean
Public Overridable Property Odometer As Integer?
Public Overridable Property LocationText As String
Public Overridable Property Remarks As String
Public Overridable Property ReviewedByName As String
Public Overridable Property ReviewedAtUtc As Date?
Public Overridable Property Chip As String
Public Overridable Property Defects As List(Of DvirDefectView) = New List(Of DvirDefectView)
Public Overridable Property Signatures As List(Of DvirSignatureView) = New List(Of DvirSignatureView)
End Class
Public Partial Class DvirSignatureView
Public Overridable Property SignatureRecordID As Integer
Public Overridable Property Role As String
Public Overridable Property SignerName As String
Public Overridable Property SignedAt As Date?
Public Overridable Property ImageUrl As String
End Class
Public Partial Class DvirSignOffItem
Public Overridable Property DvirDefectID As Integer
Public Overridable Property Outcome As String
Public Overridable Property Note As String
Public Overridable Property ScheduledFor As String
End Class
Public Partial Class DvirUnitRef
Public Overridable Property EquipmentID As Integer
Public Overridable Property Unit As String
End Class
Public Partial Class DvirVehicleDetail
Inherits DvirVehicleView
Public Overridable Property Plate As String
Public Overridable Property VIN As String
Public Overridable Property GvwrLbs As Integer?
Public Overridable Property BranchName As String
Public Overridable Property InspectionDue As Date?
Public Overridable Property InsuranceExpires As Date?
Public Overridable Property RecentlyFixed As List(Of DvirDefectView) = New List(Of DvirDefectView)
Public Overridable Property ReviewReports As List(Of DvirReportView) = New List(Of DvirReportView)
Public Overridable Property History As List(Of DvirReportView) = New List(Of DvirReportView)
End Class
Public Partial Class DvirVehicleView
Public Overridable Property EquipmentID As Integer
Public Overridable Property Unit As String
Public Overridable Property Name As String
Public Overridable Property VehicleType As String
Public Overridable Property IsTrailer As Boolean
Public Overridable Property VehicleStatus As String
Public Overridable Property Status As String
Public Overridable Property StatusText As String
Public Overridable Property Line As String
Public Overridable Property FirstUnsafeReport As String
Public Overridable Property OpenCount As Integer
Public Overridable Property LocalToday As String
Public Overridable Property NeedsPreTrip As Boolean
Public Overridable Property NeedsReview As Boolean
Public Overridable Property ReviewReportIds As List(Of Integer) = New List(Of Integer)
Public Overridable Property Trailers As List(Of DvirUnitRef) = New List(Of DvirUnitRef)
Public Overridable Property LastOdometer As Integer?
Public Overridable Property InUseBy As String
Public Overridable Property DrivingNow As Boolean
Public Overridable Property TodayPreTripId As Integer?
Public Overridable Property TodayPostTripId As Integer?
Public Overridable Property OpenDefects As List(Of DvirDefectView) = New List(Of DvirDefectView)
End Class
Public Partial Class EquipmentDvirSignOffRequest
Public Overridable Property EquipmentID As Integer
Public Overridable Property Defects As List(Of DvirSignOffItem) = New List(Of DvirSignOffItem)
Public Overridable Property MechanicName As String
Public Overridable Property SignaturePng As String
End Class
Public Partial Class EquipmentDvirSignOffResponse
Public Overridable Property Vehicle As DvirVehicleDetail
Public Overridable Property Returned As Boolean
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET EquipmentDvirSignOffRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Equipment/{EquipmentID}/dvir/signoff HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"EquipmentID":0,"Defects":[{"DvirDefectID":0,"Outcome":"String","Note":"String","ScheduledFor":"String"}],"MechanicName":"String","SignaturePng":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Vehicle":{"Plate":"String","VIN":"String","GvwrLbs":0,"BranchName":"String","InspectionDue":"0001-01-01T00:00:00.0000000","InsuranceExpires":"0001-01-01T00:00:00.0000000","RecentlyFixed":[{"DvirDefectID":0,"ClientKey":"String","DvirReportID":0,"ReportNumber":"String","EquipmentID":0,"Unit":"String","ItemKey":"String","Label":"String","FormLine":"String","IsCustom":false,"Severity":"String","SeverityText":"String","Note":"String","Source":"String","ReportedByName":"String","ReportedAtUtc":"0001-01-01T00:00:00.0000000","EquipmentMaintenanceID":0,"Outcome":"String","OutcomeText":"String","OutcomeNote":"String","ScheduledFor":"String","SignedOffByName":"String","SignedOffAtUtc":"0001-01-01T00:00:00.0000000","IsOpen":false,"Withdrawn":false,"PhotoCount":0,"Photos":[{"WorkPhotoID":0,"DefectKey":"String","Url":"String","MarkedUrl":"String","CapturedAtUtc":"0001-01-01T00:00:00.0000000","Lat":0,"Lng":0}]}],"ReviewReports":[{"DvirReportID":0,"Number":"String","Kind":"String","KindText":"String","EquipmentID":0,"Unit":"String","Trailers":[{"EquipmentID":0,"Unit":"String"}],"ContactID":0,"DriverName":"String","Board":"String","ForDate":"String","FiledAtUtc":"0001-01-01T00:00:00.0000000","SavedAtUtc":"0001-01-01T00:00:00.0000000","IsLate":false,"IsAway":false,"IsSatisfactory":false,"Odometer":0,"LocationText":"String","Remarks":"String","ReviewedByName":"String","ReviewedAtUtc":"0001-01-01T00:00:00.0000000","Chip":"String","Defects":[{"DvirDefectID":0,"ClientKey":"String","DvirReportID":0,"ReportNumber":"String","EquipmentID":0,"Unit":"String","ItemKey":"String","Label":"String","FormLine":"String","IsCustom":false,"Severity":"String","SeverityText":"String","Note":"String","Source":"String","ReportedByName":"String","ReportedAtUtc":"0001-01-01T00:00:00.0000000","EquipmentMaintenanceID":0,"Outcome":"String","OutcomeText":"String","OutcomeNote":"String","ScheduledFor":"String","SignedOffByName":"String","SignedOffAtUtc":"0001-01-01T00:00:00.0000000","IsOpen":false,"Withdrawn":false,"PhotoCount":0,"Photos":[{"WorkPhotoID":0,"DefectKey":"String","Url":"String","MarkedUrl":"String","CapturedAtUtc":"0001-01-01T00:00:00.0000000","Lat":0,"Lng":0}]}],"Signatures":[{"SignatureRecordID":0,"Role":"String","SignerName":"String","SignedAt":"0001-01-01T00:00:00.0000000","ImageUrl":"String"}]}],"History":[{"DvirReportID":0,"Number":"String","Kind":"String","KindText":"String","EquipmentID":0,"Unit":"String","Trailers":[{"EquipmentID":0,"Unit":"String"}],"ContactID":0,"DriverName":"String","Board":"String","ForDate":"String","FiledAtUtc":"0001-01-01T00:00:00.0000000","SavedAtUtc":"0001-01-01T00:00:00.0000000","IsLate":false,"IsAway":false,"IsSatisfactory":false,"Odometer":0,"LocationText":"String","Remarks":"String","ReviewedByName":"String","ReviewedAtUtc":"0001-01-01T00:00:00.0000000","Chip":"String","Defects":[{"DvirDefectID":0,"ClientKey":"String","DvirReportID":0,"ReportNumber":"String","EquipmentID":0,"Unit":"String","ItemKey":"String","Label":"String","FormLine":"String","IsCustom":false,"Severity":"String","SeverityText":"String","Note":"String","Source":"String","ReportedByName":"String","ReportedAtUtc":"0001-01-01T00:00:00.0000000","EquipmentMaintenanceID":0,"Outcome":"String","OutcomeText":"String","OutcomeNote":"String","ScheduledFor":"String","SignedOffByName":"String","SignedOffAtUtc":"0001-01-01T00:00:00.0000000","IsOpen":false,"Withdrawn":false,"PhotoCount":0,"Photos":[{"WorkPhotoID":0,"DefectKey":"String","Url":"String","MarkedUrl":"String","CapturedAtUtc":"0001-01-01T00:00:00.0000000","Lat":0,"Lng":0}]}],"Signatures":[{"SignatureRecordID":0,"Role":"String","SignerName":"String","SignedAt":"0001-01-01T00:00:00.0000000","ImageUrl":"String"}]}],"EquipmentID":0,"Unit":"String","Name":"String","VehicleType":"String","IsTrailer":false,"VehicleStatus":"String","Status":"String","StatusText":"String","Line":"String","FirstUnsafeReport":"String","OpenCount":0,"LocalToday":"String","NeedsPreTrip":false,"NeedsReview":false,"ReviewReportIds":[0],"Trailers":[{"EquipmentID":0,"Unit":"String"}],"LastOdometer":0,"InUseBy":"String","DrivingNow":false,"TodayPreTripId":0,"TodayPostTripId":0,"OpenDefects":[{"DvirDefectID":0,"ClientKey":"String","DvirReportID":0,"ReportNumber":"String","EquipmentID":0,"Unit":"String","ItemKey":"String","Label":"String","FormLine":"String","IsCustom":false,"Severity":"String","SeverityText":"String","Note":"String","Source":"String","ReportedByName":"String","ReportedAtUtc":"0001-01-01T00:00:00.0000000","EquipmentMaintenanceID":0,"Outcome":"String","OutcomeText":"String","OutcomeNote":"String","ScheduledFor":"String","SignedOffByName":"String","SignedOffAtUtc":"0001-01-01T00:00:00.0000000","IsOpen":false,"Withdrawn":false,"PhotoCount":0,"Photos":[{"WorkPhotoID":0,"DefectKey":"String","Url":"String","MarkedUrl":"String","CapturedAtUtc":"0001-01-01T00:00:00.0000000","Lat":0,"Lng":0}]}]},"Returned":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}