Rest APIs
A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocols such as GET and POST.
What is Rest API?
A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocols such as GET and POST.
What is Screen name?
The unique name provided to your SalesIQ portal is known as the screen name.
https://salesiq.zoho.com/zylker/index;
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")
{
"error" :
{
"message":"Invalid URL",
"code":1006
}
}
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.)
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.)
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.)
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.
Message: "Invalid URL"
Error sent when the data type of a param sent does not comply with the mentioned one.
Message: Invalid datatype found in params
This kind of error occurs if the OAuthToken is incorrect.
Message: Invalid OAuthToken.
This kind of error occurs if the OAuthScope is invalid.
Message: Invalid OAuthScope.