GetCustomerList - accountsIQ/API-Wiki GitHub Wiki
The GetCustomerList
function retrieves a list of arrays containing the code and name of both active and inactive customers from an entity.
public WSResult2OfArrayOfCustomer GetCustomerList(string token)
Public Function GetCustomerList(ByVal token As String) As WSResult2OfArrayOfCustomer
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
Integration_1_1 ws = new Integration_1_1();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
// Get the list of customers
accountsIQ.WSResult2OfArrayOfCustomer cuslist = ws.GetCustomerList(auth);
Assert.IsNotNull(cuslist.Result);
if (cuslist.Status == OperationStatus.Success)
{
foreach (Customer c in cuslist.Result)
{
// Do something with each customer
}
}
else
{
// Use the ErrorCode field to pinpoint the problem
}
}
Dim ws As New Integration_1_1
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
' Get the list of customers
Dim cuslist As WSResult2OfArrayOfCustomer = ws.GetCustomerList(auth)
Assert.IsNotNull(cuslist.Result)
If (cuslist.Status = OperationStatus.Success) Then
Dim c As Customer
For Each c In cuslist.Result
' Do something with each customer
Next
End If
Else Then
'Use the ErrorCode field to pinpoint the problem
End If
End If
##See Also