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

send_file – Sending a Photo or File

Attaching photos or files to a work order is done through the send_file event.

Files can be sent two ways.

  1. Files should be sent using multipart/form-data with the “file” field name. The POST data should contain four fields. The dst_report_id, file_id, file_name, and file_area.

Request payload JSON - multipart/form-data

{
  "username": "demo",
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
  "event_name": "send_file",
  "event_data": "{\"dst_report_id\":\"12249481\",\"file_id\":\"1130171565\",\"file_area\":\"0\"}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "send_file",
    "event_data": "{\"dst_report_id\":\"12249481\",\"file_id\":\"1130171565\",\"file_area\":\"0\"}"
  }' \
  https://devas.propertypreswizard.com/main/api/link/receiver.php

  1. A URL accessible to PPW can be sent in the payload for the image and thumbnail. When PPW sends results back to a third party, this method is used.
Field NameDescription
dst_report_idThe report_id file is being uploaded to.
file_id The file_id from the integrator. Used to flag photos to PCR questions. Must be unique.
file_name The file name, including the extension. Used to check allowed file types.
file_area Indicates photo or file upload. 0 = photo, 1 = file.
s3_url A URL accessible to PPW.
s3_url_thumb A URL accessible to PPW.

Request Payload JSON - URL Accessible

{
  "username": "demo",
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
  "event_name": "send_file",
  "event_data": "{\"dst_report_id\":\"12249481\",\"file_id\":\"1130171565\",\"file_area\":\"0\",\"file_name\":\"example.jpg\",\"s3_url\":\"https://your-bucket.s3.amazonaws.com/example.jpg\",\"s3_url_thumb\":\"https://your-bucket.s3.amazonaws.com/example_thumb.jpg\"}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "send_file",
    "event_data": "{\"dst_report_id\":\"12249481\",\"file_id\":\"1130171565\",\"file_area\":\"0\",\"file_name\":\"example.jpg\",\"s3_url\":\"https://your-bucket.s3.amazonaws.com/example.jpg\",\"s3_url_thumb\":\"https://your-bucket.s3.amazonaws.com/example_thumb.jpg\"}"
  }' \
  https://www.propertypreswizard.com/api/link/receiver.php

The file_id passed to the PPWL web service should be the unique ID from the integrator’s system. When photos are flagged to Bid/Completion items or PCR form questions, the integrator will send the same ID from their end and PPWL will look up the information and associate the photos correctly.

Allowed File Types

ExtensionMime TypeFile Area
jpgimage/jpeg0
jpegimage/jpeg0
pngimage/png1
gifimage/gif1
pdfapplication/pdf1
docapplication/msword1
docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document1
pptapplication/vnd.ms-powerpoint1
pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation1
ppsapplication/vnd.ms-powerpoint1
ppsxapplication/vnd.openxmlformats-officedocument.presentationml.slideshow1
odtapplication/vnd.oasis.opendocument.text1
xlsapplication/vnd.ms-excel1
xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet1
keyapplication/pgp-keys1
zipapplication/zip1
mp3audio/mpeg1
wavaudio/x-wav1
mp4video/mp41
wmvx-ms-wmv1
avivideo/x-msvideo1
mpgvideo/mpeg1
txttext/plain1
msgapplication/vnd.ms-outlook1
emlmessage/rfc8221
jxrimage/vnd.ms-photo1