Main Web API Documentation Information
Actual Page/Function Name:
getFullInvoiceDetails
Human Readable Name or Caption:
Get Full Invoice Details
Page/Function Description:
This method will get all details of a single invoice.
Page/Function Output Type:
API - JSON or WDDX
Categories:
eComm,invoice
Extra Page/Function Notes:
This method will return all the pieces for single invoices. This includes things like main information, customer information, line items, payments, stock unit information, and other invoice values.


Parameters
Scope Name Type Default Description Required Alternates Known Values
Arguments CORP_ID Numeric 0 Pass in the corp id number. This is your corporation ID or your business world number. This is required and will be validated. The default is 0, but will be checked for a real number. Yes
Arguments INVOICE_NUMBER Numeric 0 Pass in the invoice number. This is the primary key that ties the main invoice to the line items and other details. As a note, you should have already ran the startMainInvoice method. Use that id number to pass to this method. Yes
Arguments LINE_SHOW String hide Pass in the string "all" for all visible and non-visible line items. Use the string "hide" for only visible lines. Yes


Results
RET_STATUS RET_MAIN_MESSAGE RET_SECOND_MESSAGE Redirect Link Description
ok success This assumes that everything went well.
Name Type Description Notes
MAIN_INVOICE_DETAILS_ARRAY Array This is the query result for the main invoice details. This result set will include things such as: invoice amount, customer id, invoice date, invoice notes, invoice number, customer information, location information, etc. This will return 50+ values based on the invoice requested.
MAIN_STOCK_INFO_ARRAY Array This query will return any main stock information. This is usually used for internal ticketing. This result set will return things such as: engine, stock, transmission, vin, make name, model, etc.
INVOICE_LINE_ARRAY Array An array of all the line item details with some formatting. This will end up being a named array. It will have line item details, time information, stock information, additional parts information, etc. It should already be fairly well formatted.
INVOICE_PAYMENTS_ARRAY Array This is a query result of all the payment information for this invoice. Possibly a one-to-many relationship to the invoice. This will include things like amounts, whether or not it was deposited, authorization codes, who made it, etc.
INVOICE_LINE_ITEMS_ARRAY Array Unformatted query results for invoice line items. This will return all the raw results for the invoice line items without any formatting. If you want formatting applied, check the INVOICE_LINE_ARRAY sub result.
TAX_SUMS_ARRAY Array This is an array of sums of individual taxes. This includes taxes for 1, 2, 3, 4, 5, state, county, city, and out of area.
STORE_INFO_ARRAY Array This gives us the dynamic naming of the five custom tax options. These are considered the titles for the tax categories. If you have multiple locations, these values will change based on the invoice. It's basically the aliases for the custom tax fields.
ADDITIONAL_CUSTOMERS_ARRAY Array This will get any additional customers that are tied to the invoice. These might be things like co-signers, shipping addresses, special billing instructions, or other possible parties that are involved. This includes things like names, addresses, notes, locations, any sort of special relationships, etc.
HIDDEN_LINE_ITEMS_ARRAY Array This will return a simple count if there are any hidden line items. Sometimes hidden line items are used for tracking sub-details that you don't want to show to your customer. Ex: if you wanted to bill a job for $400, it may require multiple pieces that are needed internally, but you may not want to show those to the end client.
ELEMENTS_OF_TIME_ARRAY Array This populates an array with all elements of time associated with the invoice. These are simple values such as color, start date, notes, title, and time id.
FLEX_GRID_COUNT Numeric This is a count of all the records in the flex grid for the invoice. This is just a number for informational purposes.
CHECK_PAID_DATE_ARRAY Array This is an array with information about the paid date and status for the invoice. This array includes other values such as (customer id) for look-ups.
CHECK_FOR_REOCCURRING_ARRAY Array This is an array that's populated to check whether the invoice is part of a reoccurring invoice. This uses the new invoice number to tell whether the invoice is a part of a reoccurring invoice.
SUB_TOTAL Decimal This is a total of the line amounts. This is the total of all the line amounts before tax.
TOTAL_TAX Decimal Sum of all the taxes per line. This is a sum of all the tax.
GRAND_TOTAL Decimal This is the total of the extended item price the extended tax total. This is a total of all the prices on the invoice.
ORIGINAL_TOTAL Decimal This is a sum of the original line totals. This is a sum of the original line totals.
SAVINGS_TOTAL Decimal This is the sum of the savings line amounts. This is the total of all savings on the invoice.
TOTAL_PAYMENT Decimal This is the sum of the amount paid. This includes all the "amount paid" fields on the invoice.
REMAINING_AMOUNT Decimal This is the grand total minus the total payment. This is the amount left that hasn't been paid.
CART_AS_A_WHOLE_DISCOUNT Decimal This is the discount rate on the invoice. This is the discount rate on the invoice.
CART_AS_A_WHOLE_DISCOUNT_CAMPAIGN String This is the discount campaign for the invoice. This is the discount campaign for the invoice.
SHOW_DISCOUNT_COLUMNS Decimal This is automatically set to "yes" if there are any discount lines. This is to determine whether or not to show the discount columns.
dataIn Unable to get the invoice details. Missing some data. Use your back button and try again. If it doesn't pass general validation, it will return this.
zero Unable to find the invoice you requested in the database. Use your back button and try again. If we're unable to find the invoice requested, this will respond with a zero.
db Unable to connect to the database. Missing the main invoice information. Use your back button and try again. Error in querying the main invoice details, store info, stock info, invoice payments, additional customers, elements of time, or flex grid check.
stock Unable to find the stock number [____]. Missing invoice line items. Use your back button and try again. This is a line item level check in case it couldn't find an associated stock unit. This only runs if it shows that a stock unit was assigned to the invoice as a line item.
db2 Unable to connect to the database. Missing the invoice line items information. Use your back button and try again. This error message comes back if there was a problem checking for invoice line items, sub stock unit information, tax sums, or hidden line item counts. This section also populates an array of formatted line items.
db3 Problems while doing math on invoice totals. Missing the invoice line items information. Use your back button and try again. This message comes back if there was an error with the line numbers, line sum, discounts check, payment sum, transaction dates check, paid date check, or reoccurring invoice check.


Samples
Caption Text
JSON
{"API_CALL_FUNCTION_NAME":"getFullInvoiceDetails","CORP_ID":"53","INVOICE_NUMBER":"78","LINE_SHOW":"hide","API_CORP_KEY_ID":"PLA-0053","API_USER_NAME":"demo","API_USER_PASSWORD":"1234","API_CURRENT_PAYEE_ID":"3","API_INPUT_OUTPUT_TYPE":"JSON","API_URL_ENCODING":"AUTO"}