send_contractor_invoice
– Sending Contractor Invoice
The contractor invoice is mapped from your system to PPW by using the invoice_item_id from the get_invoice_items_order
function.
The details of the JSON object are described below.
Field Name | Description |
---|---|
dst_report_id | The report_id file is being uploaded to. |
dst_invoice_item_id | A list of items to map the invoice lines invoice_item_id to on the destination invoice. Each object should contain the line_id and the item you want selected in PPW. If you want to use the “Other” option, set the value to “other”. |
comment | The invoice comments. |
invoice_lines | A list of the invoice lines. Reference Table Below |
Invoice Lines
Field Name | Description |
---|---|
line_id | The ID of the line on your system. Sending the same line_id updates it. |
invoice_item_id | The ID of the item on your system. |
quantity | Enter the quantity of the invoice line. Number with 2 decimal places. |
price | The price for the item. Not a total, but the single quantity price. |
item_desc | This is used if the “Other” item is used. |
flat_fee | If the line is charged as a flat fee. No discount will be removed. |
Request payload JSON - send_contractor_invoice
{
"username": "demo",
"password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
"event_name": "send_contractor_invoice",
"event_data": "{\"dst_report_id\":\"12250009\",\"dst_invoice_item_ids\":{\"12880771\":\"***other***\"},\"comment\":\"\",\"invoice_lines\":[{\"line_id\":\"12880771\",\"invoice_item_id\":\"42766\",\"quantity\":\"1.00\",\"price\" :\"500.00\",\"item_desc\":\"REO Package - Basic\",\"flat_fee\":\"0\"}]}"
}
curl -X POST \
--data 'payload={
"username": "demo",
"password": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"site_id": "dcc363d0-8ed1-48a2-ba2e-f638275db4f",
"event_name": "send_contractor_invoice",
"event_data": "{\"dst_report_id\":\"12250009\",\"dst_invoice_item_ids\":{\"12880771\":\"***other***\"},\"comment\":\"\",\"invoice_lines\":[{\"line_id\":\"12880771\",\"invoice_item_id\":\"42766\",\"quantity\":\"1.00\",\"price\":\"500.00\",\"item_desc\":\"REO Package - Basic\",\"flat_fee\":\"0\"}]}"
}' \
https://www.propertypreswizard.com/api/link/receiver.php
Response JSON
{
"remote_site_id": "1fc25d06-72bd-42f8-ad34-ecbdc5f1a4a4",
"success": true,
"return_error_msg": null,
"result_data": {
"line_ids_cont": {
"invoice_id": 12345,
"line_ids": [9876]
}
},
"remote_org_id": 283,
"error": false
}