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

/invoice/get

This action returns the invoice associated with a work order. Use the /invoice/id action to get the invoice_id of the invoice associated with the work order.

Request

FieldDescriptionTypeRequired
invoice_idUnique identifier for the work order’s invoicenumberYes

Example:

{
  "invoice_id": 427
}
curl -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -d '{"invoice_id":427}' \
     https://ppw.web/svc/invoice/get

Response

FieldDescriptionType
invoice_idUnique identifier for the work order’s invoicenumber
invoice_dateInvoice datestring
insert_byUnique identifier of the user that created the invoicenumber
insert_dateDate when invoice was first createdstring
update_byUnique identifier of the user that last updated the invoicenumber
update_dateDate when invoice was last updatedstring
complete1 indicates invoice is complete: 0 otherwisenumber
contractor_total_adjTotal contractor price after discounts and adjustmentsnumber
client_total_adjTotal client price after discounts and adjustmentsnumber
contractor_itemsContractor invoice itemsarray
client_itemsClient invoice itemsarray

Each item in the contractor_items / client_items array can have the following fields:

FieldDescriptionType
line_idUnique identifier for the invoice item in the invoicenumber
invoice_item_idUnique identifier for the invoice item.number
invoice_item_descInvoice item description for saved PPW itemsstring
invoice_item_otherInvoice item description for other itemsstring
qtyInvoice item quantitynumber
uom_idUnique identifier for the Unit of Measure (UOM).number
priceInvoice item pricenumber
flat_feetrue if Flat Fee should be enabled; false otherwisebool
price_sub_adjContractor line item adjustment (contractor_items only)number
adj_commentComment for line item adjustment (contractor_items only)string

Example successful response:

{
  "invoice_id": 427,
  "invoice_date": "2021-04-14",
  "insert_by": 47080,
  "insert_date": "2021-04-12",
  "contractor_total_adj": 40.04,
  "client_total_adj": 19.78,
  "complete": 1,
  "update_by": 47080,
  "update_date": "2021-04-14",
  "contractor_items": [{
    "line_id": 866,
    "billing_code": "TN839486",
    "invoice_item_id": 42921,
    "invoice_item_desc": "Locks-Padlocks",
    "qty": 2,
    "uom_id": 1,
    "price": 7.78,
    "price_adj": 10.00,
    "adj_comment": "Adjust line item price to 10",
    "insert_date": "2021-04-12 16:21:25",
    "insert_by": 47080
  }, {
    "line_id": 874,
    "billing_code": "TN9283",
    "invoice_item_id": 42933,
    "invoice_item_desc": "Locks",
    "qty": 3,
    "uom_id": 2,
    "price": 6.68,
    "price_adj": null,
    "adj_comment": "",
    "insert_date": "2021-04-14 11:05:24",
    "insert_by": 47080
  }],
  "client_items": [{
    "line_id": 867,
    "billing_code": "TN839486",
    "invoice_item_id": 42921,
    "invoice_item_desc": "Locks-Padlocks",
    "qty": 2,
    "uom_id": 1,
    "price": 9.89,
    "insert_date": "2021-04-14 11:05:24",
    "insert_by": 47080
  }]
}

Errors

Error TypeDescriptionStatus Code
access_deniedAccess token is invalid or expired401
scope_invalidClient app does not have the required OAuth scope403
invoice_id_requiredInvoice Id is required400
invoice_not_foundInvoice not found400