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_file – Get Documents

The get_file event retrieves files saved to a work order in PPW. These can be from one of two types, specified as the module_type: job_notes are Job Note attachments and uploads is for files saved in the Photos & Documents section. These files are passed as a presigned url with an expiration of 30 minutes from time of creation.

FieldTypeDescriptionRequired
remote_report_idnumberReport_id of which the document will be added/inserted intoNo
report_idnumberReport_id of which the document originated fromYes
module_typestringType of file being processed. In this case “uploads”Yes

Request payload JSON

{
  "username": "demo",
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
  "event_name": "get_file",
  "event_data": "{\"remote_report_id\":\"12249320\",\"report_id\":\"12236327\", \"module_type\":\"uploads\"}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "get_file",
    "event_data": "{\"remote_report_id\":\"12249320\",\"report_id\":\"12236327\",\"module_type\":\"uploads\"}"
  }' \
  https://www.propertypreswizard.com/api/link/receiver.php

Response JSON

{
  "remote_site_id": "b2793f7e-319a-4d64-9d0f-6b1e87c651c6",
  "success": true,
  "return_error_msg": null,
  "result_data": [{
    "remote_report_id": "0",
    "report_id": "59879",
    "file_id": 21960,
    "file_name": "48271_client_estimate-1.pdf",
    "file_type": "application/pdf",
    "file_size": "2",
    "file_desc": "",
    "s3_url": "https://link\to\file",
    "s3_url_thumb": "https://link\to\thumbnail",
    "module_type": "uploads",
    "org_name": "DEMO",
    "imported": 1
  }],
  "remote_org_id": 18,
  "error": false
}
FieldTypeDescription
file_namestringFile name
file_typestringMIME-type indentifier
file_sizenumberFile size
file_descstringDocument description (if any)
s3_urlstringURL to the S3 Object.
s3_url_thumbstringURL to the thumbnail (if applicable)
org_namestringOrg name of which the file originated from.
importednumberAlways 1. Used to keep track of imported vs regular files