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.

Server URI

SalesIQ offers the following server URI. Choose the server URI based on your data center.

Data Center  ZohoSalesIQ_Server_URI  ZohoAccounts_Server_URI  Developer Console
US
(United States)
salesiq.zoho.comaccounts.zoho.comapi-console.zoho.com
EU
(Europe)
salesiq.zoho.euaccounts.zoho.eu

api-console.zoho.eu

IN
(India)
salesiq.zoho.inaccounts.zoho.in

api-console.zoho.in

AU
(Australia)
salesiq.zoho.com.auaccounts.zoho.com.au

api-console.zoho.com.au

CN
(China)
salesiq.zoho.com.cnaccounts.zoho.com.cn

api-console.zoho.com.cn

JP
(Japan)
salesiq.zoho.jpaccounts.zoho.jp

api-console.zoho.jp

 

What is the 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 the 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" that 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 might contain keys such as the "code" (unique error code), the "message" (description of the error), and also you might get one of these optional keys (json_key or param or header) in your error response. Use them to identify and resolve your error.

Example:
{
  "error" :
  {
    "message":"Invalid URL",
    "code":1006,
    "json_key":<value - string>, // Optional key
    "param":<value - string>, // Optional key
    "header":<value - string> // Optional key
  }
}​​​

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."
Invalid Header Value:

This error occurs when the request header value is not valid. (For ex: If an API accepts JSON input, the request header "content-type" should be "application/json")

Code: 1054,
Message: "Invalid header value"
Header: <header-name>

If your error is related to the "content-type" header you can refer to the following:

Valid content-type request header values:

For JSON input APIs - application/json

For form input APIs - application/x-www-form-urlencoded

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 datatypes found in params,
param: <Invalid-param-name>, //Optional key
json_key: <Invalid-json-key> //Optional key

You might get one of these optional keys (json_key or param) in your error response. Use them to identify and resolve your error.

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,
param: <Invalid-param-name> //Optional key
11. Invalid Inputstream:

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

Code: 1015,
Message: Either the inputstream is invalid or absent,
json_key: <Invalid-json-key> //Optional key

General Errors

1. Resource Already Exists:

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

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, lease 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 

New Key Details

  • You will get "json_key" in your error response if your input JSON key is invalid.
Example:
 {
 "department":{
    "status":012345
  },
  "app_ids":["app", 123456789],
  "operators":[
    {
      "name":"agent 1"
    },
    {
      "name":"$#!@%^"
    }
  ]
}

Note:

ScenarioSyntaxExample
If an invalid value is present inside JSONObject<parent-key>.<child-key>department.status
If an invalid value is present inside JSONArray<key>[<index>]app_ids[0]
If an invalid value is present inside an array of JSONObject<parent-key>[<index>].<child-key>operators[1].name
  • You will find "param" key in your error response if your query param or form input is invalid.
  • You will find "header" key in your error response if your request header is invalid.