Rest APIs

A REST API defines a set of functions using which the developers can perform requests and receive responses via the HTTP protocols such as GET and POST.

What is Rest API?

A REST API defines a set of functions with 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.

Example:
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 the 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.

  • url : request url
  • object : list or resource object type
  • data : String or array or object
  • sync_time : request current time (Only to GET Resouce list APIs)
Example:
{
      "data" : <value - string, array or object> ,
      "url":<value - string> ,
      "object": < value - string>
}

Error Response Format:

In case of errors, the response object contains a key "error" which contains information about the error. The error object contains 2 keys namely the "code" (unique error code) and the "message" (description of the error)

Example:
{
  "error" :
    {
      "message":"Invalid URL",
      "code":1006
    }
}

Basic Authorization Errors

1. General Error:

This type of response occurs in case of internal server error (i.e., due to problems in the server while retrieving the data.)

code: 1001 ,
message: "Unknown authentication error, Contact SalesIQ Team!"
2. Invalid Header Error:

This error occurs when either the Authorization header is absent or is not set properly.

Code: 1002,
Message: "Invalid authorization header."
3. Invalid Request Type Error:

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."
4.Invalid Portal Error:

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."
5. Invalid URL error:

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"
6. Invalid Data Type:

Error sent when the data type of a parameter sent does not comply with the mentioned one.

Code: 1007 ,
Message: Invalid datatype found in params
7. Invalid OAuthToken:

This kind of error occurs if the OAuthToken is incorrect.

Code: 1008 ,
Message: Invalid OAuthToken.
8. Invalid OAuthScope:

This kind of error occurs if the OAuthScope is invalid.

Code: 1009 ,
Message: Invalid OAuthScope.
9. Invalid Method:

This kind of error occurs if the mentioned method is invalid.

Code: 1010 ,
Message: Invalid Method.
10. Invalid Params:

This kind of error occurs if the provided param is invalid or not present .

Code: 1011 ,
Message: Either the request parameters are invalid or absent.
11. Invalid Inputstream:

This kind of error occurs if the provided inputstream is invalid or is not present.

Code: 1015 ,
Message: Either the inputstream is invalid or absent.

General Errors

1. Resource Already Exists:

This type of response occurs in case if the provided resource details already exisits.

code: 1014 ,
message: "Resource already exists"
2. Permission Denied:

This type of error occurs when the operator doesn't have the access to perform the operation based on their role (Associate, Supervisor, Administrator).

Code: 1016,
Message: "Operator doesn't have the permission to perform the operation"
3. Limit Exceeded:

This type of error occurs when the resource limit has exceeded. This is based on their current Zoho SalesIQ purchase plan.

Code: 1017 ,
Message: "Resource limit reached for current plan"
4.Empty File:

This type of error occurs when the file sent doesn't contain any data.

Code: 1018 ,
Message: "File is empty"
5. Invalid Resource:

This kind of error occurs if the requested resource is not valid.

Code: 1019 ,
Message: "Invalid Resource"
6. Invalid Operator:

This type of error occurs when the requested operator does not belong to the portal.

Code: 1020 ,
Message: Invalid operator
7. Upgrade Needed:

This kind of error occurs if your current plan does not support the requested action.

Code: 1021 ,
Message: Operation is not available in the current plan
8. Remote IP Locked:

This kind of error occurs if too many actions are performed at the same time and the IP is blocked from performing any action for a while.

Code: 1023 ,
Message: Too many requests, Please try after sometime
9. Invalid Operator IDs:

This kind of error occurs if the requested operator ID is not valid.

Code: 1024 ,
Message: Invalid Operator id/s
10. Invalid Department IDs:

This kind of error occurs if the requested department ID is not valid or is not present .

Code: 1025 ,
Message: Invalid Department IDs
11. Last Available Resource:

This kind of error occurs if you are about to delete the last available resource in the portal. (Ex: If your portal has one department and you are about to delete that department, then this error will occur.)

Code: 1026 ,
Message: Last available resource
12. File Size Exceeded:

This kind of error occurs if the file size is greater than the allowed size.

Code: 1027 ,
Message: File size is greater than the allowed size
13. Invalid File Type:

This kind of error occurs if the file type is not valid.

Code: 1028 ,
Message: Invalid file type
14. Invalid Filters:

This kind of error occurs if the filter you have applied is not valid.

Code: 1029 ,
Message: Invalid Filter
15. Insufficient Data:

This kind of error occurs if the given data is insufficient to perform the action.

Code: 1031 ,
Message: Insufficient data