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 .xml suffix or ?format=xml

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<EquipmentDvirSignOffRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Defects>
    <DvirSignOffItem>
      <DvirDefectID>0</DvirDefectID>
      <Note>String</Note>
      <Outcome>String</Outcome>
      <ScheduledFor>String</ScheduledFor>
    </DvirSignOffItem>
  </Defects>
  <EquipmentID>0</EquipmentID>
  <MechanicName>String</MechanicName>
  <SignaturePng>String</SignaturePng>
</EquipmentDvirSignOffRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EquipmentDvirSignOffResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Returned>false</Returned>
  <Vehicle>
    <DrivingNow>false</DrivingNow>
    <EquipmentID>0</EquipmentID>
    <FirstUnsafeReport>String</FirstUnsafeReport>
    <InUseBy>String</InUseBy>
    <IsTrailer>false</IsTrailer>
    <LastOdometer>0</LastOdometer>
    <Line>String</Line>
    <LocalToday>String</LocalToday>
    <Name>String</Name>
    <NeedsPreTrip>false</NeedsPreTrip>
    <NeedsReview>false</NeedsReview>
    <OpenCount>0</OpenCount>
    <OpenDefects>
      <DvirDefectView>
        <ClientKey>String</ClientKey>
        <DvirDefectID>0</DvirDefectID>
        <DvirReportID>0</DvirReportID>
        <EquipmentID>0</EquipmentID>
        <EquipmentMaintenanceID>0</EquipmentMaintenanceID>
        <FormLine>String</FormLine>
        <IsCustom>false</IsCustom>
        <IsOpen>false</IsOpen>
        <ItemKey>String</ItemKey>
        <Label>String</Label>
        <Note>String</Note>
        <Outcome>String</Outcome>
        <OutcomeNote>String</OutcomeNote>
        <OutcomeText>String</OutcomeText>
        <PhotoCount>0</PhotoCount>
        <Photos>
          <DvirPhotoView>
            <CapturedAtUtc>0001-01-01T00:00:00</CapturedAtUtc>
            <DefectKey>String</DefectKey>
            <Lat>0</Lat>
            <Lng>0</Lng>
            <MarkedUrl>String</MarkedUrl>
            <Url>String</Url>
            <WorkPhotoID>0</WorkPhotoID>
          </DvirPhotoView>
        </Photos>
        <ReportNumber>String</ReportNumber>
        <ReportedAtUtc>0001-01-01T00:00:00</ReportedAtUtc>
        <ReportedByName>String</ReportedByName>
        <ScheduledFor>String</ScheduledFor>
        <Severity>String</Severity>
        <SeverityText>String</SeverityText>
        <SignedOffAtUtc>0001-01-01T00:00:00</SignedOffAtUtc>
        <SignedOffByName>String</SignedOffByName>
        <Source>String</Source>
        <Unit>String</Unit>
        <Withdrawn>false</Withdrawn>
      </DvirDefectView>
    </OpenDefects>
    <ReviewReportIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>0</d3p1:int>
    </ReviewReportIds>
    <Status>String</Status>
    <StatusText>String</StatusText>
    <TodayPostTripId>0</TodayPostTripId>
    <TodayPreTripId>0</TodayPreTripId>
    <Trailers>
      <DvirUnitRef>
        <EquipmentID>0</EquipmentID>
        <Unit>String</Unit>
      </DvirUnitRef>
    </Trailers>
    <Unit>String</Unit>
    <VehicleStatus>String</VehicleStatus>
    <VehicleType>String</VehicleType>
    <BranchName>String</BranchName>
    <GvwrLbs>0</GvwrLbs>
    <History>
      <DvirReportView>
        <Board>String</Board>
        <Chip>String</Chip>
        <ContactID>0</ContactID>
        <Defects>
          <DvirDefectView>
            <ClientKey>String</ClientKey>
            <DvirDefectID>0</DvirDefectID>
            <DvirReportID>0</DvirReportID>
            <EquipmentID>0</EquipmentID>
            <EquipmentMaintenanceID>0</EquipmentMaintenanceID>
            <FormLine>String</FormLine>
            <IsCustom>false</IsCustom>
            <IsOpen>false</IsOpen>
            <ItemKey>String</ItemKey>
            <Label>String</Label>
            <Note>String</Note>
            <Outcome>String</Outcome>
            <OutcomeNote>String</OutcomeNote>
            <OutcomeText>String</OutcomeText>
            <PhotoCount>0</PhotoCount>
            <Photos>
              <DvirPhotoView>
                <CapturedAtUtc>0001-01-01T00:00:00</CapturedAtUtc>
                <DefectKey>String</DefectKey>
                <Lat>0</Lat>
                <Lng>0</Lng>
                <MarkedUrl>String</MarkedUrl>
                <Url>String</Url>
                <WorkPhotoID>0</WorkPhotoID>
              </DvirPhotoView>
            </Photos>
            <ReportNumber>String</ReportNumber>
            <ReportedAtUtc>0001-01-01T00:00:00</ReportedAtUtc>
            <ReportedByName>String</ReportedByName>
            <ScheduledFor>String</ScheduledFor>
            <Severity>String</Severity>
            <SeverityText>String</SeverityText>
            <SignedOffAtUtc>0001-01-01T00:00:00</SignedOffAtUtc>
            <SignedOffByName>String</SignedOffByName>
            <Source>String</Source>
            <Unit>String</Unit>
            <Withdrawn>false</Withdrawn>
          </DvirDefectView>
        </Defects>
        <DriverName>String</DriverName>
        <DvirReportID>0</DvirReportID>
        <EquipmentID>0</EquipmentID>
        <FiledAtUtc>0001-01-01T00:00:00</FiledAtUtc>
        <ForDate>String</ForDate>
        <IsAway>false</IsAway>
        <IsLate>false</IsLate>
        <IsSatisfactory>false</IsSatisfactory>
        <Kind>String</Kind>
        <KindText>String</KindText>
        <LocationText>String</LocationText>
        <Number>String</Number>
        <Odometer>0</Odometer>
        <Remarks>String</Remarks>
        <ReviewedAtUtc>0001-01-01T00:00:00</ReviewedAtUtc>
        <ReviewedByName>String</ReviewedByName>
        <SavedAtUtc>0001-01-01T00:00:00</SavedAtUtc>
        <Signatures>
          <DvirSignatureView>
            <ImageUrl>String</ImageUrl>
            <Role>String</Role>
            <SignatureRecordID>0</SignatureRecordID>
            <SignedAt>0001-01-01T00:00:00</SignedAt>
            <SignerName>String</SignerName>
          </DvirSignatureView>
        </Signatures>
        <Trailers>
          <DvirUnitRef>
            <EquipmentID>0</EquipmentID>
            <Unit>String</Unit>
          </DvirUnitRef>
        </Trailers>
        <Unit>String</Unit>
      </DvirReportView>
    </History>
    <InspectionDue>0001-01-01T00:00:00</InspectionDue>
    <InsuranceExpires>0001-01-01T00:00:00</InsuranceExpires>
    <Plate>String</Plate>
    <RecentlyFixed>
      <DvirDefectView>
        <ClientKey>String</ClientKey>
        <DvirDefectID>0</DvirDefectID>
        <DvirReportID>0</DvirReportID>
        <EquipmentID>0</EquipmentID>
        <EquipmentMaintenanceID>0</EquipmentMaintenanceID>
        <FormLine>String</FormLine>
        <IsCustom>false</IsCustom>
        <IsOpen>false</IsOpen>
        <ItemKey>String</ItemKey>
        <Label>String</Label>
        <Note>String</Note>
        <Outcome>String</Outcome>
        <OutcomeNote>String</OutcomeNote>
        <OutcomeText>String</OutcomeText>
        <PhotoCount>0</PhotoCount>
        <Photos>
          <DvirPhotoView>
            <CapturedAtUtc>0001-01-01T00:00:00</CapturedAtUtc>
            <DefectKey>String</DefectKey>
            <Lat>0</Lat>
            <Lng>0</Lng>
            <MarkedUrl>String</MarkedUrl>
            <Url>String</Url>
            <WorkPhotoID>0</WorkPhotoID>
          </DvirPhotoView>
        </Photos>
        <ReportNumber>String</ReportNumber>
        <ReportedAtUtc>0001-01-01T00:00:00</ReportedAtUtc>
        <ReportedByName>String</ReportedByName>
        <ScheduledFor>String</ScheduledFor>
        <Severity>String</Severity>
        <SeverityText>String</SeverityText>
        <SignedOffAtUtc>0001-01-01T00:00:00</SignedOffAtUtc>
        <SignedOffByName>String</SignedOffByName>
        <Source>String</Source>
        <Unit>String</Unit>
        <Withdrawn>false</Withdrawn>
      </DvirDefectView>
    </RecentlyFixed>
    <ReviewReports>
      <DvirReportView>
        <Board>String</Board>
        <Chip>String</Chip>
        <ContactID>0</ContactID>
        <Defects>
          <DvirDefectView>
            <ClientKey>String</ClientKey>
            <DvirDefectID>0</DvirDefectID>
            <DvirReportID>0</DvirReportID>
            <EquipmentID>0</EquipmentID>
            <EquipmentMaintenanceID>0</EquipmentMaintenanceID>
            <FormLine>String</FormLine>
            <IsCustom>false</IsCustom>
            <IsOpen>false</IsOpen>
            <ItemKey>String</ItemKey>
            <Label>String</Label>
            <Note>String</Note>
            <Outcome>String</Outcome>
            <OutcomeNote>String</OutcomeNote>
            <OutcomeText>String</OutcomeText>
            <PhotoCount>0</PhotoCount>
            <Photos>
              <DvirPhotoView>
                <CapturedAtUtc>0001-01-01T00:00:00</CapturedAtUtc>
                <DefectKey>String</DefectKey>
                <Lat>0</Lat>
                <Lng>0</Lng>
                <MarkedUrl>String</MarkedUrl>
                <Url>String</Url>
                <WorkPhotoID>0</WorkPhotoID>
              </DvirPhotoView>
            </Photos>
            <ReportNumber>String</ReportNumber>
            <ReportedAtUtc>0001-01-01T00:00:00</ReportedAtUtc>
            <ReportedByName>String</ReportedByName>
            <ScheduledFor>String</ScheduledFor>
            <Severity>String</Severity>
            <SeverityText>String</SeverityText>
            <SignedOffAtUtc>0001-01-01T00:00:00</SignedOffAtUtc>
            <SignedOffByName>String</SignedOffByName>
            <Source>String</Source>
            <Unit>String</Unit>
            <Withdrawn>false</Withdrawn>
          </DvirDefectView>
        </Defects>
        <DriverName>String</DriverName>
        <DvirReportID>0</DvirReportID>
        <EquipmentID>0</EquipmentID>
        <FiledAtUtc>0001-01-01T00:00:00</FiledAtUtc>
        <ForDate>String</ForDate>
        <IsAway>false</IsAway>
        <IsLate>false</IsLate>
        <IsSatisfactory>false</IsSatisfactory>
        <Kind>String</Kind>
        <KindText>String</KindText>
        <LocationText>String</LocationText>
        <Number>String</Number>
        <Odometer>0</Odometer>
        <Remarks>String</Remarks>
        <ReviewedAtUtc>0001-01-01T00:00:00</ReviewedAtUtc>
        <ReviewedByName>String</ReviewedByName>
        <SavedAtUtc>0001-01-01T00:00:00</SavedAtUtc>
        <Signatures>
          <DvirSignatureView>
            <ImageUrl>String</ImageUrl>
            <Role>String</Role>
            <SignatureRecordID>0</SignatureRecordID>
            <SignedAt>0001-01-01T00:00:00</SignedAt>
            <SignerName>String</SignerName>
          </DvirSignatureView>
        </Signatures>
        <Trailers>
          <DvirUnitRef>
            <EquipmentID>0</EquipmentID>
            <Unit>String</Unit>
          </DvirUnitRef>
        </Trailers>
        <Unit>String</Unit>
      </DvirReportView>
    </ReviewReports>
    <VIN>String</VIN>
  </Vehicle>
</EquipmentDvirSignOffResponse>