Standard Response Objects and Common Error Codes

A response to an API call usually consists of a specific response, but both successful and unsuccessful responses may consist of a generic response object that verifies only that the call was received, and not that the action requested by the call took place. A generic response to an unsuccessful call provides an error code. A generic response looks like Example 3.

Example 3

Example 3

{
    "result":true,
    "errormsg":"",
    "errorcode": 0,
    "detail":"",
}
KeyValue

result

Boolean. If the call has been successfully received by the Order Management System, result is true; otherwise it is false.

errormsg

string. A successful receipt of the call returns null. The errormsg key for an unsuccessful call returns one of the following messages: Not Authorized (errorcode 20) Invalid Response (errorcode 100) Operation Failed (errorcode 101) Server Error (errorcode 102) Resource Not Found (errorcode 104)

errorcode

integer. A successful receipt of the call returns 0. An unsuccessful receipt of the call returns one of the errorcodes shown in the errormsg list.

detail

string. Message text that the system may send. The content of this key is usually null.

Last updated