Learn how to manage both successful and failed responses from the API.
The Visla Open API always returns a 200 HTTP
status to indicate a successful connection. The code
field in the API response determines the operation's status: 0
indicates success, and any other value indicates an error or exception. The code
ranges from 0
to 23XXX
, with 0
representing success, and values outside this range signifying different types of errors or exceptions. In case of success, the data
property contains the expected results. For errors, the msg
property provides a description of the issue.
Success Response Example
{
"code": 0,
"msg": "SUCCESS",
"trackingId": "",
"data": {}
}
Failure Response Example
{
"code": 31010,
"msg": "duplicate request",
"trackingId": ""
}