Last modified by Admin on 2025/06/27 12:14

From version 19.1
edited by Admin
on 2023/12/14 21:08
Change comment: There is no comment for this version
To version 3.1
edited by sonish
on 2017/04/03 16:44
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -OLD-ONEcount API Documentation
1 +sonish-APIDocument-230317-1008-18
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.sonish
Content
... ... @@ -1,8 +1,56 @@
1 +(% class="western" align="center" %)
2 +
3 +
4 +(% class="western" align="center" %)
5 +
6 +
7 +(% class="western" align="center" %)
8 +
9 +
10 +(% class="western" align="center" %)
11 +
12 +
13 +(% class="western" align="center" %)
14 +
15 +
16 +(% class="western" align="center" %)
17 +
18 +
19 +(% class="western" align="center" %)
20 +ONEcount REST API Developer's Guide
21 +
22 +(% class="western" align="center" %)
23 +Version 2.1
24 +
25 +(% class="western" align="center" %)
26 +
27 +
28 +(% class="western" align="center" %)
29 +
30 +
31 +(% class="western" align="center" %)
32 +
33 +
34 +(% class="western" align="center" %)
35 +
36 +
37 +(% class="western" align="center" %)
38 +
39 +
40 +(% class="western" align="center" %)
41 +
42 +
43 +(% class="western" align="center" %)
44 +
45 +
46 +(% class="western" align="center" %)
47 +
48 +
1 1  (% class="western" %)
2 2  **Introduction**
3 3  
4 4  (% class="western" %)
5 -ONEcount REST API is designed to allow you to directly manipulate the underlying data within the ONEcount application. This API can be used to lookup, create and update different ONEcount data components which are listed below.
53 +ONEcount REST API provides different functionality to accomplish many integration related tasks. This API can be used to lookup, create and updated different ONEcount resources which are listed below.
6 6  
7 7  (% class="western" %)
8 8  REST takes advantage of the HTTP request methods to layer itself into the existing HTTP architecture. These operations consist of the following:
... ... @@ -9,12 +9,15 @@
9 9  
10 10  1. (((
11 11  (% class="western" %)
12 -**GET** - Used for lookup of resourcesresources
13 -)))
60 +**GET** - Used for lookup of resources
61 +
62 +* (((
14 14  1. (((
15 15  (% class="western" %)
16 16  **PUT** - Used to update a resource
17 17  )))
67 +)))
68 +)))
18 18  1. (((
19 19  (% class="western" %)
20 20  **POST** - Used to create a new resource
... ... @@ -21,54 +21,178 @@
21 21  )))
22 22  
23 23  (% class="western" %)
24 -Specifically, the ONEcount API provides to the following components:
75 +ONEcount API provides following functionalities:
25 25  
26 -1. User data
27 -11. List users
28 -11. Lookup users
29 -11. Create users
30 -11. Update users
31 -1. Questions
32 -11. Lookup questions
33 -11. List questions
34 -11. Create questions
35 -1. Product data
36 -11. Lookup products
37 -11. Create products
38 -11. Update products
39 -1. Term Data
40 -11. Lookup terms
41 -11. Create terms
42 -11. Update terms
43 -1. Resource Data
44 -11. Lookup resources
45 -11. Create resources
46 -11. Update resources
47 -1. Transaction data
48 -11. Lookup transactions
49 -11. Create transactions
50 -1. Source Codes
51 -11. Lookup source code
52 -11. Create source codes
53 -11. Update source codes
54 -1. Attach a resource to a product
55 -1. Leads
56 -11. Create a lead
57 -\\\\\\
77 +1. (((
78 +(% class="western" %)
79 +**Lookup**
58 58  
81 +*
82 +
59 59  (% class="western" %)
60 -**Accessing API**
84 +User lookup
61 61  
86 +*
87 +
62 62  (% class="western" %)
63 -**REST API URL**: [[https:~~/~~/api.onecount.net/v2/>>url:https://api.onecount.net/v2/||shape="rect"]]
89 +Transaction lookup
64 64  
91 +*
92 +
65 65  (% class="western" %)
66 -**Appkey**: THIS WILL BE PROVIDED TO YOU
94 +Question lookup
67 67  
96 +*
97 +
68 68  (% class="western" %)
69 -**~ **
99 +Source code lookup
70 70  
101 +*
102 +
71 71  (% class="western" %)
104 +Product lookup
105 +
106 +*
107 +
108 +(% class="western" %)
109 +Term lookup
110 +
111 +*
112 +
113 +(% class="western" %)
114 +Resource lookup
115 +)))
116 +1. (((
117 +(% class="western" %)
118 +**Create**
119 +
120 +*
121 +
122 +(% class="western" %)
123 +Add a user/demo
124 +
125 +*
126 +
127 +(% class="western" %)
128 +Add a question
129 +
130 +*
131 +
132 +(% class="western" %)
133 +Add user transaction
134 +
135 +*
136 +
137 +(% class="western" %)
138 +Add source code
139 +
140 +*
141 +
142 +(% class="western" %)
143 +Add Product
144 +
145 +*
146 +
147 +(% class="western" %)
148 +Add Term
149 +
150 +*
151 +
152 +(% class="western" %)
153 +Add Resource
154 +
155 +*
156 +
157 +(% class="western" %)
158 +Stats – Telemarketing
159 +)))
160 +1. (((
161 +(% class="western" %)
162 +**Update**
163 +
164 +*
165 +
166 +(% class="western" %)
167 +Update a user/demo
168 +
169 +*
170 +
171 +(% class="western" %)
172 +Update a question
173 +
174 +*
175 +
176 +(% class="western" %)
177 +Update source code
178 +
179 +*
180 +
181 +(% class="western" %)
182 +Update product
183 +
184 +*
185 +
186 +(% class="western" %)
187 +Update term
188 +
189 +*
190 +
191 +(% class="western" %)
192 +Update resource
193 +)))
194 +1. (((
195 +(% class="western" %)
196 +**List**
197 +
198 +*
199 +
200 +(% class="western" %)
201 +ListQuestions
202 +
203 +*
204 +
205 +(% class="western" %)
206 +ListSourceCodes
207 +)))
208 +
209 +(% class="western" %)
210 +
211 +
212 +1. (((
213 +(% class="western" %)
214 +**Attach**
215 +)))
216 +
217 +* (((
218 +(% class="western" %)
219 +Attach resource to product
220 +)))
221 +
222 +(% class="western" %)
223 +
224 +
225 +(% class="western" %)
226 +
227 +
228 +(% class="western" %)
229 +**REST API URL**: [[https:~~/~~/api.onecount.net/v2/>>url:https://api.onecount.net/v2/||shape="rect" class="western"]]
230 +
231 +(% class="western" %)
232 +**Appkey**: THIS WILL BE PROVIDED
233 +
234 +(% class="western" %)
235 +
236 +
237 +(% class="western" %)
238 +**Function**
239 +
240 +(% class="western" %)
241 +The ONEcount REST API will be used to create, update & lookup users, transactions and questions e.t.c. in ONEcount hosted install of the client.
242 +
243 +(% class="western" %)
244 +**Accessing API**
245 +
246 +(% class="western" %)
72 72  Your HTTP requests to a REST API resource should contain the following information:
73 73  
74 74  * (((
... ... @@ -89,12 +89,9 @@
89 89  )))
90 90  
91 91  (% class="western" %)
92 -\\
267 +**Request**
93 93  
94 94  (% class="western" %)
95 -**General API Usage**
96 -
97 -(% class="western" %)
98 98  The request data in POST (for create and update) will consist of request parameters required by each method in JSON format. Value of resource will determine which resource is being requested and the access method will determine whether you are trying to create, update or lookup that resource.
99 99  
100 100  (% class="western" %)
... ... @@ -101,7 +101,7 @@
101 101  For lookup, the parameter list will be part of the request url.
102 102  
103 103  (% class="western" %)
104 -\\
276 +
105 105  
106 106  (% class="western" %)
107 107  **Response**
... ... @@ -164,7 +164,7 @@
164 164  The result of the api request will be determined by the value of the success property of result object. Here the value of success will either be 1 (true) or 0 (false) depending on whether the requested action succeed.
165 165  
166 166  (% class="western" %)
167 -\\
339 +
168 168  
169 169  (% class="western" %)
170 170  If value of success is 0 then an error will be generated inside the result object. Code property will have an error code. message property will have the details about the error. This value might be used to display the error in the client application. The response will always have a result object in it plus the individual response listed for each method.
... ... @@ -220,102 +220,134 @@
220 220   ]}]}}}}
221 221  
222 222  (% class="western" %)
223 -\\
395 +
224 224  
225 225  (% class="western" %)
226 -**~ **
398 +**Resources**
227 227  
228 -**COMPONENT: Users**
229 -
230 230  (% class="western" %)
231 -Users means the customers of your system. Users can be added, updated and searched for using the users resource from the api. For lookup, If a return parameter is specified Users object will have those fields. If nothing is specified by default only UserId is returned.
401 +Resources are the available entities that can be accessed/modified via API. Each resource can be created, updated or requested by using the corresponding http method described above.
232 232  
403 +* (((
233 233  (% class="western" %)
234 -Additionally (Array of) transaction object specifying parts of the transaction to be added to the new user can be specified. UserId, TransactionId and SubscriptionType will be ignored if specified for this case. As this is new user and new transaction is being added.
405 +questions
406 +)))
407 +* (((
408 +(% class="western" %)
409 +users
410 +)))
411 +* (((
412 +(% class="western" %)
413 +products
414 +)))
415 +* (((
416 +(% class="western" %)
417 +terms
418 +)))
419 +* (((
420 +(% class="western" %)
421 +resources
422 +)))
423 +* (((
424 +(% class="western" %)
425 +sources
426 +)))
427 +* (((
428 +(% class="western" %)
429 +transactions
430 +)))
235 235  
236 236  (% class="western" %)
237 -In this case the provided demographic information in users object will be used to create a new user in ONEcount and then a response will be generated. Before creating a new user, a check for duplicate will be performed based on Dedupe columns and if found, and error code will be generated.
433 +**Questions**
238 238  
239 239  (% class="western" %)
240 -If username and password is not one of the parameters being passed, then a random username and password will be generated for the user while creating his user account in ONEcount.
436 +This resource is for manipulating questions resource. Questions in ONEcount means any question that is asked to the subscriber. It could be any questions that appears on customer forms or print forms that gets answered by a subscriber. Questions api call will allow creation, update and search of question in ONEcount. To add a new questions to the system you'll make a POST api call to the questions resource.
241 241  
242 242  (% class="western" %)
243 -Return parameter will have the comma separated list of question Ids that is requested back from the API.
439 +The data that is sent should be in JSON format and of type questions as described in References section. The type property of questions object is described below. Questions object will only need a choices block if the question is a multiple choice question(type=4 or 5 or 6)
244 244  
245 245  (% class="western" %)
246 -Return is an optional parameter in request. If return is not requested then by default, only UserId (which is ONEcount ID) will be returned in the Users object.
442 +There can be 6 types of questions:
247 247  
248 -\\
249 -
250 -(% class="wrapped" %)
251 251  |(((
252 -(% class="western" %)
253 -**Method**
445 +(% class="western" align="center" %)
446 +**Type**
254 254  )))|(((
255 255  (% class="western" %)
256 -**Url**
449 +**Description**
450 +)))
451 +|(((
452 +(% class="western" align="center" %)
453 +1
257 257  )))|(((
258 258  (% class="western" %)
259 -**Action**
456 +Textbox type questions or short response type question. The response length needs to be less than 255 characters.
260 260  )))
261 261  |(((
262 -(% class="western" %)
263 -GET
459 +(% class="western" align="center" %)
460 +2
264 264  )))|(((
265 265  (% class="western" %)
266 -/users
463 +Textarea type question or long response type question.
464 +)))
465 +|(((
466 +(% class="western" align="center" %)
467 +3
267 267  )))|(((
268 268  (% class="western" %)
269 -Get users data limiting 25.
470 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.
270 270  )))
271 271  |(((
473 +(% class="western" align="center" %)
474 +4
475 +)))|(((
272 272  (% class="western" %)
273 -GET
477 +Select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question.
478 +)))
479 +|(((
480 +(% class="western" align="center" %)
481 +5
274 274  )))|(((
275 275  (% class="western" %)
276 -/users/<ocid or ocid_hash>
484 +Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.
485 +)))
486 +|(((
487 +(% class="western" align="center" %)
488 +6
277 277  )))|(((
278 278  (% class="western" %)
279 -Get data for user id 1. The user id can be a numeric value or a hash
491 +Checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question.
280 280  )))
493 +
281 281  |(((
282 282  (% class="western" %)
283 -GET
496 +**Method**
284 284  )))|(((
285 285  (% class="western" %)
286 -/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2
499 +**Url**
287 287  )))|(((
288 288  (% class="western" %)
289 -Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name.
290 -
291 -(% class="western" %)
292 -Return parameter defines a csv of question id that are requested back in response.
502 +**Action**
293 293  )))
294 294  |(((
295 295  (% class="western" %)
296 -POST
506 +GET
297 297  )))|(((
298 298  (% class="western" %)
299 -/users
509 +/questions
300 300  )))|(((
301 301  (% class="western" %)
302 -Create a new users
303 -
304 -(% class="western" %)
305 -Parameters required to create the user needs to be sent as post data in JSON format.
512 +List all questions
306 306  )))
307 307  |(((
308 308  (% class="western" %)
309 -PUT
516 +GET
310 310  )))|(((
311 311  (% class="western" %)
312 -/users/1
519 +/questions/1
313 313  )))|(((
314 314  (% class="western" %)
315 -Update user id 1. The user id can be a numeric value or a hash
316 -
317 -(% class="western" %)
318 -Parameters required to update the user needs to be sent as post data in JSON format.
522 +Returns question id 1
319 319  )))
320 320  |(((
321 321  (% class="western" %)
... ... @@ -322,10 +322,10 @@
322 322  GET
323 323  )))|(((
324 324  (% class="western" %)
325 -/users/1/partners/2
529 +/questions/lookup?Text=Email
326 326  )))|(((
327 327  (% class="western" %)
328 -Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.
532 +Returns all questions with “Email" in question text
329 329  )))
330 330  |(((
331 331  (% class="western" %)
... ... @@ -332,42 +332,33 @@
332 332  POST
333 333  )))|(((
334 334  (% class="western" %)
335 -/users/login
539 +/questions
336 336  )))|(((
337 337  (% class="western" %)
338 -Check to see user exist with username/email and password.
542 +Create a new question
339 339  
340 340  (% class="western" %)
341 -Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param.
342 -
545 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent.
546 +)))
547 +|(((
343 343  (% class="western" %)
344 -Example:
345 -
549 +PUT
550 +)))|(((
346 346  (% class="western" %)
347 -{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","e":"abc@[[one-count.com>>url:http://one-count.com||shape="rect"]]","p":"1234"}
348 -
552 +/questions
553 +)))|(((
349 349  (% class="western" %)
350 -OR
555 +Update a question
351 351  
352 352  (% class="western" %)
353 -{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
354 -
355 -(% class="western" %)
356 -OR
357 -
358 -(% class="western" %)
359 -{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
360 -
361 -(% class="western" %)
362 -**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found.
558 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
363 363  )))
364 364  
365 -\\
561 +
366 366  
367 367  (% class="western" %)
368 -**GET method should be used to lookup users.**
564 +**GET method can be used to lookup questions.**
369 369  
370 -(% class="wrapped" %)
371 371  |(((
372 372  (% class="western" %)
373 373  **Request**
... ... @@ -386,23 +386,18 @@
386 386  String
387 387  )))|(((
388 388  (% class="western" %)
389 -URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object.
584 +URL encoded key value string parameters for the question that a user is trying to search.
390 390  
391 391  (% class="western" %)
392 -Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]
587 +Params:
393 393  
394 394  (% class="western" %)
395 -return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
590 +Text: Word or phrase that should be present in the question text (String)
396 396  
397 397  (% class="western" %)
398 -If return is not provided, all the demographics will be returned.
593 +Type: Look up the question type.
399 399  )))
400 400  
401 -\\
402 -
403 -\\
404 -
405 -(% class="wrapped" %)
406 406  |(((
407 407  (% class="western" %)
408 408  **Response**
... ... @@ -415,47 +415,20 @@
415 415  )))
416 416  |(((
417 417  (% class="western" %)
418 -Users
419 -)))|=(((
420 -(% class="western" align="left" %)
421 -Users
608 +Questions
422 422  )))|(((
423 423  (% class="western" %)
424 -Found users returned with the demo field requested in return parameter in json format
611 +Questions
612 +)))|(((
613 +(% class="western" %)
614 +Returns found question details.
425 425  )))
426 426  
427 -\\
617 +
428 428  
429 -**Sample response for /users/(% style="color: rgb(80,80,80);" %)<OCID or ocid_hash>(%%)**
430 -
431 -Along with the demo in json format, the active packages and products of the user referred to as products and resources respectively are also returned.
432 -
433 -(% class="relative-table wrapped" style="width: 100.0%;" %)
434 -|=(((
435 -(% class="content-wrapper" %)
436 -(((
437 -[[image:attach:Screen Shot 2020-02-26 at 11.15.52 AM.png||width="1407"]]
438 -)))
439 -)))
440 -
441 -\\
442 -
443 -**Sample response for /users/lookup?(% style="color: rgb(80,80,80);" %)11=santosh@[[one-count.com>>url:http://one-count.com||shape="rect"]]&return=2,3(%%)**
444 -
445 -(% class="wrapped" %)
446 -|=(((
447 -(% class="content-wrapper" %)
448 -(((
449 -[[image:attach:Screen Shot 2020-02-26 at 11.22.13 AM.png||height="250"]]
450 -)))
451 -)))
452 -
453 -\\
454 -
455 455  (% class="western" %)
456 -**POST method should be used to create users.**
620 +**POST method should be used to create questions. The data that is sent should be in JSON format and of type questions as described in references section. Questions object will only need a choices block if the question is a multiple choice question (type=4 or 5 or 6).**
457 457  
458 -(% class="wrapped" %)
459 459  |(((
460 460  (% class="western" %)
461 461  **Request**
... ... @@ -468,49 +468,44 @@
468 468  )))
469 469  |(((
470 470  (% class="western" %)
471 -Users
634 +Questions
472 472  )))|(((
473 473  (% class="western" %)
474 -Users
637 +Questions
475 475  )))|(((
476 476  (% class="western" %)
477 -Users object that contains information about user to create. PartnerId Needs to be specified.
640 +This defines the question contents and possible responses.
478 478  )))
642 +
479 479  |(((
480 480  (% class="western" %)
481 -Transactions
645 +**Response**
482 482  )))|(((
483 483  (% class="western" %)
484 -Transactions
648 +**Type**
485 485  )))|(((
486 486  (% class="western" %)
487 -(Array of) transaction object specifying parts of the transaction to be added to the new user. UserId and TransactionId, SubscriptionType will be ignored if specified. As this is new user and new transaction is being added.
651 +**Description**
488 488  )))
489 489  |(((
490 490  (% class="western" %)
491 -DedupeColumns
655 +QuestionId
492 492  )))|(((
493 493  (% class="western" %)
494 -String
658 +Int
495 495  )))|(((
496 496  (% class="western" %)
497 -CSV of question id's that should be considered to find duplicate.
661 +Returns ONEcount question id on successful creation of the question.
498 498  )))
499 -|(((
663 +
664 +
665 +
500 500  (% class="western" %)
501 -Return
502 -)))|(((
503 -(% class="western" %)
504 -String
505 -)))|(((
506 -(% class="western" %)
507 -CSV of ONEcount QuestionId's requested back in Users object in response.
508 -)))
667 +PUT method should be used to update question.
509 509  
510 -(% class="wrapped" %)
511 511  |(((
512 512  (% class="western" %)
513 -**Response**
671 +**Request**
514 514  )))|(((
515 515  (% class="western" %)
516 516  **Type**
... ... @@ -520,24 +520,18 @@
520 520  )))
521 521  |(((
522 522  (% class="western" %)
523 -Users
524 -)))|=(((
525 -(% class="western" align="left" %)
526 -Users
681 +Questions
527 527  )))|(((
528 528  (% class="western" %)
529 -Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned.
684 +Questions
685 +)))|(((
686 +(% class="western" %)
687 +This defines the question contents and responses.
530 530  )))
531 531  
532 -\\
533 -
534 -(% class="western" %)
535 -**PUT method should be used to update users.**
536 -
537 -(% class="wrapped" %)
538 538  |(((
539 539  (% class="western" %)
540 -**Request**
692 +**Response**
541 541  )))|(((
542 542  (% class="western" %)
543 543  **Type**
... ... @@ -547,172 +547,167 @@
547 547  )))
548 548  |(((
549 549  (% class="western" %)
550 -Users
702 +QuestionId
551 551  )))|(((
552 552  (% class="western" %)
553 -Users
705 +Int
554 554  )))|(((
555 555  (% class="western" %)
556 -Users object with update fields. Return property has csv of questions id requested back in Users object.
708 +Returns ONEcount question id on successful update of the question.
557 557  )))
558 -|(((
710 +
559 559  (% class="western" %)
560 -Return
561 -)))|(((
712 +
713 +
562 562  (% class="western" %)
563 -String
564 -)))|(((
715 +Example: Get list of questions from api which has FirstName in text
716 +
717 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}}
718 +
565 565  (% class="western" %)
566 -CSV of ONEcount QuestionId's requested back in Users object in response
567 -)))
568 -|(((
720 +{
721 +
569 569  (% class="western" %)
570 -RequestDate
571 -)))|(((
723 +"result": {
724 +
572 572  (% class="western" %)
573 -Date
574 -)))|(((
726 +"success": "1",
727 +
575 575  (% class="western" %)
576 -RequestDate to use for the demo update. If not provided current date will be used.
577 -)))
729 +"error": {
578 578  
579 -(% class="wrapped" %)
580 -|(((
581 581  (% class="western" %)
582 -**Response**
583 -)))|(((
732 +"code": "0",
733 +
584 584  (% class="western" %)
585 -**Type**
586 -)))|(((
735 +"message": ""
736 +
587 587  (% class="western" %)
588 -**Description**
589 -)))
590 -|(((
738 +}
739 +
591 591  (% class="western" %)
592 -Users
593 -)))|=(((
594 -(% class="western" align="left" %)
595 -Users
596 -)))|(((
741 +},
742 +
597 597  (% class="western" %)
598 -Updated user returned with the demo field requested in return parameter in json format.
599 -)))
744 +"Questions": [
600 600  
601 601  (% class="western" %)
602 -\\
747 +{
603 603  
604 604  (% class="western" %)
605 -\\
750 +"Id": "6",
606 606  
607 607  (% class="western" %)
608 -Create new users. Here in this example the JSON for request is passed in userFile.json file.
753 +"Text": "FirstName",
609 609  
610 -{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
755 +(% class="western" %)
756 +"Type": "1",
611 611  
612 612  (% class="western" %)
613 -**~ **
759 +"Alias": "FName"
614 614  
615 615  (% class="western" %)
616 -**~ **
762 +}
617 617  
618 -\\
764 +(% class="western" %)
765 +]
619 619  
620 620  (% class="western" %)
621 -**COMPONENT: Questions**
768 +}
622 622  
623 623  (% class="western" %)
624 -All data fields in ONEcount are made up of questions. Questions are configurable on a per-client basis, and no two customer installations will have the same question (ie., field) layout. Therefore, before querying or updating any ONEcount installation, you'll need to get an understanding of the question layout of the installation. This API segment will allow you to query ONEcount to determine the question layout for the installation. It will also allow you to create new questions within the system. This resource does not allow you to update the data for a specific user (see User section).
625 625  
772 +**Users**
773 +
626 626  (% class="western" %)
627 -This resource is for manipulating questions resource. Questions in ONEcount means any question that is asked to the subscriber. It could be any questions that appears on customer forms or print forms that gets answered by a subscriber. Questions api call will allow creation, update and search of question in ONEcount. To add a new questions to the system you'll make a POST api call to the questions resource.
775 +Users means the customers of your system. Users can be added, updated and searched for using the users resource from the api. For lookup, If a return parameter is specified Users object will have those fields. If nothing is specified by default only UserId is returned.
628 628  
629 629  (% class="western" %)
630 -The data that is sent should be in JSON format and of type questions as described in References section. The type property of questions object is described below. Questions object will only need a choices block if the question is a multiple choice question(type=4 or 5 or 6)
778 +Additionally (Array of) transaction object specifying parts of the transaction to be added to the new user can be specified. UserId, TransactionId and SubscriptionType will be ignored if specified for this case. As this is new user and new transaction is being added.
631 631  
632 632  (% class="western" %)
633 -There can be 6 types of questions:
781 +In this case the provided demographic information in users object will be used to create a new user in ONEcount and then a response will be generated. Before creating a new user, a check for duplicate will be performed based on Dedupe columns and if found, and error code will be generated.
634 634  
635 -(% class="wrapped" %)
636 -|(((
637 -(% class="western" align="center" %)
638 -**Type**
639 -)))|(((
640 640  (% class="western" %)
641 -**Description**
642 -)))
784 +If username and password is not one of the parameters being passed, then a random username and password will be generated for the user while creating his user account in ONEcount.
785 +
786 +(% class="western" %)
787 +Return parameter will have the comma separated list of question Ids that is requested back from the API.
788 +
789 +(% class="western" %)
790 +Return is an optional parameter in request. If return is not requested then by default, only UserId (which is ONEcount ID) will be returned in the Users object.
791 +
792 +(% class="western" %)
793 +
794 +
643 643  |(((
644 -(% class="western" align="center" %)
645 -1
796 +(% class="western" %)
797 +**Method**
646 646  )))|(((
647 647  (% class="western" %)
648 -Textbox type questions or short response type question. The response length needs to be less than 255 characters.
649 -)))
650 -|(((
651 -(% class="western" align="center" %)
652 -2
800 +**Url**
653 653  )))|(((
654 654  (% class="western" %)
655 -Textarea type question or long response type question.
803 +**Action**
656 656  )))
657 657  |(((
658 -(% class="western" align="center" %)
659 -3
806 +(% class="western" %)
807 +GET
660 660  )))|(((
661 661  (% class="western" %)
662 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.
663 -)))
664 -|(((
665 -(% class="western" align="center" %)
666 -4
810 +/users
667 667  )))|(((
668 668  (% class="western" %)
669 -Select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question.
813 +Get users data limiting 25.
670 670  )))
671 671  |(((
672 -(% class="western" align="center" %)
673 -5
816 +(% class="western" %)
817 +GET
674 674  )))|(((
675 675  (% class="western" %)
676 -Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.
677 -)))
678 -|(((
679 -(% class="western" align="center" %)
680 -6
820 +/users/1
681 681  )))|(((
682 682  (% class="western" %)
683 -Checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question.
823 +Get data for user id 1. The user id can be a numeric value or a hash
684 684  )))
685 -
686 -(% class="wrapped" %)
687 687  |(((
688 688  (% class="western" %)
689 -**Method**
827 +GET
690 690  )))|(((
691 691  (% class="western" %)
692 -**Url**
830 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2
693 693  )))|(((
694 694  (% class="western" %)
695 -**Action**
833 +Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name.
834 +
835 +(% class="western" %)
836 +Return parameter defines a csv of question id that are requested back in response.
696 696  )))
697 697  |(((
698 698  (% class="western" %)
699 -GET
840 +POST
700 700  )))|(((
701 701  (% class="western" %)
702 -/questions
843 +/users
703 703  )))|(((
704 704  (% class="western" %)
705 -List all questions
846 +Create a new users
847 +
848 +(% class="western" %)
849 +Parameters required to create the user needs to be sent as post data in JSON format.
706 706  )))
707 707  |(((
708 708  (% class="western" %)
709 -GET
853 +PUT
710 710  )))|(((
711 711  (% class="western" %)
712 -/questions/1
856 +/users/1
713 713  )))|(((
714 714  (% class="western" %)
715 -Returns question id 1
859 +Update user id 1. The user id can be a numeric value or a hash
860 +
861 +(% class="western" %)
862 +Parameters required to update the user needs to be sent as post data in JSON format.
716 716  )))
717 717  |(((
718 718  (% class="western" %)
... ... @@ -719,10 +719,10 @@
719 719  GET
720 720  )))|(((
721 721  (% class="western" %)
722 -/questions/lookup?Text=Email
869 +/users/1/partners/2
723 723  )))|(((
724 724  (% class="western" %)
725 -Returns all questions with “Email" in question text
872 +Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.
726 726  )))
727 727  |(((
728 728  (% class="western" %)
... ... @@ -729,34 +729,41 @@
729 729  POST
730 730  )))|(((
731 731  (% class="western" %)
732 -/questions
879 +/users/login
733 733  )))|(((
734 734  (% class="western" %)
735 -Create a new question
882 +Check to see user exist with username/email and password.
736 736  
737 737  (% class="western" %)
738 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent.
739 -)))
740 -|(((
885 +Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param.
886 +
741 741  (% class="western" %)
742 -PUT
743 -)))|(((
888 +Example:
889 +
744 744  (% class="western" %)
745 -/questions
746 -)))|(((
891 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","e":"abc@[[one-count.com>>url:http://one-count.com||shape="rect"]]","p":"1234"}
892 +
747 747  (% class="western" %)
748 -Update a question
894 +OR
749 749  
750 750  (% class="western" %)
751 -JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
897 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
898 +
899 +(% class="western" %)
900 +OR
901 +
902 +(% class="western" %)
903 +{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
904 +
905 +(% class="western" %)
906 +**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found.
752 752  )))
753 753  
754 -\\
909 +
755 755  
756 756  (% class="western" %)
757 -**GET method can be used to lookup questions.**
912 +**GET method should be used to lookup users.**
758 758  
759 -(% class="wrapped" %)
760 760  |(((
761 761  (% class="western" %)
762 762  **Request**
... ... @@ -775,19 +775,19 @@
775 775  String
776 776  )))|(((
777 777  (% class="western" %)
778 -URL encoded key value string parameters for the question that a user is trying to search.
932 +URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object.
779 779  
780 780  (% class="western" %)
781 -Params:
935 +Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]
782 782  
783 783  (% class="western" %)
784 -Text: Word or phrase that should be present in the question text (String)
785 -
786 -(% class="western" %)
787 -Type: Look up the question type.
938 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
788 788  )))
789 789  
790 -(% class="wrapped" %)
941 +
942 +
943 +
944 +
791 791  |(((
792 792  (% class="western" %)
793 793  **Response**
... ... @@ -800,21 +800,20 @@
800 800  )))
801 801  |(((
802 802  (% class="western" %)
803 -Questions
957 +Users
958 +)))|=(((
959 +(% class="western" align="left" %)
960 +Users
804 804  )))|(((
805 805  (% class="western" %)
806 -Questions
807 -)))|(((
808 -(% class="western" %)
809 -Returns found question details.
963 +Found users returned with the demo field requested in return parameter in json format.
810 810  )))
811 811  
812 -\\
966 +
813 813  
814 814  (% class="western" %)
815 -**POST method should be used to create questions. The data that is sent should be in JSON format and of type questions as described in references section. Questions object will only need a choices block if the question is a multiple choice question (type=4 or 5 or 6).**
969 +**POST method should be used to create users.**
816 816  
817 -(% class="wrapped" %)
818 818  |(((
819 819  (% class="western" %)
820 820  **Request**
... ... @@ -827,46 +827,48 @@
827 827  )))
828 828  |(((
829 829  (% class="western" %)
830 -Questions
983 +Users
831 831  )))|(((
832 832  (% class="western" %)
833 -Questions
986 +Users
834 834  )))|(((
835 835  (% class="western" %)
836 -This defines the question contents and possible responses.
989 +Users object that contains information about user to create. PartnerId Needs to be specified.
837 837  )))
838 -
839 -(% class="wrapped" %)
840 840  |(((
841 841  (% class="western" %)
842 -**Response**
993 +Transactions
843 843  )))|(((
844 844  (% class="western" %)
845 -**Type**
996 +Transactions
846 846  )))|(((
847 847  (% class="western" %)
848 -**Description**
999 +(Array of) transaction object specifying parts of the transaction to be added to the new user. UserId and TransactionId, SubscriptionType will be ignored if specified. As this is new user and new transaction is being added.
849 849  )))
850 850  |(((
851 851  (% class="western" %)
852 -QuestionId
1003 +DedupeColumns
853 853  )))|(((
854 854  (% class="western" %)
855 -Int
1006 +String
856 856  )))|(((
857 857  (% class="western" %)
858 -Returns ONEcount question id on successful creation of the question.
1009 +CSV of question id's that should be considered to find duplicate.
859 859  )))
860 -
861 -\\
862 -
1011 +|(((
863 863  (% class="western" %)
864 -PUT method should be used to update question.
1013 +Return
1014 +)))|(((
1015 +(% class="western" %)
1016 +String
1017 +)))|(((
1018 +(% class="western" %)
1019 +CSV of ONEcount QuestionId's requested back in Users object in response.
1020 +)))
865 865  
866 -(% class="wrapped" %)
867 867  |(((
868 868  (% class="western" %)
869 -**Request**
1024 +**Response**
870 870  )))|(((
871 871  (% class="western" %)
872 872  **Type**
... ... @@ -876,19 +876,23 @@
876 876  )))
877 877  |(((
878 878  (% class="western" %)
879 -Questions
1034 +Users
1035 +)))|=(((
1036 +(% class="western" align="left" %)
1037 +Users
880 880  )))|(((
881 881  (% class="western" %)
882 -Questions
883 -)))|(((
884 -(% class="western" %)
885 -This defines the question contents and responses.
1040 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned.
886 886  )))
887 887  
888 -(% class="wrapped" %)
1043 +
1044 +
1045 +(% class="western" %)
1046 +**PUT method should be used to update users.**
1047 +
889 889  |(((
890 890  (% class="western" %)
891 -**Response**
1050 +**Request**
892 892  )))|(((
893 893  (% class="western" %)
894 894  **Type**
... ... @@ -898,84 +898,73 @@
898 898  )))
899 899  |(((
900 900  (% class="western" %)
901 -QuestionId
1060 +Users
902 902  )))|(((
903 903  (% class="western" %)
904 -Int
1063 +Users
905 905  )))|(((
906 906  (% class="western" %)
907 -Returns ONEcount question id on successful update of the question.
1066 +Users object with update fields. Return property has csv of questions id requested back in Users object.
908 908  )))
909 -
1068 +|(((
910 910  (% class="western" %)
911 -\\
912 -
1070 +Return
1071 +)))|(((
913 913  (% class="western" %)
914 -Example: Get list of questions from api which has FirstName in text
915 -
916 -{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}}
917 -
1073 +String
1074 +)))|(((
918 918  (% class="western" %)
919 -{
920 -
1076 +CSV of ONEcount QuestionId's requested back in Users object in response
1077 +)))
1078 +|(((
921 921  (% class="western" %)
922 -"result": {
923 -
1080 +RequestDate
1081 +)))|(((
924 924  (% class="western" %)
925 -"success": "1",
926 -
1083 +Date
1084 +)))|(((
927 927  (% class="western" %)
928 -"error": {
1086 +RequestDate to use for the demo update. If not provided current date will be used.
1087 +)))
929 929  
1089 +|(((
930 930  (% class="western" %)
931 -"code": "0",
932 -
1091 +**Response**
1092 +)))|(((
933 933  (% class="western" %)
934 -"message": ""
935 -
1094 +**Type**
1095 +)))|(((
936 936  (% class="western" %)
937 -}
938 -
1097 +**Description**
1098 +)))
1099 +|(((
939 939  (% class="western" %)
940 -},
941 -
1101 +Users
1102 +)))|=(((
1103 +(% class="western" align="left" %)
1104 +Users
1105 +)))|(((
942 942  (% class="western" %)
943 -"Questions": [
1107 +Updated user returned with the demo field requested in return parameter in json format.
1108 +)))
944 944  
945 945  (% class="western" %)
946 -{
1111 +
947 947  
948 948  (% class="western" %)
949 -"Id": "6",
1114 +
950 950  
951 951  (% class="western" %)
952 -"Text": "FirstName",
1117 +Create new users. Here in this example the JSON for request is passed in userFile.json file.
953 953  
954 -(% class="western" %)
955 -"Type": "1",
1119 +{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
956 956  
957 957  (% class="western" %)
958 -"Alias": "FName"
1122 +**Products**
959 959  
960 960  (% class="western" %)
961 -}
962 -
963 -(% class="western" %)
964 -]
965 -
966 -(% class="western" %)
967 -}
968 -
969 -(% class="western" %)
970 -\\
971 -
972 -(% class="western" %)
973 -**COMPONENT: Products**
974 -
975 -(% class="western" %)
976 976  This resource is for manipulating products resource. A product can be created, updated or searched.
977 977  
978 -(% class="wrapped" %)
979 979  |(((
980 980  (% class="western" %)
981 981  **Method**
... ... @@ -1056,12 +1056,11 @@
1056 1056  {"ProductID":"65","ResourceID":”121"}
1057 1057  )))
1058 1058  
1059 -\\
1207 +
1060 1060  
1061 1061  (% class="western" %)
1062 1062  **GET method should be used to lookup products.**
1063 1063  
1064 -(% class="wrapped" %)
1065 1065  |(((
1066 1066  (% class="western" %)
1067 1067  **Request**
... ... @@ -1089,7 +1089,6 @@
1089 1089  Name: Name of the Product for lookup (String)
1090 1090  )))
1091 1091  
1092 -(% class="wrapped" %)
1093 1093  |(((
1094 1094  (% class="western" %)
1095 1095  **Response**
... ... @@ -1111,12 +1111,11 @@
1111 1111  Returns found product details.
1112 1112  )))
1113 1113  
1114 -\\
1260 +
1115 1115  
1116 1116  (% class="western" %)
1117 1117  **POST method should be used to create products.**
1118 1118  
1119 -(% class="wrapped" %)
1120 1120  |(((
1121 1121  (% class="western" %)
1122 1122  **Request**
... ... @@ -1141,10 +1141,9 @@
1141 1141  Example:
1142 1142  
1143 1143  (% class="western" %)
1144 -{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1289 +{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1145 1145  )))
1146 1146  
1147 -(% class="wrapped" %)
1148 1148  |(((
1149 1149  (% class="western" %)
1150 1150  **Response**
... ... @@ -1166,12 +1166,11 @@
1166 1166  Product Id of the newly created product.
1167 1167  )))
1168 1168  
1169 -\\
1313 +
1170 1170  
1171 1171  (% class="western" %)
1172 1172  PUT method should be used to update an individual product given the product info.
1173 1173  
1174 -(% class="wrapped" %)
1175 1175  |(((
1176 1176  (% class="western" %)
1177 1177  **Request**
... ... @@ -1199,10 +1199,9 @@
1199 1199  **Example**:
1200 1200  
1201 1201  (% class="western" %)
1202 -{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17}
1345 +{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1203 1203  )))
1204 1204  
1205 -(% class="wrapped" %)
1206 1206  |(((
1207 1207  (% class="western" %)
1208 1208  **Response**
... ... @@ -1224,15 +1224,14 @@
1224 1224  Product id of the updated product.
1225 1225  )))
1226 1226  
1227 -\\
1369 +
1228 1228  
1229 1229  (% class="western" %)
1230 -**COMPONENT: Terms**
1372 +**Terms**
1231 1231  
1232 1232  (% class="western" %)
1233 1233  This resource is for manipulating terms resource. A term can be created, updated or searched.
1234 1234  
1235 -(% class="wrapped" %)
1236 1236  |(((
1237 1237  (% class="western" %)
1238 1238  **Method**
... ... @@ -1284,12 +1284,11 @@
1284 1284  JSON of the terms type object needs to be sent as post data. Id field is mandatory for update.
1285 1285  )))
1286 1286  
1287 -\\
1428 +
1288 1288  
1289 1289  (% class="western" %)
1290 1290  **GET method should be used to lookup products.**
1291 1291  
1292 -(% class="wrapped" %)
1293 1293  |(((
1294 1294  (% class="western" %)
1295 1295  **Request**
... ... @@ -1317,7 +1317,6 @@
1317 1317  Name: Name of the term for lookup (String)
1318 1318  )))
1319 1319  
1320 -(% class="wrapped" %)
1321 1321  |(((
1322 1322  (% class="western" %)
1323 1323  **Response**
... ... @@ -1339,12 +1339,11 @@
1339 1339  Returns found term details.
1340 1340  )))
1341 1341  
1342 -\\
1481 +
1343 1343  
1344 1344  (% class="western" %)
1345 1345  **POST method should be used to create products.**
1346 1346  
1347 -(% class="wrapped" %)
1348 1348  |(((
1349 1349  (% class="western" %)
1350 1350  **Request**
... ... @@ -1375,7 +1375,6 @@
1375 1375  {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17}
1376 1376  )))
1377 1377  
1378 -(% class="wrapped" %)
1379 1379  |(((
1380 1380  (% class="western" %)
1381 1381  **Response**
... ... @@ -1397,12 +1397,11 @@
1397 1397  Term Id of the newly created term.
1398 1398  )))
1399 1399  
1400 -\\
1537 +
1401 1401  
1402 1402  (% class="western" %)
1403 1403  PUT method should be used to update an individual term given the term info.
1404 1404  
1405 -(% class="wrapped" %)
1406 1406  |(((
1407 1407  (% class="western" %)
1408 1408  **Request**
... ... @@ -1424,7 +1424,7 @@
1424 1424  Term details to be updated in json format to be sent with request. Id property needs to be set to identify the term to be updated.
1425 1425  
1426 1426  (% class="western" %)
1427 -\\
1563 +
1428 1428  
1429 1429  (% class="western" %)
1430 1430  **Example**:
... ... @@ -1433,7 +1433,6 @@
1433 1433  {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17}
1434 1434  )))
1435 1435  
1436 -(% class="wrapped" %)
1437 1437  |(((
1438 1438  (% class="western" %)
1439 1439  **Response**
... ... @@ -1455,50 +1455,14 @@
1455 1455  term id of the updated term.
1456 1456  )))
1457 1457  
1458 -\\
1593 +
1459 1459  
1460 1460  (% class="western" %)
1461 -**COMPONENT: Resources**
1596 +**Resources**
1462 1462  
1463 1463  (% class="western" %)
1464 -Resources are the available entities that can be accessed/modified via API. Each resource can be created, updated or requested by using the corresponding http method described above.
1465 -
1466 -* (((
1467 -(% class="western" %)
1468 -questions
1469 -)))
1470 -* (((
1471 -(% class="western" %)
1472 -users
1473 -)))
1474 -* (((
1475 -(% class="western" %)
1476 -products
1477 -)))
1478 -* (((
1479 -(% class="western" %)
1480 -terms
1481 -)))
1482 -* (((
1483 -(% class="western" %)
1484 -resources
1485 -)))
1486 -* (((
1487 -(% class="western" %)
1488 -sources
1489 -)))
1490 -* (((
1491 -(% class="western" %)
1492 -transactions
1493 -)))
1494 -
1495 -(% class="western" %)
1496 -**~ **
1497 -
1498 -(% class="western" %)
1499 1499  This resource is for manipulating resources resource. A resource can be created, updated or searched.
1500 1500  
1501 -(% class="wrapped" %)
1502 1502  |(((
1503 1503  (% class="western" %)
1504 1504  **Method**
... ... @@ -1550,12 +1550,11 @@
1550 1550  JSON of the resources type object needs to be sent as post data. Id field is mandatory for update.
1551 1551  )))
1552 1552  
1553 -\\
1652 +
1554 1554  
1555 1555  (% class="western" %)
1556 -**GET method should be used to lookup resources.**
1655 +**GET method should be used to lookup products.**
1557 1557  
1558 -(% class="wrapped" %)
1559 1559  |(((
1560 1560  (% class="western" %)
1561 1561  **Request**
... ... @@ -1583,7 +1583,6 @@
1583 1583  Name: Name of the resource for lookup (String)
1584 1584  )))
1585 1585  
1586 -(% class="wrapped" %)
1587 1587  |(((
1588 1588  (% class="western" %)
1589 1589  **Response**
... ... @@ -1605,12 +1605,11 @@
1605 1605  Returns found resource details.
1606 1606  )))
1607 1607  
1608 -\\
1705 +
1609 1609  
1610 1610  (% class="western" %)
1611 -**POST method should be used to create resources.**
1708 +**POST method should be used to create products.**
1612 1612  
1613 -(% class="wrapped" %)
1614 1614  |(((
1615 1615  (% class="western" %)
1616 1616  **Request**
... ... @@ -1632,7 +1632,7 @@
1632 1632  resource details in json to be sent as post data. Id should not be set.
1633 1633  
1634 1634  (% class="western" %)
1635 -**Possible Request Params**: Name, Description, Type, Value, FreePass
1731 +**Possible Request Params**: Name, Description, Type, Value
1636 1636  
1637 1637  (% class="western" %)
1638 1638  **Example**:
... ... @@ -1639,18 +1639,8 @@
1639 1639  
1640 1640  (% class="western" %)
1641 1641  {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”}
1642 -
1643 -(% class="western" %)
1644 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]}
1645 -
1646 -(% class="western" %)
1647 -{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1}
1648 -
1649 -(% class="western" %)
1650 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1}
1651 1651  )))
1652 1652  
1653 -(% class="wrapped" %)
1654 1654  |(((
1655 1655  (% class="western" %)
1656 1656  **Response**
... ... @@ -1672,12 +1672,11 @@
1672 1672  Resource Id of the newly created resource.
1673 1673  )))
1674 1674  
1675 -\\
1761 +
1676 1676  
1677 1677  (% class="western" %)
1678 1678  PUT method should be used to update an individual resource given the resource info.
1679 1679  
1680 -(% class="wrapped" %)
1681 1681  |(((
1682 1682  (% class="western" %)
1683 1683  **Request**
... ... @@ -1696,28 +1696,18 @@
1696 1696  Resource
1697 1697  )))|(((
1698 1698  (% class="western" %)
1699 -Resource details to be updated injsonformat to be sent withrequest. Id property needs to be set to identify the resource to be updated.
1784 +Resource details to be updated in json format to be sent with request. Id property needs to be set to identify the resource to be updated.
1700 1700  
1701 1701  (% class="western" %)
1702 -\\
1787 +
1703 1703  
1704 1704  (% class="western" %)
1705 -Examples:
1790 +Example:
1706 1706  
1707 1707  (% class="western" %)
1708 1708  {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”}
1709 -
1710 -(% class="western" %)
1711 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]}
1712 -
1713 -(% class="western" %)
1714 -{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1}
1715 -
1716 -(% class="western" %)
1717 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1}
1718 1718  )))
1719 1719  
1720 -(% class="wrapped" %)
1721 1721  |(((
1722 1722  (% class="western" %)
1723 1723  **Response**
... ... @@ -1739,21 +1739,20 @@
1739 1739  resource id of the updated resource.
1740 1740  )))
1741 1741  
1742 -\\
1817 +
1743 1743  
1744 -\\
1819 +(% class="western" %)
1820 +
1745 1745  
1746 1746  (% class="western" %)
1747 -\\
1823 +
1748 1748  
1749 1749  (% class="western" %)
1750 -**COMPONENT: Source Codes
1751 -**
1826 +**Sources**
1752 1752  
1753 1753  (% class="western" %)
1754 -This resource is for manipulating source code for a resource. A source code can be created, updated or searched.
1829 +This resource is for manipulating sources resource. A source can be created, updated or searched.
1755 1755  
1756 -(% class="wrapped" %)
1757 1757  |(((
1758 1758  (% class="western" %)
1759 1759  **Method**
... ... @@ -1805,12 +1805,11 @@
1805 1805  JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update.
1806 1806  )))
1807 1807  
1808 -\\
1882 +
1809 1809  
1810 1810  (% class="western" %)
1811 1811  **Sources can be looked up given the code or Id. GET method should be used for lookup.**
1812 1812  
1813 -(% class="wrapped" %)
1814 1814  |(((
1815 1815  (% class="western" %)
1816 1816  **Request**
... ... @@ -1838,7 +1838,6 @@
1838 1838  Source: Source value (String)
1839 1839  )))
1840 1840  
1841 -(% class="wrapped" %)
1842 1842  |(((
1843 1843  (% class="western" %)
1844 1844  **Response**
... ... @@ -1860,15 +1860,14 @@
1860 1860  Returns found source details.
1861 1861  )))
1862 1862  
1863 -\\
1935 +
1864 1864  
1865 1865  (% class="western" %)
1866 -\\
1938 +
1867 1867  
1868 1868  (% class="western" %)
1869 1869  POST method should be used to create an individual source given the source parameters.
1870 1870  
1871 -(% class="wrapped" %)
1872 1872  |(((
1873 1873  (% class="western" %)
1874 1874  **Request**
... ... @@ -1890,7 +1890,6 @@
1890 1890  Defines the contents that makes up the source. Id parameters should not be set.
1891 1891  )))
1892 1892  
1893 -(% class="wrapped" %)
1894 1894  |(((
1895 1895  (% class="western" %)
1896 1896  **Response**
... ... @@ -1912,12 +1912,11 @@
1912 1912  Returns created source code id.
1913 1913  )))
1914 1914  
1915 -\\
1985 +
1916 1916  
1917 1917  (% class="western" %)
1918 1918  **PUT method can be used to update an individual source given the id.**
1919 1919  
1920 -(% class="wrapped" %)
1921 1921  |(((
1922 1922  (% class="western" %)
1923 1923  **Request**
... ... @@ -1939,7 +1939,6 @@
1939 1939  Defines the contents that makes up the source. The id parameter needs to be set which will identify the id of the source to be updated.
1940 1940  )))
1941 1941  
1942 -(% class="wrapped" %)
1943 1943  |(((
1944 1944  (% class="western" %)
1945 1945  **Response**
... ... @@ -1961,18 +1961,17 @@
1961 1961  Returns updated source id.
1962 1962  )))
1963 1963  
1964 -\\
2032 +
1965 1965  
1966 1966  (% class="western" %)
1967 -\\
2035 +
1968 1968  
1969 1969  (% class="western" %)
1970 -**COMPONENT: Transactions**
2038 +**Transactions**
1971 1971  
1972 1972  (% class="western" %)
1973 1973  This resource is for manipulating transactions resource. A transaction can be created or searched.
1974 1974  
1975 -(% class="wrapped" %)
1976 1976  |(((
1977 1977  (% class="western" %)
1978 1978  **Method**
... ... @@ -2014,15 +2014,14 @@
2014 2014  JSON of the Transactions type object needs to be sent as post data. Id field should not be sent.
2015 2015  )))
2016 2016  
2017 -\\
2084 +
2018 2018  
2019 2019  (% class="western" %)
2020 -\\
2087 +
2021 2021  
2022 2022  (% class="western" %)
2023 2023  Transactions can be looked up using transactionId, date range, userid. Use GET method to do lookup.
2024 2024  
2025 -(% class="wrapped" %)
2026 2026  |(((
2027 2027  (% class="western" %)
2028 2028  **Request**
... ... @@ -2056,7 +2056,10 @@
2056 2056  EndDate: When the search should end. Only valid when UserId is set. (Date)
2057 2057  )))
2058 2058  
2059 -(% class="wrapped" style="letter-spacing: 0.0px;" %)
2125 +
2126 +
2127 +
2128 +
2060 2060  |(((
2061 2061  (% class="western" %)
2062 2062  **Response**
... ... @@ -2075,27 +2075,14 @@
2075 2075  Transactions
2076 2076  )))|(((
2077 2077  (% class="western" %)
2078 -Returns all transaction that satisfies the search criteria. Returns all the package and product transactions of the user. Package Transactions are the one with TermId and ProductId. Product Transactions are the one with ResourceId.
2147 +Returns all transaction that satisfies the search criteria.
2079 2079  )))
2080 2080  
2081 -\\
2150 +
2082 2082  
2083 -**Sample response for /(% style="color: rgb(80,80,80);" %)transactions/lookup?UserId=25255105:(%%)**
2084 -
2085 -(% class="wrapped" %)
2086 -|=(((
2087 -(% class="content-wrapper" %)
2088 -(((
2089 -[[image:attach:Screen Shot 2020-02-26 at 11.14.29 AM.png||width="1407"]]
2090 -)))
2091 -)))
2092 -
2093 -\\
2094 -
2095 2095  (% class="western" %)
2096 2096  POST method can be used to create user transaction. Transaction info needs to be sent as request and a TransactionId will be returned when the transaction is created.
2097 2097  
2098 -(% class="wrapped" %)
2099 2099  |(((
2100 2100  (% class="western" %)
2101 2101  **Request**
... ... @@ -2117,7 +2117,6 @@
2117 2117  Contains fields that define a transaction. Id field should not be set.
2118 2118  )))
2119 2119  
2120 -(% class="wrapped" %)
2121 2121  |(((
2122 2122  (% class="western" %)
2123 2123  **Response**
... ... @@ -2139,41 +2139,36 @@
2139 2139  Returns transactionId of the newly created transaction.
2140 2140  )))
2141 2141  
2142 -\\
2197 +
2143 2143  
2144 -\\
2145 -
2146 2146  (% class="western" %)
2147 -**COMPONENT: Leads
2148 -**
2200 +**Stats**
2149 2149  
2150 2150  (% class="western" %)
2151 2151  Stats resource can be used to submit any type of stat collected on the third party systems. Each type of stat will be represented by a sub-resource. So, for telemarketing it could be **/stats/telemarketing** endpoint, for videos it can be **/stats/videos**, for webinar it could be **/stats/webinars** etc. Right now we only have telemarketing sub-resource.
2152 2152  
2153 2153  (% class="western" %)
2154 -\\
2206 +
2155 2155  
2156 2156  (% class="western" %)
2157 -\\
2209 +
2158 2158  
2159 2159  (% class="western" %)
2160 -\\
2212 +
2161 2161  
2162 2162  (% class="western" %)
2163 -\\
2215 +
2164 2164  
2165 2165  (% class="western" %)
2166 -\\
2218 +
2167 2167  
2168 2168  (% class="western" %)
2169 -**Telemarketing Leads
2170 -**
2221 +**Telemarketing**
2171 2171  
2172 2172  (% class="western" %)
2173 2173  
2174 2174  This resource is for manipulating telemarketing stat resource. A telemarketing stat can be created or listed.
2175 2175  
2176 -(% class="wrapped" %)
2177 2177  |(((
2178 2178  (% class="western" %)
2179 2179  **Method**
... ... @@ -2215,12 +2215,11 @@
2215 2215  JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent.
2216 2216  )))
2217 2217  
2218 -\\
2268 +
2219 2219  
2220 2220  (% class="western" %)
2221 2221  POST method can be used to create telemarketing stat. Telemarketing info needs to be sent as request and an Id will be returned when the transaction is created.
2222 2222  
2223 -(% class="wrapped" %)
2224 2224  |(((
2225 2225  (% class="western" %)
2226 2226  **Request**
... ... @@ -2285,16 +2285,15 @@
2285 2285  )))
2286 2286  |(((
2287 2287  (% class="western" %)
2288 -\\
2337 +
2289 2289  )))|(((
2290 2290  (% class="western" %)
2291 -\\
2340 +
2292 2292  )))|(((
2293 2293  (% class="western" %)
2294 -\\
2343 +
2295 2295  )))
2296 2296  
2297 -(% class="wrapped" %)
2298 2298  |(((
2299 2299  (% class="western" %)
2300 2300  **Response**
... ... @@ -2316,23 +2316,14 @@
2316 2316  Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format.
2317 2317  )))
2318 2318  
2319 -\\
2367 +
2320 2320  
2321 -\\
2322 -
2323 -\\
2324 -
2325 -\\
2326 -
2327 -\\
2328 -
2329 2329  (% class="western" %)
2330 -**API REFERENCE**
2370 +**Reference**
2331 2331  
2332 2332  (% class="western" %)
2333 2333  **Type: Questions**
2334 2334  
2335 -(% class="wrapped" %)
2336 2336  |(((
2337 2337  (% class="western" %)
2338 2338  **Property Name**
... ... @@ -2373,12 +2373,12 @@
2373 2373  (% class="western" %)
2374 2374  Determines which type of question it is. Textbox, checkbox, select, radio.
2375 2375  There can be 6 types of questions.
2376 -type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2377 -type=2 means textarea type question or long response type question.
2378 -type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2379 -type = 4 means select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question.
2380 -type=5 means radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.
2381 -type=6 means checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question.
2415 + type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2416 + type=2 means textarea type question or long response type question.
2417 + type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2418 + type = 4 means select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question.
2419 + type=5 means radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.
2420 + type=6 means checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question.
2382 2382  )))
2383 2383  |(((
2384 2384  (% class="western" %)
... ... @@ -2401,18 +2401,17 @@
2401 2401  Alias for admin purpose.
2402 2402  )))
2403 2403  
2404 -\\
2443 +
2405 2405  
2406 2406  (% class="western" %)
2407 -\\
2446 +
2408 2408  
2409 2409  (% class="western" %)
2410 -\\
2449 +
2411 2411  
2412 2412  (% class="western" %)
2413 2413  **Type: Choices**
2414 2414  
2415 -(% class="wrapped" %)
2416 2416  |(((
2417 2417  (% class="western" %)
2418 2418  **Property Name**
... ... @@ -2474,12 +2474,11 @@
2474 2474  Tied to which question id.
2475 2475  )))
2476 2476  
2477 -\\
2515 +
2478 2478  
2479 2479  (% class="western" %)
2480 2480  **Type: Users**
2481 2481  
2482 -(% class="wrapped" %)
2483 2483  |(((
2484 2484  (% class="western" %)
2485 2485  **Property Name**
... ... @@ -2531,12 +2531,11 @@
2531 2531  Request date.
2532 2532  )))
2533 2533  
2534 -\\
2571 +
2535 2535  
2536 2536  (% class="western" %)
2537 2537  **Type: Demo**
2538 2538  
2539 -(% class="wrapped" %)
2540 2540  |(((
2541 2541  (% class="western" %)
2542 2542  **Property Name**
... ... @@ -2578,12 +2578,11 @@
2578 2578  ...
2579 2579  )))
2580 2580  
2581 -\\
2617 +
2582 2582  
2583 2583  (% class="western" %)
2584 2584  **Type: Transactions**
2585 2585  
2586 -(% class="wrapped" %)
2587 2587  |(((
2588 2588  (% class="western" %)
2589 2589  **Property Name**
... ... @@ -2725,12 +2725,11 @@
2725 2725  If there is amount (USD) included in transaction.
2726 2726  )))
2727 2727  
2728 -\\
2763 +
2729 2729  
2730 2730  (% class="western" %)
2731 2731  **Type: Sources**
2732 2732  
2733 -(% class="wrapped" %)
2734 2734  |(((
2735 2735  (% class="western" %)
2736 2736  **Property Name**
... ... @@ -2782,15 +2782,14 @@
2782 2782  If this is a child source then list the parent source id.
2783 2783  )))
2784 2784  
2785 -\\
2819 +
2786 2786  
2787 2787  (% class="western" %)
2788 -\\
2822 +
2789 2789  
2790 2790  (% class="western" %)
2791 2791  **Type: Products**
2792 2792  
2793 -(% class="wrapped" %)
2794 2794  |(((
2795 2795  (% class="western" %)
2796 2796  **Property Name**
... ... @@ -2842,12 +2842,11 @@
2842 2842  (Array of) Terms associated with the product.
2843 2843  )))
2844 2844  
2845 -\\
2878 +
2846 2846  
2847 2847  (% class="western" %)
2848 2848  **Type: Terms**
2849 2849  
2850 -(% class="wrapped" %)
2851 2851  |(((
2852 2852  (% class="western" %)
2853 2853  **Property Name**
... ... @@ -2929,12 +2929,11 @@
2929 2929  If there is price (USD) for the term.
2930 2930  )))
2931 2931  
2932 -\\
2964 +
2933 2933  
2934 2934  (% class="western" %)
2935 2935  **Type: Resources**
2936 2936  
2937 -(% class="wrapped" %)
2938 2938  |(((
2939 2939  (% class="western" %)
2940 2940  **Property Name**
... ... @@ -3006,30 +3006,14 @@
3006 3006  )))|(((
3007 3007  (% class="western" %)
3008 3008  String
3009 -
3010 -(% class="western" %)
3011 -or
3012 -
3013 -(% class="western" %)
3014 -Array
3015 3015  )))|(((
3016 3016  (% class="western" %)
3017 -Value of Resource Type:
3042 +Value of Resource Type.
3018 3018  
3019 3019  (% class="western" %)
3020 -When requesting a resource (GET), you should expect a string if there is only one value. If there are multiple values, you should expect an array.
3045 +Example : if the Type sent is 3 then Value would be **/digital/**
3021 3021  
3022 3022  (% class="western" %)
3023 -For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests.
3024 -
3025 -(% class="western" %)
3026 -Example :
3027 -
3028 -(% class="western" %)
3029 -if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** **
3030 -**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"]
3031 -
3032 -(% class="western" %)
3033 3033  For Function type resource leave it blank.
3034 3034  )))
3035 3035  |(((
... ... @@ -3040,25 +3040,14 @@
3040 3040  Int
3041 3041  )))|(((
3042 3042  (% class="western" %)
3043 -Default limit is 25 but if all the data needs to be pulled then pass limit=0.
3058 +Default limit is 25 but all the data needs to be pulled then pass limit=0.
3044 3044  )))
3045 -|(% colspan="1" %)(% colspan="1" %)
3046 -(((
3047 -FreePass
3048 -)))|(% colspan="1" %)(% colspan="1" %)
3049 -(((
3050 -Int
3051 -)))|(% colspan="1" %)(% colspan="1" %)
3052 -(((
3053 -Default value is 0. This parameter is used to provide access to protected content.
3054 -)))
3055 3055  
3056 -\\
3061 +
3057 3057  
3058 3058  (% class="western" %)
3059 3059  **Type: Telemarketing**
3060 3060  
3061 -(% class="wrapped" %)
3062 3062  |(((
3063 3063  (% class="western" %)
3064 3064  **Property Name**
... ... @@ -3143,12 +3143,8 @@
3143 3143  Page title that belongs to the page url that is being sent. If not provided it try to pull the title from the page but if unsuccessful then it will set it as blank.
3144 3144  
3145 3145  (% class="western" %)
3146 -\\
3150 +
3147 3147  
3148 3148  (% class="western" %)
3149 3149  If the page url already exists and it doesn't match with the one that is being sent then it will throw conflict error with the title in our system.
3150 3150  )))
3151 -
3152 -\\
3153 -
3154 -\\
OCDEV-OC-API-04032017-030417-1545-35.pdf
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -57.8 KB
Content
Screen Shot 2020-02-26 at 11.14.29 AM.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -397.9 KB
Content
Screen Shot 2020-02-26 at 11.15.52 AM.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -50.1 KB
Content
Screen Shot 2020-02-26 at 11.22.13 AM.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -159.8 KB
Content
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -3538995
1 +3538998
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/3538995/OLD-ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/3538998/sonish-APIDocument-230317-1008-18