What is Rest API?
A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET and POST.
What is Screen name?
The unique name provided to your SalesIQ portal is known as the screen name.
What is response format?
The response format is how you get the answer from the respondent. Both the success and error responses hold the status code as 200.
Success Response Format
If the request is successful, the response object contains a key "data" which holds the result of the request.
"data" : <value - string, array or object>
Error Response Format:
In case of errors, the response object contains a key "error" which contains info about the error. Error object contains 2 keys namely the "code" ( unique error code") and the "message" (message describing the error")
Basic Authorization Errors
This type of response occurs in case of the internal server error (i.e., due to some problem in the server while retrieving the data.)
code: 1001 ,
message: "Unknown authentication error, Contact SalesIQ Team!"
This error occurs when either the Authorization header is absent or not set properly.
Message: "Invalid authorization header."
The invalid request type error occurs when the request method is incorrect (For ex : If you have sent a Post request instead of a Get URL request.)
Code: 1004 ,
Message: "Invalid Request Type."
This type of error occurs when the user portal is invalid (i.e., If the user Portal is not valid or the provided screen name is wrong.)
Code: 1005 ,
Message: "Invalid portal or wrong screen name."
This kind of error occurs if the requested URL is incorrect.
For example: https://zylker.com/api/ - is a wrong URL because the screen name is missing in the provided URL.
Code: 1006 ,
Message: "Invalid URL"
Error sent when the data type of a param sent does not comply with the mentioned one.
Code: 1007 ,
Message: Invalid datatype found in params
This kind of error occurs if the OAuthToken is incorrect.
Code: 1008 ,
Message: Invalid OAuthToken.
This kind of error occurs if the OAuthScope is invalid.
Code: 1009 ,
Message: Invalid OAuthScope.