Retrieves a list of invoices made out to a client.
[WebMethod(Description = "Retrieves a list of invoices made out to a client")] public TAuthInvoiceList GetInvoicesForClient(string token, string clientCode, DateTime startDate, DateTime endDate, int status);
Parameters |
Description |
string token |
String containing a token. |
string clientCode |
String of the client code to retrieve invoices for. |
DateTime startDate |
Datetime of start date of date range to retrieve invoices for. |
DateTime endDate |
Datetime of end date of date range to retrieve invoices for. |
int status |
Status of invoices to retrieve. Valid values are:
|
TAuthInvoiceList containing a list of invoices, each of which contains a list of invoice line items, for the client that match the criteria
This function returns a list of invoices that are made out to a specified client and meet the specified criteria.
The clientCode parameter must be the code of an existing client to retrieve invoices for.
The startDate and endDate parameters are dates. Only invoices that were recorded between these dates are returned. The startDate must not be after the endDate.
The status parameter indicates what types of invoices to return. Use 0 to return all invoices. Use 1 to return only invoices that are not yet fully paid. Use 2 to return only invoices that are fully paid.
Each invoice is represented by a TInvoice object. Each of these objects has an InvoiceItems property that contains a list of TInvoiceItem - each of these objects represents a line item on the invoice. The list of invoices is returned in a TAuthInvoiceList object.
A token is passed for authentication. If the authentication fails, or other errors occur, no invoices are returned. The result of the authentication is represented by a TAuthenticate object.
Requires a valid registration key entry for the Finance feature.
This function has security level "Restricted". Users that have explicitly been granted permission to the API can use it with any parameters, otherwise, the logged-in client can only access their own data.
Copyright (c) VETtrak 2022. All rights reserved.
|