get_all_updates
– Update Existing Orders
Work orders can be updated by sending the order again in the get_all_orders
event with a specific wo_status and additional information about what needs updated. PPW will check that the work order is valid and still in an open status. The work order will not be updated if its status is Ready for Office, Invoiced, or Complete. If the field is the same, it will not be updated. The exception is the line_items
. These will always replace the existing items. If the work order is updated, a new import log will be saved.
Fields that can be updated are
- address
- loan_type_other
- city
- lock_code
- comments
- lot_size
- cust_text
- mortgage_name
- date_due
- start_date
- key_code
- state
- line_items
- vendor_id
- loan_number
- zip
Field | Type | Description |
---|---|---|
timestamp | string | Unix timestamp |
Request payload JSON - get_all_updates
{
"username": "demo",
"password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"site_id": "dcc363d0-8ed1-48a2ba2e-f638275db4f",
"event_name": "get_all_updates",
"event_data": "{\"timestamp\":\"1491699142\"}"
}
curl -X POST \
--data 'payload={
"username": "demo",
"password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"site_id": "dcc363d0-8ed1-48a2ba2e-f638275db4f",
"event_name": "get_all_updates",
"event_data": "{\"timestamp\":\"1491699142\"}"
}' \
https://www.propertypreswizard.com/api/link/receiver.php
Response JSON
{
"remote_site_id": "1fc25d06-72bd-42f8-ad34-ecbdc5f1a4a4",
"error": false,
"success": true,
"return_error_msg": null,
"result_data": [{
"report_id": "12249320",
"wo_number": "import test 3-1",
"org_wo_num": "2272",
"wo_status": "Update",
"update_field": "lot_size",
"update_value": "45,000 sqft",
"transaction_id": "57965ecc-524a-11e9-8647-d663bd873d93"
},
{
"report_id": "12249453",
"wo_number": "import test 3-5",
"org_wo_num": "2298",
"wo_status": "Update",
"update_field": "vendor_id",
"update_value": "johnsmith",
"transaction_id": "62163786"
}
]
}
Field Name | Type/Length | Description |
---|---|---|
report_id | number | The unique id of the order. Must be an integer. |
wo_number | string | The work order number displayed to the user. |
org_wo_num | number | Not required. Is not used. |
wo_status | string | For updating orders, should be set to Update |
update_field | string | Field to update. |
update_value | string | New value for the field. |
transaction_id | string | Transaction ID from integrator. Must be unique. |
Complete or Cancel Orders
Work orders can be marked complete or canceled using the wo_status of Complete or Cancel.
Response JSON
{
"remote_site_id":"1fc25d06-72bd-42f8-ad34-ecbdc5f1a4a4",
"error":false,
"success":true,
"return_error_msg":null,
"result_data":[
{
"report_id":"12249320",
"wo_number":"import test 3-1",
"org_wo_num":"2272",
"wo_status":"Complete",
"transaction_id":"57965ecc-524a-11e9-8647-d663bd873d93"
}
]
}
Field Name | Type | Description |
---|---|---|
report_id | number | The unique id of the order. Must be an integer. |
wo_number | string | The work order number displayed to the user. |
org_wo_num | number | Not required. Is not used. |
wo_status | string | Should be set to Complete or Cancel |
update_field | string | Not used for this status. |
update_value | string | Not used for this status. |
transaction_id | string | Transaction ID from integrator. Must be unique. |
Return to Vendor (Follow Up)
Work orders can be returned to the vendor (RTV) by setting the wo_status to RTV. The reason for the followup can be passed in the update_value field.
Response JSON
{
"remote_site_id":"1fc25d06-72bd-42f8-ad34-ecbdc5f1a4a4",
"error":false,
"success":true,
"return_error_msg":null,
"result_data":[
{
"report_id":"12249320",
"wo_number":"import test 3-1",
"org_wo_num":"2272",
"wo_status":"RTV",
"update_field":"",
"update_value":"Take better photos of exterior debris.",
"transaction_id":"57965ecc-524a-11e9-8647-d663bd873d93"
}
]
}
Field Name | Type | Description |
---|---|---|
report_id | number | The unique id of the order. Must be an integer. |
wo_number | string | The work order number displayed to the user. |
org_wo_num | number | Not required. Is not used. |
wo_status | string | Should be set to RTV |
update_field | string | Not used for RTV |
update_value | string | The comment for why the order is RTV |
transaction_id | string | Transaction ID from integrator. Must be unique. |