18.0 Get Defect Information

18.2 Data Returned

Back to Index
Returned information:

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 Request:

Retrieving a list of critical defects:
https://development.zonarsystems.net/interface.php?action=showopen
&operation=defects&format=xml&critical=yes

Example Success Reply

Is this api manual documents helpful?
0 out of 0 said Yes
YesNo