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

Retrieves a list of invoices made out to an employer.

C#
[WebMethod(Description = "Retrieves a list of invoices made out to an employer")]
public TAuthInvoiceList GetInvoicesForEmployer(string token, string employerIdentifier, DateTime startDate, DateTime endDate, int status);
Parameters 
Description 
string token 
String containing a token. 
string employerIdentifier 
String of the employer identifier 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 employer that match the criteria

This function returns a list of invoices that are made out to a specified employer and meet the specified criteria. 

The employerIdentifier parameter must be the identifier of an existing employer 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 "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

Copyright (c) VETtrak 2022. All rights reserved.