GetOrdersByCustomerCode - accountsIQ/API-Wiki GitHub Wiki

The GetOrdersByCustomerCode function retrieves a list of sales orders that have been created for a given customer.

Declaration

C#

public WSResult2OfArrayOfOrder GetOrdersByCustomerCode(string token, string customerCode)

Visual Basic

Public Function GetOrdersByCustomerCode(ByVal token As String, ByVal customerCode As String) As WSResult2OfArrayOfOrder

Parameter List

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

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
  WSResult2OfArrayOfOrder Orders = ws.GetOrdersByCustomer(auth, "TESTINTEGR");
  // Use the Orders
}

Visual Basic

Dim ws As New Integration

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

See Also

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