COQL "Minimum Successful Response" script for testing/setup:
queryMap = Map();
query = "select Last_Name from Contacts where Last_Name is not null" queryMap.put("select_query", query);
response = invokeUrl [
url: coqlurl
type: POST
parameters: queryMap.toString()
connection: "zcrm" ];
info response;
Generic Error Message (may be sent for a number of issues): {"code":"INVALID_REQUEST","details":{},"message":"unable to process your request. please verify whether you have entered proper method name, parameter and parameter values.","status":"error"}
Things to check:
1. API version, try both v2 and v3
2. If using a Zoho "Connection" feature, make sure COQL is explicitly enabled in the scope using a Zoho OAuth connection.
3. COQL requires mandatory WHERE clauses on all requests! This can be something trivial like "where Last_Name is not null"
4. COQL does not support all modules the way the api does. At present (July 2022) COQL can query the following modules:
leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and custom modules