WSResultStatus - accountsIQ/API-Wiki GitHub Wiki

There are two different result class returned by the API calls: WSResultStatus and WSResult2OfXXXX where XXXX is the type of real result.

WSResultStatus

This class is returned by web service calls where a modifying action is executed such as Save, Update or Create; the value returned reflects the status of the operation.

When you use a method the you should check the Status field - if its not Success or Created (for new items) then you should examine the ErrorMesssage to see details of the failure.

The following table presents the different properties available on class.

Note: All properties are read-only.

Property Type Description
ErrorCode VisorExceptionCodes Please refer to the VisorExceptionCodes list for a precise description of each code.
ErrorMessage String The message associated with any error that happened.
HasExpired Boolean If this flag is set, the token has expired. You need to re-login before attempting to call the web service again.
Status OperationStatus
The Status can be any of the of the following:

Success The operation was successful.
Failure The operation has failed. The state of the system should be unchanged.
Created The Save operation was successful, a new object was created.
NotCreated The Save operation failed: the object did not already exist on the database and the create flag was off.
Conflicted The Save operation failed: a more recent entry was present in the system.
Unknown The operation failed for an internal unknown reason.

WSResult2OfT

This class is returned by web service calls where a retrieving action is executed such as Load, GetList...

The following table presents the different properties available on class.

Note: All properties are read-only.

Property Type Description
ErrorCode VisorExceptionCodes Please refer to the VisorExceptionCodes list for a precise description of each code.
ErrorMessage String The message associated with any error that happened.
HasExpired Boolean If this flag is set, the token has expired. You need to re-login before attempting to call the web service again.
Result T Contains the result of the operation.
Status OperationStatus
The Status can be any of the of the following:

Success The operation was successful.
Failure The operation has failed. The state of the system should be unchanged.
Created The Save operation was successful, a new object was created.
NotCreated The Save operation failed: the object did not already exist on the database and the create flag was off.
Conflicted The Save operation failed: a more recent entry was present in the system.
Unknown The operation failed for an internal unknown reason.
⚠️ **GitHub.com Fallback** ⚠️