GetOrder - accountsIQ/API-Wiki GitHub Wiki

The GetOrder function retrieves an order given its unique identifier.

Declaration

C#

public WSResult2OfOrder GetOrder(string token, int orderID)

Visual Basic

Public Function GetOrder(ByVal token As String, ByVal orderID As Integer) As WSResult2OfOrder

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
orderID Int32 Unique identifier of an order.

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
  // Get the order ID from a listing method
  int orderID = 125;
  WSResult2OfOrder order = ws.GetOrder(auth, orderID);
  Assert.IsTrue(order.Result != null && order.Status == OperationStatus.Success);
  // Use the order and maybe save it back to the system
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
  Dim orderID As Integer = 125
  Dim order As WSResult2OfOrder = Me.ws.GetOrder(Me.auth, orderID)
  Assert.IsTrue(((Not order.Result Is Nothing) AndAlso (order.Status = OperationStatus.Success)))
End If

See Also

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