GetSupplierList - accountsIQ/API-Wiki GitHub Wiki

The GetSupplierList function retrieves a list of arrays containing the code and name of both active and inactive Suppliers from an entity.

Declaration

C#

public WSResult2OfArrayOfSupplier GetSupplierList(string token)

Visual Basic

Public Function GetSupplierList(ByVal token As String) As WSResult2OfArrayOfSupplier

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.

Example

C#

Integration_1_1 ws = new Integration_1_1();
String auth = ws.Login(entityID, partnerKey, userKey);

if (auth != null)
{
  // Get the list of Suppliers
  accountsIQ.WSResult2OfArrayOfSupplier suplist = ws.GetSupplierList(auth);
  Assert.IsNotNull(suplist.Result);

  if (suplist.Status == OperationStatus.Success)
  {
    foreach (Supplier c in suplist.Result)
    {
      // Do something with each Supplier
    }
  }
  else
  {
    // Use the ErrorCode field to pinpoint the problem
  }
}

Visual Basic

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 Suppliers
  Dim suplist As WSResult2OfArrayOfSupplier = ws.GetSupplierList(auth)
  Assert.IsNotNull(suplist.Result)
  If (suplist.Status = OperationStatus.Success) Then
    Dim c As Supplier
    For Each c In suplist.Result
      ' Do something with each Supplier
    Next
  End If
  Else Then
    'Use the ErrorCode field to pinpoint the problem
  End If
End If

##See Also

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