How to search Zoho custom module using API v2?

主宰稳场 提交于 2020-08-10 18:52:06

问题


I am using an access token with ZohoCRM.modules.custom.READ.

When I send a GET request to https://www.zohoapis.com/crm/v2/Custom/search, I get the following error.

{
    "code": "INVALID_MODULE",
    "details": {},
    "message": "the module name given seems to be invalid",
    "status": "error"
}

What am I doing wrong and how do I define the module I am trying to pull data from (it is called CustomModule2)?


回答1:


Figured it out...

First, needed to go to https://crm.zoho.com/crm/{org_id}/settings/modules to find the actual name of CustomModule2 which is Adresses livraison.

Then, needed to go to https://crm.zoho.com/crm/{org_id}/settings/api/modules to find the API name for Adresses livraison which is Adresses_livraison.

Finally, needed to go to https://crm.zoho.com/crm/{org_id}/settings/api/modules/CustomModule2?step=FieldsList to find the API name of the field I wanted to use as a search criteria (it was Compte].

The final query using httpie is as follows.

http GET https://www.zohoapis.com/crm/v2/Adresses_livraison/search \
Authorization:"Zoho-oauthtoken {access_token}" \
criteria=="(Compte:equals:{account_id})"

Zoho is up there in the most awkward developer experiences I have encountered.



来源:https://stackoverflow.com/questions/63178814/how-to-search-zoho-custom-module-using-api-v2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!