UnallocateTransactions - accountsIQ/API-Wiki GitHub Wiki
The UnallocateTransactions
method deallocates a set of allocated transactions.
public WSResult2<WSResultStatus[]> UnallocateTransactions(String token, int[] transactionIDs)
Here is the parameter list required to use the function:
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
transactionIDS | Int32 | Array of transaction ids to unallocate. |
The following example unallocates an allocated transaction.
// Integration is the reference to the accountsIQ web service
Integration ws = new Integration();
// Try to login using the entity ID, the integrator partner key and the user provided key
string auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
// Get the transaction ID from some listing method
int transactionToUnallocateTid = 2091;
var idsToUnallocate = new List<int>();
idsToUnAllocate.Add(transactionToUnallocateTid);
// Proceed to unallocate an allocated transaction.
var result = ws.UnallocateTransactions(auth, idsToUnAllocate.ToArray());
if (result[0].Status == OperationStatus.Success)
{
// The operation succeeded
}
else if (result[0].HasExpired)
{
// The login has expired. Log the user in again.
}
else if (result[0].Status == OperationStatus.Failure)
{
// The operation failed.
// The ErrorCode field will provide more information as to what is the cause of the failure.
}
}
else
{
// The login failed. For security reasons, we cannot give more information on what went wrong.
// The most likely cause is an incorrect user key or an expired partner key.
// Put here your error handling for invalid login. Either one of the three piece of information can be incorrect.
}