GetInvoicesByExternalReference - accountsIQ/API-Wiki GitHub Wiki
The GetInvoicesByExternalReference
function retrieves a list of sales order that have a given external reference.
public WSResult2OfArrayOfInvoice GetInvoicesByExternalReference(string token, string externalReference)
Public Function GetInvoicesByExternalReference(ByVal token As String, ByVal externalReference As String) As WSResult2OfArrayOfInvoice
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
externalReference | String | External reference to look the invoice up with. |
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
WSResult2OfArrayOfInvoice invoices = ws.GetInvoicesByExternalReference(auth, "4/07");
if (invoices.Status == OperationStatus.Success && invoices.Result != null)
{
foreach (Invoice invoice in invoices.Result)
{
// Do something with each invoice.
}
}
else
{
// Examine the ErrorCode field for more information on the error.
}
}
Dim ws As New Integration
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not Me.auth Is Nothing) Then
Dim invoices As WSResult2OfArrayOfInvoice = Me.ws.GetInvoicesByExternalReference(Me.auth, "4/07")
If ((invoices.Status = OperationStatus.Success) AndAlso (Not invoices.Result Is Nothing)) Then
Dim invoice As Invoice
For Each invoice In invoices.Result
' Do something with each invoice
Next
End If
Else
' Examine the ErrorCode field for more information on the error.
End If
End If