Use this call to assign repairs to defects. This action replaces the deprecated extaddrepair action. This allows defects to be repaired individually, rather than forcing all defects for an inspection to be repaired at once.
Request Data (Add Repair)
Required Information | |
---|---|
Name | Description |
action | addrepair |
mechanic | Identifier for the individual performing work. This is the user login name. |
repair_date | Timestamp of when actual repair was done. |
inspid | Id of the inspection that initiated this work. |
defectid | Id of the defect to be repaired. |
comment | Description or repair note. Free form text, unlimited length. |
format | xml |
Optional Information | |
sonumber | Service / work order number. 20 character max. |
norepair | Flag to specify if no repair was required. Acceptable values. |
true | If true is the value passed, the comment parameter is not required. The duration of the repair is in seconds
If no duration is supplied, 0 will be assumed. |
Request Data – Add Pending
Required Information | |
---|---|
Name | Description |
action | addrepair |
operation | pending |
inspid | Id of the inspection that initiated this work. |
defectid | Id of the defect to be repaired. |
pending_date | Timestamp of when the defect was marked as pending. |
expected_date | Timestamp of when the repair is expected to be complete. |
comment | Description or repair note. Free form text, unlimited length. |
format | xml |
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&customer=tes0703&action=addrepair&mechanic=zonar&repair_date=1541690021&inspid=3945&defectid=1098&format=xml&comment=true
Data Returned
A success or error message.
DTD
<?xml version="1.0"?>
<success ver="1.0">
<action>addrepair</action>
</success>
Example Success Reply
<success ver="1">
<action>addrepair</action>
</success>
Example Error Reply
<error ver="1.0">
<action>addrepair</action>
<code>107</code>
<message>No comment specified.</message>
</error>