Trendsic Platform Service

<back to all web services

EquipmentDvirSignOffRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/Equipment/{EquipmentID}/dvir/signoff
"use strict";
export class DvirUnitRef {
    /** @param {{EquipmentID?:number,Unit?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentID;
    /** @type {string} */
    Unit;
}
export class DvirPhotoView {
    /** @param {{WorkPhotoID?:number,DefectKey?:string,Url?:string,MarkedUrl?:string,CapturedAtUtc?:string,Lat?:number,Lng?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    WorkPhotoID;
    /** @type {string} */
    DefectKey;
    /** @type {string} */
    Url;
    /** @type {string} */
    MarkedUrl;
    /** @type {?string} */
    CapturedAtUtc;
    /** @type {?number} */
    Lat;
    /** @type {?number} */
    Lng;
}
export class DvirDefectView {
    /** @param {{DvirDefectID?:number,ClientKey?:string,DvirReportID?:number,ReportNumber?:string,EquipmentID?:number,Unit?:string,ItemKey?:string,Label?:string,FormLine?:string,IsCustom?:boolean,Severity?:string,SeverityText?:string,Note?:string,Source?:string,ReportedByName?:string,ReportedAtUtc?:string,EquipmentMaintenanceID?:number,Outcome?:string,OutcomeText?:string,OutcomeNote?:string,ScheduledFor?:string,SignedOffByName?:string,SignedOffAtUtc?:string,IsOpen?:boolean,Withdrawn?:boolean,PhotoCount?:number,Photos?:DvirPhotoView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    DvirDefectID;
    /** @type {string} */
    ClientKey;
    /** @type {?number} */
    DvirReportID;
    /** @type {string} */
    ReportNumber;
    /** @type {number} */
    EquipmentID;
    /** @type {string} */
    Unit;
    /** @type {string} */
    ItemKey;
    /** @type {string} */
    Label;
    /** @type {string} */
    FormLine;
    /** @type {boolean} */
    IsCustom;
    /** @type {string} */
    Severity;
    /** @type {string} */
    SeverityText;
    /** @type {string} */
    Note;
    /** @type {string} */
    Source;
    /** @type {string} */
    ReportedByName;
    /** @type {?string} */
    ReportedAtUtc;
    /** @type {?number} */
    EquipmentMaintenanceID;
    /** @type {string} */
    Outcome;
    /** @type {string} */
    OutcomeText;
    /** @type {string} */
    OutcomeNote;
    /** @type {string} */
    ScheduledFor;
    /** @type {string} */
    SignedOffByName;
    /** @type {?string} */
    SignedOffAtUtc;
    /** @type {boolean} */
    IsOpen;
    /** @type {boolean} */
    Withdrawn;
    /** @type {number} */
    PhotoCount;
    /** @type {DvirPhotoView[]} */
    Photos = [];
}
export class DvirVehicleView {
    /** @param {{EquipmentID?:number,Unit?:string,Name?:string,VehicleType?:string,IsTrailer?:boolean,VehicleStatus?:string,Status?:string,StatusText?:string,Line?:string,FirstUnsafeReport?:string,OpenCount?:number,LocalToday?:string,NeedsPreTrip?:boolean,NeedsReview?:boolean,ReviewReportIds?:number[],Trailers?:DvirUnitRef[],LastOdometer?:number,InUseBy?:string,DrivingNow?:boolean,TodayPreTripId?:number,TodayPostTripId?:number,OpenDefects?:DvirDefectView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentID;
    /** @type {string} */
    Unit;
    /** @type {string} */
    Name;
    /** @type {string} */
    VehicleType;
    /** @type {boolean} */
    IsTrailer;
    /** @type {string} */
    VehicleStatus;
    /** @type {string} */
    Status;
    /** @type {string} */
    StatusText;
    /** @type {string} */
    Line;
    /** @type {string} */
    FirstUnsafeReport;
    /** @type {number} */
    OpenCount;
    /** @type {string} */
    LocalToday;
    /** @type {boolean} */
    NeedsPreTrip;
    /** @type {boolean} */
    NeedsReview;
    /** @type {number[]} */
    ReviewReportIds = [];
    /** @type {DvirUnitRef[]} */
    Trailers = [];
    /** @type {?number} */
    LastOdometer;
    /** @type {string} */
    InUseBy;
    /** @type {boolean} */
    DrivingNow;
    /** @type {?number} */
    TodayPreTripId;
    /** @type {?number} */
    TodayPostTripId;
    /** @type {DvirDefectView[]} */
    OpenDefects = [];
}
export class DvirSignatureView {
    /** @param {{SignatureRecordID?:number,Role?:string,SignerName?:string,SignedAt?:string,ImageUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    SignatureRecordID;
    /** @type {string} */
    Role;
    /** @type {string} */
    SignerName;
    /** @type {?string} */
    SignedAt;
    /** @type {string} */
    ImageUrl;
}
export class DvirReportView {
    /** @param {{DvirReportID?:number,Number?:string,Kind?:string,KindText?:string,EquipmentID?:number,Unit?:string,Trailers?:DvirUnitRef[],ContactID?:number,DriverName?:string,Board?:string,ForDate?:string,FiledAtUtc?:string,SavedAtUtc?:string,IsLate?:boolean,IsAway?:boolean,IsSatisfactory?:boolean,Odometer?:number,LocationText?:string,Remarks?:string,ReviewedByName?:string,ReviewedAtUtc?:string,Chip?:string,Defects?:DvirDefectView[],Signatures?:DvirSignatureView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    DvirReportID;
    /** @type {string} */
    Number;
    /** @type {string} */
    Kind;
    /** @type {string} */
    KindText;
    /** @type {number} */
    EquipmentID;
    /** @type {string} */
    Unit;
    /** @type {DvirUnitRef[]} */
    Trailers = [];
    /** @type {number} */
    ContactID;
    /** @type {string} */
    DriverName;
    /** @type {string} */
    Board;
    /** @type {string} */
    ForDate;
    /** @type {string} */
    FiledAtUtc;
    /** @type {?string} */
    SavedAtUtc;
    /** @type {boolean} */
    IsLate;
    /** @type {boolean} */
    IsAway;
    /** @type {boolean} */
    IsSatisfactory;
    /** @type {?number} */
    Odometer;
    /** @type {string} */
    LocationText;
    /** @type {string} */
    Remarks;
    /** @type {string} */
    ReviewedByName;
    /** @type {?string} */
    ReviewedAtUtc;
    /** @type {string} */
    Chip;
    /** @type {DvirDefectView[]} */
    Defects = [];
    /** @type {DvirSignatureView[]} */
    Signatures = [];
}
export class DvirVehicleDetail extends DvirVehicleView {
    /** @param {{Plate?:string,VIN?:string,GvwrLbs?:number,BranchName?:string,InspectionDue?:string,InsuranceExpires?:string,RecentlyFixed?:DvirDefectView[],ReviewReports?:DvirReportView[],History?:DvirReportView[],EquipmentID?:number,Unit?:string,Name?:string,VehicleType?:string,IsTrailer?:boolean,VehicleStatus?:string,Status?:string,StatusText?:string,Line?:string,FirstUnsafeReport?:string,OpenCount?:number,LocalToday?:string,NeedsPreTrip?:boolean,NeedsReview?:boolean,ReviewReportIds?:number[],Trailers?:DvirUnitRef[],LastOdometer?:number,InUseBy?:string,DrivingNow?:boolean,TodayPreTripId?:number,TodayPostTripId?:number,OpenDefects?:DvirDefectView[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    Plate;
    /** @type {string} */
    VIN;
    /** @type {?number} */
    GvwrLbs;
    /** @type {string} */
    BranchName;
    /** @type {?string} */
    InspectionDue;
    /** @type {?string} */
    InsuranceExpires;
    /** @type {DvirDefectView[]} */
    RecentlyFixed = [];
    /** @type {DvirReportView[]} */
    ReviewReports = [];
    /** @type {DvirReportView[]} */
    History = [];
}
export class EquipmentDvirSignOffResponse {
    /** @param {{Vehicle?:DvirVehicleDetail,Returned?:boolean,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {DvirVehicleDetail} */
    Vehicle;
    /** @type {boolean} */
    Returned;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class DvirSignOffItem {
    /** @param {{DvirDefectID?:number,Outcome?:string,Note?:string,ScheduledFor?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    DvirDefectID;
    /** @type {string} */
    Outcome;
    /** @type {string} */
    Note;
    /** @type {string} */
    ScheduledFor;
}
export class EquipmentDvirSignOffRequest {
    /** @param {{EquipmentID?:number,Defects?:DvirSignOffItem[],MechanicName?:string,SignaturePng?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentID;
    /** @type {DvirSignOffItem[]} */
    Defects = [];
    /** @type {string} */
    MechanicName;
    /** @type {string} */
    SignaturePng;
}

JavaScript 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

HTTP + JSON

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"}}}