GetInvoicesBySupplierCode - accountsIQ/API-Wiki GitHub Wiki

The GetInvoicesBySupplierCode function retrieves a list of Purchases Invoices that have been created for a given Supplier.

Declaration

C#

public WSResult2OfArrayOfInvoice GetInvoicesBySupplierCode(string token, string SupplierCode)

Visual Basic

Public Function GetInvoicesBySupplierCode(ByVal token As String, ByVal SupplierCode As String) As WSResult2OfArrayOfInvoice

Parameter List

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

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
    WSResult2OfArrayOfInvoice invoices = ws.GetInvoicesBySupplier(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.GetInvoicesBySupplierCode(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** ⚠️