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

Retrieves a list of invoices with specified criteria, regardless of invoicee.

C#
[WebMethod(Description = "Retrieves a list of invoices matching specified criteria")]
public TAuthInvoiceList GetInvoices(string token, DateTime startDate, DateTime endDate, int status);
Parameters 
Description 
string token 
String containing a token. 
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, that match the criteria

This function returns a list of invoices that meet the specified criteria. It can retrieve invoices for different invoicees. 

The startDate and endDate parameters are dates. Only invoices with an invoice date that is 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. 

Please note that retrieving a large number of invoices may be slow and may cause timeouts. 

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 "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

Copyright (c) VETtrak 2022. All rights reserved.