GetStockItemList - accountsIQ/API-Wiki GitHub Wiki

The GetStockItemList function retrieves a list of all (active and inactive) StockItem from an entity.

Declaration

C#

public WSResult2OfArrayOfStockItem GetStockItemList(string token)

Visual Basic

Public Function GetStockItemList(ByVal token As String) As WSResult2OfArrayOfStockItem

Parameter List

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

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
    WSResult2OfArrayOfStockItem items = ws.GetStockItemList(auth);
    if (items.Status == OperationStatus.Success)
    {
        foreach (StockItem item in items.Result)
        {
            // Do something with each item
        }
    }
    else
    {
        // Examine ErrorCode to get more information on the failure
    }
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not Me.auth Is Nothing) Then
  Dim items As WSResult2OfArrayOfStockItem = Me.ws.GetStockItemList(Me.auth)
  If (items.Status = OperationStatus.Success) Then
      Dim item As StockItem
      For Each item In items.Result
        ' Do something with each item
      Next
  Else
    ' Examine ErrorCode to get more information on the failure
  End If
End If
⚠️ **GitHub.com Fallback** ⚠️