Error Handling

EnableX Service Administration API service uses JSON result codes to indicate whether a method completed successfully. These response codes provide a description of problems that may have occurred with an API call, which can help you in troubleshooting the problems.

Result Code Grouping

The response codes of the UCaaS API are grouped into the following categories:

CodeCategoryDescription
1xxInformationThe request is received and processed.
2xxSuccessThe request is received and accepted.
3xxRedirectionAction is required to complete the request.
4xxClient ErrorIllegible request syntax. The request cannot be fulfilled.
5xxServer ErrorThe server failed to complete a legitimate request.

Response Codes

The response codes of the UCaaS API are grouped into the following categories:

  • Common HTTP Status Codes
CodeDescription
200OK success status: the request has succeeded.
400The header is missing. Add a valid header.
401An invalid header is used.
403The token has expired.
404Not Found.
406Unprocessable entity, validation has failed.
500An internal server error has occurred.
1001The token is not valid.
1002The request is invalid.
  • Application Specific Common Error Codes
CodeDescription
0Error.
1Success.
1401The application type must be specified.
1402The application must be a string.
1403Only a valid application must be passed.

Success Response: Successful API calls always return a JSON with HTTP 200 response code and 1 result code. For example:

{ "result": "1",
"data": {
}
}

The data object is optional. It is a dummy name named after the requested data to contain the related key fields.

Error Response: Unsuccessful API calls return a JSON with a non—zero result code. The error response in the JSON includes 3 keys: result code, error, and description. For example:

{ "result": "1504",
"msg": "Duplicate data",
"desc": "The Email Address is already registered.",
"data": {
"email": "[email protected]"
}
}