GetInvoicesByCustomerCode - accountsIQ/API-Wiki GitHub Wiki

The GetInvoicesByCustomerCode function retrieves a list of Sales Invoices that have been created for a given customer.

Declaration

C#

public WSResult2OfArrayOfInvoice GetInvoicesByCustomerCode(string token, string customerCode)

Visual Basic

Public Function GetInvoicesByCustomerCode(ByVal token As String, ByVal customerCode As String) As WSResult2OfArrayOfInvoice

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
customerCode String Code of the customer to retrieve the invoices of.

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
    WSResult2OfArrayOfInvoice invoices = ws.GetInvoicesByCustomer(auth, "TESTINTEGR");
    // Use the invoices
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
    Dim invoices As WSResult2OfArrayOfInvoice = ws.GetInvoicesByCustomerCode(Me.auth, "TESTINTEGR")
    If ((invoices.Status = OperationStatus.Success) AndAlso (Not invoices.Result Is Nothing)) Then
        Dim invoice As Invoice
        For Each invoice In invoices.Result
          ' Use the invoice
        Next
    End If
End If

See Also

⚠️ **GitHub.com Fallback** ⚠️