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_bid_comp – Sending Bid/Completion Results

Bid and Completion items are sent using the send_bid_comp event. An item can be flagged as a bid and a completion in the same call. Or you can send them in separate calls. The ability to have a bid and completion tied to the same comp_note_id is for legacy support.

Request payload JSON - send_bid_comp

{   
  "username": "demo", 
  "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709", 
  "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f", 
  "event_name": "send_bid_comp", 
  "event_data": "{\"dst_report_id\":\"123456789\",\"dest_invoice_item_id\":\"\",\"src_invoice_item_id\":\"101\",\"invoice_item_desc\":\"HVAC\",\"qty_bid\":\"1\",\"client_price_bid\":\"360.00\",\"bid_note\":\"Service furnace and AC unit.\",\"qty_comp\":\"\",\"comp_note\":\"\",\"photo_flag_data\":[{\"file_id\":\"1506814912\",\"work_type\":\"b\",\"stage\":\"b\"},{\"file_id\":\"1506814913\",\"work_type\":\"c\",\"stage\":\"b\"},{\"file_id\":\"1506814914\",\"work_type\":\"c\",\"stage\":\"i\"},{\"file_id\":\"1506814915\",\"work_type\":\"c\",\"stage\":\"a\"}],\"remote_id\":\"\",\"total_items\":5,\"cur_index\":2}"
}
curl -X POST \
  --data 'payload={
    "username": "demo",
    "password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
    "event_name": "send_bid_comp",
    "event_data": "{\"dst_report_id\":\"123456789\",\"dest_invoice_item_id\":\"\",\"src_invoice_item_id\":\"101\",\"invoice_item_desc\":\"HVAC\",\"qty_bid\":\"1\",\"client_price_bid\":\"360.00\",\"bid_note\":\"Service furnace and AC unit.\",\"qty_comp\":\"\",\"comp_note\":\"\",\"photo_flag_data\":[{\"file_id\":\"1506814912\",\"work_type\":\"b\",\"stage\":\"b\"},{\"file_id\":\"1506814913\",\"work_type\":\"c\",\"stage\":\"b\"},{\"file_id\":\"1506814914\",\"work_type\":\"c\",\"stage\":\"i\"},{\"file_id\":\"1506814915\",\"work_type\":\"c\",\"stage\":\"a\"}],\"remote_id\":\"\",\"total_items\":5,\"cur_index\":2}"
  }' \
  https://www.propertypreswizard.com/api/link/receiver.php

The details of the JSON object are described below.

Field NameDescription
comp_note_id Unique ID from PPW system.
report_id The report_id file is being uploaded to.
dst_invoice_item_idThe item_id from the event get_invoice_items_order. If the item is not in the list and is “Other,” this value should be null.
src_invoice_item_idThe invoice_item_id from the local PPW account. If the item is an “Other” item then this value should be 0.
invoice_item_desc If the item is an “Other” item or not in the list of defined items from get_invoice_items_order, this field should be filled in.
qty_bid Quantity of items for the bid. If there is a value in this field, the item will be set as a bid.
client_price_bid The per item price for the bid.
bid_note Any notes or comments for the bid.
qty_comp Quantity of items for the completion. If there is a value in this field, the item will be set as a completion.
comp_note Any notes or comments for the completion.
remote_id The comp_note_id from the response object. If this is set, the existing Bid/Comp item will be updated.
photo_flag_data An array of objects that indicates how photos are flagged to the bid or completion item.
total_items When bid/comp items are sent from PPW, the total added to the queue will be in this field.
cur_index When total_items is set from PPW, this will be the number of the current item being sent. Ex total_items = 5 cur_index = 3.

Photo Flag Data Fields

Field NameDescription
file_id The file_id for the photo. This file_id should match the file_id from the send_file event.
work_typeThis can be a “b” for bid or “c” for completion.
stage If the work_type is “b” then this will always be set to “b”. If “c,” then can be “b” (before), “i” (in progress), or “a” (after).

The response result_data will contain the comp_note_id of the created record. This comp_note_id can be used to update the item if needed. Bid/Comp items can only be updated while order is open and still assigned to the contractor.

Response JSON

{ 
   "remote_site_id":"1fc25d06-72bd-42f8-ad34-ecbdc5f1a4a4", 
   "error":false, 
   "success":true, 
   "return_error_msg":null, 
   "result_data": {"comp_note_id":10161276} 
}