Skip to content

GetCreditNotesByCustomerCode

Arivetti edited this page Aug 8, 2025 · 2 revisions

The GetCreditNotesByCustomerCode function retrieves a list of Sales CreditNotes that have been created for a given customer.

Declaration

C#

public WSResult2OfArrayOfCreditNote GetCreditNotesByCustomerCode(string token, string customerCode)

Visual Basic

Public Function GetCreditNotesByCustomerCode(ByVal token As String, ByVal customerCode As String) As WSResult2OfArrayOfCreditNote

Parameter List

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

Example

C#

Integration ws = new Integration();

String auth = "";// See Authentication page for more
if (auth != null)
{
    WSResult2OfArrayOfCreditNote CreditNotes = ws.GetCreditNotesByCustomer(auth, "TESTINTEGR");
    // Use the CreditNotes
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
    Dim CreditNotes As WSResult2OfArrayOfCreditNote = ws.GetCreditNotesByCustomerCode(Me.auth, "TESTINTEGR")
    If ((CreditNotes.Status = OperationStatus.Success) AndAlso (Not CreditNotes.Result Is Nothing)) Then
        Dim CreditNote As CreditNote
        For Each CreditNote In CreditNotes.Result
          ' Use the CreditNote
        Next
    End If
End If

See Also

Clone this wiki locally