GetDebitNotesBySupplierCode - accountsIQ/API-Wiki GitHub Wiki
The GetDebitNotesBySupplierCode
function retrieves a list of purchases debit notes that have been created for a given Supplier.
NOTE: structurally, a debit note and a credit note are the same.
public WSResult2OfArrayOfCreditNote GetDebitNotesBySupplierCode(string token, string SupplierCode)
Public Function GetDebitNotesBySupplierCode(ByVal token As String, ByVal SupplierCode As String) As WSResult2OfArrayOfCreditNote
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
SupplierCode | String | Supplier Code used to find the debit notes. |
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
WSResult2OfArrayOfCreditNote notes = ws.GetDebitNotesBySupplier(auth, "TESTINTEGR");
if( notes.Status == OperationStatus.Success && notes.Result != null )
{
foreach( var note in notes )
{
// Use the note
}
}
}
Dim ws As New Integration
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
Dim notes As WSResult2OfArrayOfCreditNote = ws.GetCreditNotesBySupplierCode(Me.auth, "TESTINTEGR")
If ((notes.Status = OperationStatus.Success) AndAlso (Not notes.Result Is Nothing)) Then
Dim note As CreditNote
For Each note In notes.Result
' Use the DebitNote
Next
End If
End If