Use this call to get information on defects. Defect information returned may be filtered on asset, repaired or unrepaired, severity of the defect and asset location.
Note: The start and end parameters were added in version 1.08 / 2.01.
Request Data
Required Information | |
---|---|
Name | Description |
action | showopen |
operation | defects |
format | xml |
Optional Information | |
Name | Description |
logvers | API call version. |
reqtype | (logvers >= 2) The asset field used to filter asset records by. Accepted options are:
logvers is '1', or not given, the reqtype will always be dbid . |
target | The value to filter asset records by. |
location | If specified only return defects for assets assigned to this location.
Note: If a target is specified the location is not used. |
repair | Defect repair status to filter on. Possible values are 'yes' , 'no' and 'both'
|
critical | Defect severity. Possible values are 'yes' , 'no' and 'both'
|
pending | Defect pending repair status to filter on. Possible values are 'yes' , 'no' and 'both'
|
start | A Unix epoch time stamp. Only return defects reported later than this time. May be combined with end. |
end | A Unix epoch time stamp. Only return defects reported earlier than this time. May be combined with start.
Note: In future releases the date selection will be required. After that time if date ranges are used there is a 1 day limit on the date selection if no target is specified. If the a target is specified then the date limit is 365 days. |
tstype | A flag to indicate what the timestamp variable represents. Acceptable values are:
insp ' will be assumed. |
Example Request (Retrieving a list of critical defects)
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showopen&operation=defects&format=xml&critical=yes
Data Returned
A list of defects, filtered according to the parameters provided. To find assets with defects use the get assets function with an opstatus filter of defect
.
DTD
<!ELEMENT defectlist (count, defect*)>
<!ATTLIST defectlist ver CDATA #REQUIRED>
<!ELEMENT count (#PCDATA)>
<!ELEMENT defect (asset, zone, component, condition, ffd, inspid, repair, pending?)>
<!ATTLIST defect id CDATA #REQUIRED>
<!ELEMENT asset (#PCDATA)>
<!ATTLIST asset id CDATA #REQUIRED>
<!ATTLIST asset tag CDATA #REQUIRED>
<!ATTLIST asset exsid CDATA #REQUIRED>
<!ELEMENT zone (#PCDATA)>
<!ELEMENT component (#PCDATA)>
<!ELEMENT condition (#PCDATA)>
<!ELEMENT ffd (#PCDATA)>
<!ELEMENT inspid (#PCDATA)>
<!ATTLIST inspid timestamp CDATA #REQUIRED>
<!ELEMENT mileage (#PCDATA)>
<!ELEMENT operator (EMPTY) >
<!ATTLIST operator fname CDATA #REQUIRED>
<!ATTLIST operator lname CDATA #REQUIRED>
<!ELEMENT repair (agent, date, orderno, note)>
<!ATTLIST repair id CDATA #IMPLIED>
<!ELEMENT agent (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT orderno (#PCDATA)>
<!ELEMENT note (#PCDATA)>
<!ELEMENT pending (date)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT vin (#PCDATA)>
Reply Data | |
---|---|
Name | Description |
count | The number of defects returned. |
id (defect) | The defect internal id number |
asset | The asset (fleet) number of the asset the defect was reported on. Text, 20 characters maximum length. See the asset response for more information. |
id (asset) | The asset internal id number of the asset the defect was reported on. |
tag (asset) | The RFID tag number assigned to the asset. Integer, may be zero. |
exisid (asset) | The external system identifier string. An arbitrary identification string assigned to the asset. Text , 40 characters maximum length. |
zone | The name of the inspection zone the defect was reported in. Text, 20 characters maximum length. |
component | The defective component name. Text, 64 characters maximum length. |
condition | The defective component's condition label. Text, 32 characters maximum length. |
ffd | Fitness For Duty. If false , the defect prevents safe use of the asset. If true the asset may be safely used without repairing the defect. |
inspid | The internal id number of the inspection the asset was reported in. Use as a target for the get inspection details function. |
timestamp (inspection) | The inspection timestamp. Unix epoch timestamp (UTC). |
mileage | The numeric value reported for the primary asset. Usually, but not always the odometer reading at the time of the inspection. The specific inspection procedures will determine what this value means. |
operator fname | The first name of the operator who reported the defect. Text, 32 characters maximum length. |
operator lname | The last name of the operator who reported the defect. Text, 32 characters maximum length. |
repair id | The internal id number for the repair (if any) performed on the defect. |
agent (repair) | The last and first name of the agent (mechanic) who performed the repair. Text, 66 characters maximum length (32 first name, 32 last name, 2 for comma and space). |
date (repair) | Timestamp the repair was performed. Unix epoch timestamp (UTC). |
orderno (repair) | A user supplied string identifying the repair. May be a work order number or similar. The user's specific operating practices will determine exactly what this means. Text, 20 characters maximum length, may be empty. |
note (repair) | A user supplied note describing the repair, or providing additional information. Text, unlimited length, will always have some content. |
date (pending) | Timestamp that this pending repair is to be repaired by. Unix epoch timestamp (UTC). |
vin | (logvers >= 2) The asset's VIN. |
Example Success Reply
<?xml version="1.0"?>
<defectlist ver="1.19">
<count>25</count>
<defect id="361">
<asset id="4" tag="9005" exsid="A1234">32161_Dave_Garmin</asset>
<zone>INSIDE CAB</zone>
<component>BRAKES</component>
<condition>LEAKING</condition>
<ffd>false</ffd>
<inspid timestamp="1379697183">1559</inspid>
<mileage>27</mileage>
<operator fname="Kasey" lname="Keller"/>
<repair/>
<pending/>
</defect>
<defect id="362">
<asset id="4" tag="9005" exsid="A1234">32161_Dave_Garmin</asset>
<zone>INSIDE CAB</zone>
<component>EXITS/DOORS</component>
<condition>DENTED</condition>
<ffd>false</ffd>
<inspid timestamp="1335826344">1560</inspid>
<mileage>27</mileage>
<operator fname="Kasey" lname="Keller"/>
<repair/>
<pending/>
</defect>
<defect id="353">
<asset id="71115" tag="0" exsid="finalsysid">Matt_5375587</asset>
<zone>INSIDE CAB</zone>
<component>BRAKES</component>
<condition>NON OPERATIONAL</condition>
<ffd>false</ffd>
<inspid timestamp="1370906232">1542</inspid>
<mileage>380</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="354">
<asset id="71115" tag="0" exsid="finalsysid">Matt_5375587</asset>
<zone>INSIDE CAB</zone>
<component>BRAKES</component>
<condition>NON OPERATIONAL</condition>
<ffd>false</ffd>
<inspid timestamp="1371070875">1544</inspid>
<mileage>385</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="355">
<asset id="71115" tag="0" exsid="finalsysid">Matt_5375587</asset>
<zone>INSIDE CAB</zone>
<component>1ST AID/EMERGENCY</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1371142665">1546</inspid>
<mileage>390</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="343">
<asset id="71008" tag="1001811" exsid="4444444">Mattb_5375587</asset>
<zone>ENGINE</zone>
<component>BELTS/HOSES</component>
<condition>NON OPERATIONAL</condition>
<ffd>false</ffd>
<inspid timestamp="1368553001">1520</inspid>
<mileage>362</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="344">
<asset id="71008" tag="1001811" exsid="4444444">Mattb_5375587</asset>
<zone>INSIDE CAB</zone>
<component>BRAKES</component>
<condition>NON OPERATIONAL</condition>
<ffd>false</ffd>
<inspid timestamp="1368652266">1522</inspid>
<mileage>372</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="348">
<asset id="71008" tag="1001811" exsid="4444444">Mattb_5375587</asset>
<zone>ENGINE</zone>
<component>BELTS/HOSES</component>
<condition>MISSING</condition>
<ffd>false</ffd>
<inspid timestamp="1370631100">1534</inspid>
<mileage>377</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="349">
<asset id="71008" tag="1001811" exsid="4444444">Mattb_5375587</asset>
<zone>ENGINE</zone>
<component>TRANSMISSION</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1370882154">1536</inspid>
<mileage>378</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="196">
<asset id="71" tag="0" exsid="">MT_V2J_5322095</asset>
<zone>ENGINE</zone>
<component>TSR01222222222222</component>
<condition>ZZZZZZZZZZZZZZ</condition>
<ffd>false</ffd>
<inspid timestamp="1331234583">1241</inspid>
<mileage>194</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending>
<date>1341108812</date>
</pending>
</defect>
<defect id="195">
<asset id="74" tag="0" exsid="">MT_V2J_2000146</asset>
<zone>RIGHT REAR</zone>
<component>REAR LIGHTING</component>
<condition>BACK UP ALARM INOP</condition>
<ffd>false</ffd>
<inspid timestamp="1331234474">1240</inspid>
<mileage>193</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending>
<date>1341108820</date>
</pending>
</defect>
<defect id="197">
<asset id="70667" tag="0" exsid="">MT_V2J_6325465</asset>
<zone>ENGINE</zone>
<component>BELTS/HOSES</component>
<condition>LOOSE</condition>
<ffd>false</ffd>
<inspid timestamp="1331234748">1242</inspid>
<mileage>195</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending>
<date>1341108777</date>
</pending>
</defect>
<defect id="365">
<asset id="62" tag="61960" exsid="EXSID123">DaveD_4210022</asset>
<zone>RIGHT FRONT</zone>
<component>BRAKES</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1387473167">1562</inspid>
<mileage>305</mileage>
<operator fname="Dave" lname="Doneux"/>
<repair/>
<pending/>
</defect>
<defect id="366">
<asset id="62" tag="61960" exsid="EXSID123">DaveD_4210022</asset>
<zone>FRONT</zone>
<component>BUMPER</component>
<condition>BROKEN</condition>
<ffd>false</ffd>
<inspid timestamp="1387477777">1563</inspid>
<mileage>307</mileage>
<operator fname="Dave" lname="Doneux"/>
<repair/>
<pending/>
</defect>
<defect id="358">
<asset id="70679" tag="10050" exsid="">Zina_5355030</asset>
<zone>INSIDE CAB</zone>
<component>1ST AID/EMERGENCY</component>
<condition>CORRODED</condition>
<ffd>false</ffd>
<inspid timestamp="1375735944">1556</inspid>
<mileage>454</mileage>
<operator fname="Zina" lname="Levinta"/>
<repair/>
<pending/>
</defect>
<defect id="317">
<asset id="70679" tag="10050" exsid="">Zina_5355030</asset>
<zone>ENGINE</zone>
<component>TRANSMISSION</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1355353779">1453</inspid>
<mileage>422</mileage>
<operator fname="Zina" lname="Levinta"/>
<repair/>
<pending/>
</defect>
<defect id="318">
<asset id="70679" tag="10050" exsid="">Zina_5355030</asset>
<zone>RR</zone>
<component>BRAKES</component>
<condition>LEAKING</condition>
<ffd>false</ffd>
<inspid timestamp="1355353779">1453</inspid>
<mileage>422</mileage>
<operator fname="Zina" lname="Levinta"/>
<repair/>
<pending/>
</defect>
<defect id="321">
<asset id="70679" tag="10050" exsid="">Zina_5355030</asset>
<zone>LF</zone>
<component>TIRES/WHEELS/LUGS</component>
<condition>MISSING</condition>
<ffd>false</ffd>
<inspid timestamp="1355366055">1455</inspid>
<mileage>426</mileage>
<operator fname="Zina" lname="Levinta"/>
<repair/>
<pending>
<date>1358966058</date>
</pending>
</defect>
<defect id="350">
<asset id="70679" tag="10050" exsid="">Zina_5355030</asset>
<zone>LEFT FRONT</zone>
<component>BRAKES</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1370986500">1539</inspid>
<mileage>450</mileage>
<operator fname="Zina" lname="Levinta"/>
<repair/>
<pending/>
</defect>
<defect id="308">
<asset id="70582" tag="0" exsid="">Dave_5322444</asset>
<zone>RIGHT FRONT</zone>
<component>TIRES/WHEELS/LUGS</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1354582603">1447</inspid>
<mileage>16</mileage>
<operator fname="Dave" lname="Doneux"/>
<repair/>
<pending>
<date>1354752447</date>
</pending>
</defect>
<defect id="363">
<asset id="70582" tag="0" exsid="">Dave_5322444</asset>
<zone>ENGINE</zone>
<component>BELTS/HOSES</component>
<condition>DAMAGED</condition>
<ffd>false</ffd>
<inspid timestamp="1386801760">1561</inspid>
<mileage>423</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="359">
<asset id="70582" tag="0" exsid="">Dave_5322444</asset>
<zone>INSIDE CAB</zone>
<component>DEAD</component>
<condition>NO</condition>
<ffd>false</ffd>
<inspid timestamp="1378831309">1558</inspid>
<mileage>421</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="360">
<asset id="70582" tag="0" exsid="">Dave_5322444</asset>
<zone>INSIDE CAB</zone>
<component>STJI</component>
<condition>QPO</condition>
<ffd>false</ffd>
<inspid timestamp="1378831309">1558</inspid>
<mileage>421</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
<defect id="325">
<asset id="70659" tag="111111" exsid="222">Matt_5325214 HOLD</asset>
<zone>FRONT</zone>
<component>COOL</component>
<condition>DIRTY</condition>
<ffd>false</ffd>
<inspid timestamp="1355866112">1471</inspid>
<mileage>301</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending>
<date>1359420768</date>
</pending>
</defect>
<defect id="334">
<asset id="70966" tag="0" exsid="">Mattb_8000018</asset>
<zone>RIGHT REAR</zone>
<component>REAR LIGHTING</component>
<condition>4 WAY INOP</condition>
<ffd>false</ffd>
<inspid timestamp="1363026046">1494</inspid>
<mileage>316</mileage>
<operator fname="Matt" lname="Benson"/>
<repair/>
<pending/>
</defect>
</defectlist>