UNPKG

5.33 kBMarkdownView Raw
1
2Zoho CRM API REST wrapper for node.js
3
4[![Build Status](https://travis-ci.org/ahmader/node-zoho.png?branch=master)](https://travis-ci.org/ahmader/node-zoho)
5[![NPM version](https://badge.fury.io/js/node-zoho.png)](http://badge.fury.io/js/node-zoho)
6[![Code Climate](https://codeclimate.com/github/ahmader/node-zoho.png)](https://codeclimate.com/github/ahmader/node-zoho)
7[![Stories in Ready](https://badge.waffle.io/ahmader/node-zoho.png?label=ready&title=Ready)](https://waffle.io/ahmader/node-zoho)
8
9Supports:
10 - [Zoho CRM API Version 1.0 (EOL)](http://www.zoho.com/crm/help/api/api-methods.html)
11
12Currently a WIP, but feel free to ask how you can help.
13
14## CRM Modules Support:
15
16<table>
17 <header>
18 <tr>
19 <th>Method Name</th>
20 <th>Leads</th>
21 <th>Accounts</th>
22 <th>Contacts</th>
23 <th>Potentials</th>
24 <th>Events</th>
25 <th>Tasks</th>
26 <th>Notes</th>
27 </tr>
28 </header>
29 <body>
30<tr>
31 <td>insertRecords</td>
32 <td></td>
33 <td></td>
34 <td></td>
35 <td></td>
36 <td></td>
37 <td></td>
38 <td></td>
39</tr>
40<tr>
41 <td>convertLead</td>
42 <td></td>
43 <td>NA</td>
44 <td>NA</td>
45 <td>NA</td>
46 <td>NA</td>
47 <td>NA</td>
48 <td>NA</td>
49</tr>
50<tr>
51 <td>getRecordById</td>
52 <td></td>
53 <td></td>
54 <td></td>
55 <td></td>
56 <td></td>
57 <td></td>
58 <td>NA</td>
59</tr>
60<tr>
61 <td>getDeletedRecordIds</td>
62 <td></td>
63 <td></td>
64 <td></td>
65 <td></td>
66 <td></td>
67 <td></td>
68 <td>NA</td>
69</tr>
70<tr>
71 <td>getMyRecords</td>
72 <td></td>
73 <td></td>
74 <td></td>
75 <td></td>
76 <td></td>
77 <td></td>
78 <td>NA</td>
79</tr>
80<tr>
81 <td>getRecords</td>
82 <td></td>
83 <td></td>
84 <td></td>
85 <td></td>
86 <td></td>
87 <td></td>
88 <td>NA</td>
89</tr>
90<tr>
91 <td>updateRecords</td>
92 <td></td>
93 <td></td>
94 <td></td>
95 <td></td>
96 <td></td>
97 <td></td>
98 <td>NA</td>
99</tr>
100<tr>
101 <td>searchRecords</td>
102 <td></td>
103 <td></td>
104 <td></td>
105 <td></td>
106 <td></td>
107 <td></td>
108 <td>NA</td>
109</tr>
110<tr>
111 <td>getSearchRecords</td>
112 <td></td>
113 <td></td>
114 <td></td>
115 <td></td>
116 <td></td>
117 <td></td>
118 <td>NA</td>
119</tr>
120<tr>
121 <td>getSearchRecordsByPDC</td>
122 <td></td>
123 <td></td>
124 <td></td>
125 <td></td>
126 <td></td>
127 <td></td>
128 <td>NA</td>
129</tr>
130<tr>
131 <td>deleteRecords</td>
132 <td></td>
133 <td></td>
134 <td></td>
135 <td></td>
136 <td></td>
137 <td></td>
138 <td></td>
139</tr>
140<tr>
141 <td>getRelatedRecords</td>
142 <td></td>
143 <td></td>
144 <td></td>
145 <td></td>
146 <td></td>
147 <td></td>
148 <td></td>
149</tr>
150<tr>
151 <td>getFields</td>
152 <td></td>
153 <td></td>
154 <td></td>
155 <td></td>
156 <td></td>
157 <td></td>
158 <td></td>
159</tr>
160<tr>
161 <td>updateRelatedRecords</td>
162 <td>NA</td>
163 <td>NA</td>
164 <td>NA</td>
165 <td>NA</td>
166 <td>NA</td>
167 <td>NA</td>
168 <td>NA</td>
169</tr>
170<tr>
171 <td>uploadFile</td>
172 <td></td>
173 <td></td>
174 <td></td>
175 <td></td>
176 <td></td>
177 <td></td>
178 <td>NA</td>
179</tr>
180<tr>
181 <td>downloadFile</td>
182 <td></td>
183 <td></td>
184 <td></td>
185 <td></td>
186 <td></td>
187 <td></td>
188 <td>NA</td>
189</tr>
190<tr>
191 <td>deleteFile</td>
192 <td></td>
193 <td></td>
194 <td></td>
195 <td></td>
196 <td></td>
197 <td></td>
198 <td>NA</td>
199</tr>
200<tr>
201 <td>uploadPhoto</td>
202 <td></td>
203 <td>NA</td>
204 <td></td>
205 <td>NA</td>
206 <td>NA</td>
207 <td>NA</td>
208 <td>NA</td>
209</tr>
210<tr>
211 <td>downloadPhoto</td>
212 <td></td>
213 <td>NA</td>
214 <td></td>
215 <td>NA</td>
216 <td>NA</td>
217 <td>NA</td>
218 <td>NA</td>
219</tr>
220<tr>
221 <td>deletePhoto</td>
222 <td></td>
223 <td>NA</td>
224 <td></td>
225 <td>NA</td>
226 <td>NA</td>
227 <td>NA</td>
228 <td>NA</td>
229</tr>
230<tr>
231 <td>delink</td>
232 <td>NA</td>
233 <td>NA</td>
234 <td>NA</td>
235 <td>NA</td>
236 <td>NA</td>
237 <td>NA</td>
238 <td>NA</td>
239</tr>
240<tr>
241 <td>getUsers</td>
242 <td>NA</td>
243 <td>NA</td>
244 <td>NA</td>
245 <td>NA</td>
246 <td>NA</td>
247 <td>NA</td>
248 <td>NA</td>
249</tr>
250<tr>
251 <td>getModules</td>
252 <td>NA</td>
253 <td>NA</td>
254 <td>NA</td>
255 <td>NA</td>
256 <td>NA</td>
257 <td>NA</td>
258 <td>NA</td>
259</tr>
260</body>
261</table>
262
263
264# Example of use
265
266```
267var Zoho = require('node-zoho');
268
269var zoho = new Zoho({authToken:'API-TOKEN'});
270var records = [
271 {
272 "Lead Source" : "Site Registration",
273 "First Name" : "Test",
274 "Last Name" : "Testerson",
275 "Email" : "test@testerson.com",
276 }
277];
278
279zoho.execute('crm', 'Leads', 'insertRecords', records, callback);
280
281// to pass optional parameters
282zoho.execute('crm', 'Leads', 'insertRecords', records, {wfTrigger: true}, callback);
283
284var callback = function (err, result) {
285 if (err !== null) {
286 console.log(err);
287 } else if (result.isError()) {
288 console.log(result.message);
289 } else {
290 console.log(result.data);
291 }
292}
293
294```
295
296# Contribute
297
298All the code is coffescript, but we deploy compiled js to npm. If you want to help, checkout the git repo and submit a PR.
299
300# Release instructions
301
3021. Wait for TravisCI confirmation that latest merge passes tests.
3032. Run `grunt release`. This bumps the package.json version, creates npm-shrinkwrap.json, tags this version and pushes it.
3043. `npm publish` will compile the CoffeeScript and push the latest version to npmjs.org
305
306[![NPM](https://nodei.co/npm/node-zoho.png?downloads=true)](https://nodei.co/npm/node-zoho/)
307
308[Zoho CRM API Version 1.0 (EOL)](http://www.zoho.com/crm/help/api/api-methods.html)