ASP.NET VETtrak API web services
ContentsIndexHome
PreviousUpNext
VT_API.GetInvoicesForClient Method

Retrieves a list of invoices made out to a client.

C#
[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:
  • 0: All invoices, whether paid or not
  • 1: Only invoices that are not fully paid yet
  • 2: Only invoices that are fully paid 

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.