Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

get_all_orders – Get Open Orders

Work orders that are in the status Unread, In Field, Follow Up, Accepted, and Rejected are sent through this action.

FieldTypeDescription
timestampstringUnix timestamp

Request payload JSON

{
  "username": "demo",
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
  "event_name": "get_all_orders",
  "event_data": "{\"timestamp\":\"1491699142\"}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "get_all_orders",
    "event_data": "{\"timestamp\":\"1491699142\"}"
  }' \
  https://www.propertypreswizard.com/api/link/receiver.php

A timestamp can be passed in the event_data field. If this is sent, only work orders that have been modified after the date are sent. This allows incremental checks for new orders. We would suggest doing a full import at least once a day to make sure all orders are captured.

The response will contain an array of objects for each work order. The result data will have the PPW internal Report ID, the Work Order #, and the PPW #. Using these fields, you should track each work order and if it has been received yet. Any new work orders will then be imported using the get work order event.

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": "Unread"
    },
    {
      "report_id": "12249453",
      "wo_number": "import test 3-5",
      "org_wo_num": "2298",
      "wo_status": "Unread"
    },
    {
      "report_id": "12249455",
      "wo_number": "import test 3-6",
      "org_wo_num": "2299",
      "wo_status": "Unread"
    },
    {
      "report_id": "12249459",
      "wo_number": "import test 3-7",
      "org_wo_num": "2300",
      "wo_status": "Unread"
    },
    {
      "report_id": "12249473",
      "wo_number": "import test 3-7",
      "org_wo_num": "2301",
      "wo_status": "Unread"
    }
  ]
}
Field NameType/LengthDescription
report_idnumberThe unique id of the order. Must be an integer.
wo_numberstringThe work order number displayed to the user.
org_wo_numnumberNot required. Is not used.
wo_statusstringFor new orders, should be set to Unread