/workorder/update
This action updates/sets work order fields for a work order.
Request
| Field | Description | Required |
|---|---|---|
report_id | Unique identifier for the work order | Yes |
values | Work order field values | Yes |
The values field must be a JSON object. The keys in this object must
be a canonical work order field name. The value in this object depends
on the type of the work order field and should be set as follows:
| Work Order Field Type | Valid values(s) |
|---|---|
text | Text value |
date | Date value. Accepted formats: MM/DD/YYYY, YYYY-MM-DD, YYYYMMDD |
dropdown | Canonical value from the options in the fields.CANONICAL_WO_FIELD object returned by /workorder/get |
Example:
{
"report_id": 10616,
"values": {
"loan_number": "NVA839232",
"client_company": 12111,
"date_due": "12/20/2020",
"start_date": "12/11/2020"
}
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id":10616,"values":{"loan_number":"NVA839232","client_company":12111,"date_due":"12/20/2020","start_date":"12/11/2020"}}' \
https://ppw.web/svc/workorder/update
Response
| Field | Descrption | Type |
|---|---|---|
result | Message about the work order update | string |
org_property_id | The unique identifier of the current property the work order is associated to | number |
wo_reassociated | Set to true if the update triggered the work order to get re-associated to a different property | bool |
Example successful response:
{
"result": "Work order updated",
"org_property_id": 18489,
"wo_reassociated": false
}
Errors
| Error Type | Description | Status Code |
|---|---|---|
invalid_report_id | Unique work order identifier is invalid | 400 |
not_found | Work order does not exist | 404 |
values_required | values parameter is invalid or not specified | 400 |
invalid_field | A work order field specified in values is invalid | 400 |
invalid_date | The value of a date work order field in values is invalid | 400 |
invalid_option | The value of a dropdown work order field in values is invalid | 400 |
not_allowed | A work order field in values is not allowed | 400 |