Returns information about a specific invoice.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Requires the View permission for invoices. An outlet-level user can only read invoices of their active outlet; any other invoice returns 404.
For the values of processing_status, approval_status, history and processing_error, see Managing Invoices.
Line items and totals
line_items, invoice_totals and the net, gross and extracted totals are returned only when the library has the Invoice Line Level module, which line_level_invoices_visible reports. Without it, line_items is an empty list and those totals are null.
The invoice carries two sets of totals, and they can differ:
- As printed:
extracted_amount_netandextracted_amount_grossare the totals read from the invoice file, or as corrected by a user.invoice_totalskeeps what was read, with the VAT per rate intax_breakdownand the discounts and charges on the whole document inallowances_charges. - As summed from the line items:
total_amount_netadds up theirline_extension_amount, andtotal_amount_grossadds theirtax_amountas well.
Line amounts come before the document-level discounts and charges. Subtract the discounts and add the charges in allowances_charges to the sum of the lines to reach the printed subtotal.
Ingredients and purchase orders
ingredient_url is the path of a page in the Apicbase web app, not an API URL, for example /library/ingredient/226040915630008/. The number in it is the ingredient ID to pass to Get Ingredient Details. It is the main ingredient of the stock item whose supplier package the line is matched to, and null when the line is not matched to a package. When that stock item is a recipe, it points at the ingredient that holds the recipe in stock, not at the recipe.
The IDs inside purchase_order_package and credit_request are numbers, while id fields elsewhere in the response, such as those in purchase_orders, are strings. Convert before comparing purchase_order_package.purchase_order_id with the id of an entry in purchase_orders.
