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

From version 5.1
edited by Admin
on 2017/04/05 10:32
Change comment: There is no comment for this version
To version 17.1
edited by shravya@one-count_com
on 2020/02/26 12:41
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.shravya@one-count_com
Content
... ... @@ -2,7 +2,7 @@
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. his API can be used to lookup, create and updated different ONEcount resources which are listed below.
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.
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,7 +9,7 @@
9 9  
10 10  1. (((
11 11  (% class="western" %)
12 -**GET** - Used for lookup of resources
12 +**GET** - Used for lookup of resourcesresources
13 13  )))
14 14  1. (((
15 15  (% class="western" %)
... ... @@ -21,151 +21,42 @@
21 21  )))
22 22  
23 23  (% class="western" %)
24 -Specifically, the ONEcount API provides following functionalities:
24 +Specifically, the ONEcount API provides to the following components:
25 25  
26 -1. (((
27 -(% class="western" %)
28 -**Lookup**
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 +\\\\\\
29 29  
30 -*
31 -
32 32  (% class="western" %)
33 -User lookup
34 -
35 -*
36 -
37 -(% class="western" %)
38 -Transaction lookup
39 -
40 -*
41 -
42 -(% class="western" %)
43 -Question lookup
44 -
45 -*
46 -
47 -(% class="western" %)
48 -Source code lookup
49 -
50 -*
51 -
52 -(% class="western" %)
53 -Product lookup
54 -
55 -*
56 -
57 -(% class="western" %)
58 -Term lookup
59 -
60 -*
61 -
62 -(% class="western" %)
63 -Resource lookup
64 -)))
65 -1. (((
66 -(% class="western" %)
67 -**Create**
68 -
69 -*
70 -
71 -(% class="western" %)
72 -Add a user/demo
73 -
74 -*
75 -
76 -(% class="western" %)
77 -Add a question
78 -
79 -*
80 -
81 -(% class="western" %)
82 -Add user transaction
83 -
84 -*
85 -
86 -(% class="western" %)
87 -Add source code
88 -
89 -*
90 -
91 -(% class="western" %)
92 -Add Product
93 -
94 -*
95 -
96 -(% class="western" %)
97 -Add Term
98 -
99 -*
100 -
101 -(% class="western" %)
102 -Add Resource
103 -
104 -*
105 -
106 -(% class="western" %)
107 -Stats – Telemarketing
108 -)))
109 -1. (((
110 -(% class="western" %)
111 -**Update**
112 -
113 -*
114 -
115 -(% class="western" %)
116 -Update a user/demo
117 -
118 -*
119 -
120 -(% class="western" %)
121 -Update a question
122 -
123 -*
124 -
125 -(% class="western" %)
126 -Update source code
127 -
128 -*
129 -
130 -(% class="western" %)
131 -Update product
132 -
133 -*
134 -
135 -(% class="western" %)
136 -Update term
137 -
138 -*
139 -
140 -(% class="western" %)
141 -Update resource
142 -)))
143 -1. (((
144 -(% class="western" %)
145 -**List**
146 -
147 -*
148 -
149 -(% class="western" %)
150 -ListQuestions
151 -
152 -*
153 -
154 -(% class="western" %)
155 -ListSourceCodes
156 -)))
157 -1. **Attach**
158 -
159 -*
160 -** (((
161 -(% class="western" %)
162 -Attach resource to product
163 -)))
164 -
165 -(% class="western" %)
166 -
167 -
168 -(% class="western" %)
169 169  **Accessing API**
170 170  
171 171  (% class="western" %)
... ... @@ -199,10 +199,10 @@
199 199  )))
200 200  
201 201  (% class="western" %)
202 -
93 +\\
203 203  
204 204  (% class="western" %)
205 -**API Usage**
96 +**General API Usage**
206 206  
207 207  (% class="western" %)
208 208  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.
... ... @@ -211,7 +211,7 @@
211 211  For lookup, the parameter list will be part of the request url.
212 212  
213 213  (% class="western" %)
214 -
105 +\\
215 215  
216 216  (% class="western" %)
217 217  **Response**
... ... @@ -274,7 +274,7 @@
274 274  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.
275 275  
276 276  (% class="western" %)
277 -
168 +\\
278 278  
279 279  (% class="western" %)
280 280  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.
... ... @@ -330,148 +330,103 @@
330 330   ]}]}}}}
331 331  
332 332  (% class="western" %)
333 -
224 +\\
334 334  
335 335  (% class="western" %)
336 336  **
337 337  **
338 338  
339 -(% class="western" %)
340 -**
341 -**
230 +**COMPONENT: Users**
342 342  
343 343  (% class="western" %)
344 -**
345 -**
233 +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.
346 346  
347 347  (% class="western" %)
348 -**Resources**
236 +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.
349 349  
350 350  (% class="western" %)
351 -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.
239 +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.
352 352  
353 -* (((
354 354  (% class="western" %)
355 -questions
356 -)))
357 -* (((
358 -(% class="western" %)
359 -users
360 -)))
361 -* (((
362 -(% class="western" %)
363 -products
364 -)))
365 -* (((
366 -(% class="western" %)
367 -terms
368 -)))
369 -* (((
370 -(% class="western" %)
371 -resources
372 -)))
373 -* (((
374 -(% class="western" %)
375 -sources
376 -)))
377 -* (((
378 -(% class="western" %)
379 -transactions
380 -)))
242 +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.
381 381  
382 382  (% class="western" %)
383 -**Questions**
245 +Return parameter will have the comma separated list of question Ids that is requested back from the API.
384 384  
385 385  (% class="western" %)
386 -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.
248 +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.
387 387  
388 -(% class="western" %)
389 -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)
250 +\\
390 390  
391 -(% class="western" %)
392 -There can be 6 types of questions:
393 -
394 394  (% class="wrapped" %)
395 395  |(((
396 -(% class="western" align="center" %)
397 -**Type**
398 -)))|(((
399 399  (% class="western" %)
400 -**Description**
401 -)))
402 -|(((
403 -(% class="western" align="center" %)
404 -1
255 +**Method**
405 405  )))|(((
406 406  (% class="western" %)
407 -Textbox type questions or short response type question. The response length needs to be less than 255 characters.
408 -)))
409 -|(((
410 -(% class="western" align="center" %)
411 -2
258 +**Url**
412 412  )))|(((
413 413  (% class="western" %)
414 -Textarea type question or long response type question.
261 +**Action**
415 415  )))
416 416  |(((
417 -(% class="western" align="center" %)
418 -3
264 +(% class="western" %)
265 +GET
419 419  )))|(((
420 420  (% class="western" %)
421 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.
422 -)))
423 -|(((
424 -(% class="western" align="center" %)
425 -4
268 +/users
426 426  )))|(((
427 427  (% class="western" %)
428 -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.
271 +Get users data limiting 25.
429 429  )))
430 430  |(((
431 -(% class="western" align="center" %)
432 -5
274 +(% class="western" %)
275 +GET
433 433  )))|(((
434 434  (% class="western" %)
435 -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.
436 -)))
437 -|(((
438 -(% class="western" align="center" %)
439 -6
278 +/users/1
440 440  )))|(((
441 441  (% class="western" %)
442 -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.
281 +Get data for user id 1. The user id can be a numeric value or a hash
443 443  )))
444 -
445 -(% class="wrapped" %)
446 446  |(((
447 447  (% class="western" %)
448 -**Method**
285 +GET
449 449  )))|(((
450 450  (% class="western" %)
451 -**Url**
288 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2
452 452  )))|(((
453 453  (% class="western" %)
454 -**Action**
291 +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.
292 +
293 +(% class="western" %)
294 +Return parameter defines a csv of question id that are requested back in response.
455 455  )))
456 456  |(((
457 457  (% class="western" %)
458 -GET
298 +POST
459 459  )))|(((
460 460  (% class="western" %)
461 -/questions
301 +/users
462 462  )))|(((
463 463  (% class="western" %)
464 -List all questions
304 +Create a new users
305 +
306 +(% class="western" %)
307 +Parameters required to create the user needs to be sent as post data in JSON format.
465 465  )))
466 466  |(((
467 467  (% class="western" %)
468 -GET
311 +PUT
469 469  )))|(((
470 470  (% class="western" %)
471 -/questions/1
314 +/users/1
472 472  )))|(((
473 473  (% class="western" %)
474 -Returns question id 1
317 +Update user id 1. The user id can be a numeric value or a hash
318 +
319 +(% class="western" %)
320 +Parameters required to update the user needs to be sent as post data in JSON format.
475 475  )))
476 476  |(((
477 477  (% class="western" %)
... ... @@ -478,10 +478,10 @@
478 478  GET
479 479  )))|(((
480 480  (% class="western" %)
481 -/questions/lookup?Text=Email
327 +/users/1/partners/2
482 482  )))|(((
483 483  (% class="western" %)
484 -Returns all questions with “Email" in question text
330 +Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.
485 485  )))
486 486  |(((
487 487  (% class="western" %)
... ... @@ -488,32 +488,40 @@
488 488  POST
489 489  )))|(((
490 490  (% class="western" %)
491 -/questions
337 +/users/login
492 492  )))|(((
493 493  (% class="western" %)
494 -Create a new question
340 +Check to see user exist with username/email and password.
495 495  
496 496  (% class="western" %)
497 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent.
498 -)))
499 -|(((
343 +Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param.
344 +
500 500  (% class="western" %)
501 -PUT
502 -)))|(((
346 +Example:
347 +
503 503  (% class="western" %)
504 -/questions
505 -)))|(((
349 +{"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"}
350 +
506 506  (% class="western" %)
507 -Update a question
352 +OR
508 508  
509 509  (% class="western" %)
510 -JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
355 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
356 +
357 +(% class="western" %)
358 +OR
359 +
360 +(% class="western" %)
361 +{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
362 +
363 +(% class="western" %)
364 +**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found.
511 511  )))
512 512  
513 -
367 +\\
514 514  
515 515  (% class="western" %)
516 -**GET method can be used to lookup questions.**
370 +**GET method should be used to lookup users.**
517 517  
518 518  (% class="wrapped" %)
519 519  |(((
... ... @@ -534,18 +534,22 @@
534 534  String
535 535  )))|(((
536 536  (% class="western" %)
537 -URL encoded key value string parameters for the question that a user is trying to search.
391 +URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object.
538 538  
539 539  (% class="western" %)
540 -Params:
394 +Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]
541 541  
542 542  (% class="western" %)
543 -Text: Word or phrase that should be present in the question text (String)
397 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
544 544  
545 545  (% class="western" %)
546 -Type: Look up the question type.
400 +If return is not provided, all the demographics will be returned.
547 547  )))
548 548  
403 +\\
404 +
405 +\\
406 +
549 549  (% class="wrapped" %)
550 550  |(((
551 551  (% class="western" %)
... ... @@ -559,19 +559,45 @@
559 559  )))
560 560  |(((
561 561  (% class="western" %)
562 -Questions
420 +Users
421 +)))|=(((
422 +(% class="western" align="left" %)
423 +Users
563 563  )))|(((
564 564  (% class="western" %)
565 -Questions
566 -)))|(((
567 -(% class="western" %)
568 -Returns found question details.
426 +Found users returned with the demo field requested in return parameter in json format
569 569  )))
570 570  
571 -
429 +\\
572 572  
431 +**Sample response for /users/(% style="color: rgb(80,80,80);" %)25255449(%%)**
432 +
433 +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.
434 +
435 +(% class="relative-table wrapped" style="width: 100.0%;" %)
436 +|=(((
437 +(% class="content-wrapper" %)
438 +(((
439 +[[image:attach:Screen Shot 2020-02-26 at 11.15.52 AM.png||width="1407"]]
440 +)))
441 +)))
442 +
443 +\\
444 +
445 +**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(%%)**
446 +
447 +(% class="wrapped" %)
448 +|=(((
449 +(% class="content-wrapper" %)
450 +(((
451 +[[image:attach:Screen Shot 2020-02-26 at 11.22.13 AM.png||height="250"]]
452 +)))
453 +)))
454 +
455 +\\
456 +
573 573  (% class="western" %)
574 -**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).**
458 +**POST method should be used to create users.**
575 575  
576 576  (% class="wrapped" %)
577 577  |(((
... ... @@ -586,46 +586,49 @@
586 586  )))
587 587  |(((
588 588  (% class="western" %)
589 -Questions
473 +Users
590 590  )))|(((
591 591  (% class="western" %)
592 -Questions
476 +Users
593 593  )))|(((
594 594  (% class="western" %)
595 -This defines the question contents and possible responses.
479 +Users object that contains information about user to create. PartnerId Needs to be specified.
596 596  )))
597 -
598 -(% class="wrapped" %)
599 599  |(((
600 600  (% class="western" %)
601 -**Response**
483 +Transactions
602 602  )))|(((
603 603  (% class="western" %)
604 -**Type**
486 +Transactions
605 605  )))|(((
606 606  (% class="western" %)
607 -**Description**
489 +(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.
608 608  )))
609 609  |(((
610 610  (% class="western" %)
611 -QuestionId
493 +DedupeColumns
612 612  )))|(((
613 613  (% class="western" %)
614 -Int
496 +String
615 615  )))|(((
616 616  (% class="western" %)
617 -Returns ONEcount question id on successful creation of the question.
499 +CSV of question id's that should be considered to find duplicate.
618 618  )))
619 -
620 -
621 -
501 +|(((
622 622  (% class="western" %)
623 -PUT method should be used to update question.
503 +Return
504 +)))|(((
505 +(% class="western" %)
506 +String
507 +)))|(((
508 +(% class="western" %)
509 +CSV of ONEcount QuestionId's requested back in Users object in response.
510 +)))
624 624  
625 625  (% class="wrapped" %)
626 626  |(((
627 627  (% class="western" %)
628 -**Request**
515 +**Response**
629 629  )))|(((
630 630  (% class="western" %)
631 631  **Type**
... ... @@ -635,19 +635,24 @@
635 635  )))
636 636  |(((
637 637  (% class="western" %)
638 -Questions
525 +Users
526 +)))|=(((
527 +(% class="western" align="left" %)
528 +Users
639 639  )))|(((
640 640  (% class="western" %)
641 -Questions
642 -)))|(((
643 -(% class="western" %)
644 -This defines the question contents and responses.
531 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned.
645 645  )))
646 646  
534 +\\
535 +
536 +(% class="western" %)
537 +**PUT method should be used to update users.**
538 +
647 647  (% class="wrapped" %)
648 648  |(((
649 649  (% class="western" %)
650 -**Response**
542 +**Request**
651 651  )))|(((
652 652  (% class="western" %)
653 653  **Type**
... ... @@ -657,168 +657,174 @@
657 657  )))
658 658  |(((
659 659  (% class="western" %)
660 -QuestionId
552 +Users
661 661  )))|(((
662 662  (% class="western" %)
663 -Int
555 +Users
664 664  )))|(((
665 665  (% class="western" %)
666 -Returns ONEcount question id on successful update of the question.
558 +Users object with update fields. Return property has csv of questions id requested back in Users object.
667 667  )))
668 -
560 +|(((
669 669  (% class="western" %)
670 -
671 -
562 +Return
563 +)))|(((
672 672  (% class="western" %)
673 -Example: Get list of questions from api which has FirstName in text
674 -
675 -{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}}
676 -
565 +String
566 +)))|(((
677 677  (% class="western" %)
678 -{
679 -
568 +CSV of ONEcount QuestionId's requested back in Users object in response
569 +)))
570 +|(((
680 680  (% class="western" %)
681 -"result": {
682 -
572 +RequestDate
573 +)))|(((
683 683  (% class="western" %)
684 -"success": "1",
685 -
575 +Date
576 +)))|(((
686 686  (% class="western" %)
687 -"error": {
578 +RequestDate to use for the demo update. If not provided current date will be used.
579 +)))
688 688  
581 +(% class="wrapped" %)
582 +|(((
689 689  (% class="western" %)
690 -"code": "0",
691 -
584 +**Response**
585 +)))|(((
692 692  (% class="western" %)
693 -"message": ""
694 -
587 +**Type**
588 +)))|(((
695 695  (% class="western" %)
696 -}
697 -
590 +**Description**
591 +)))
592 +|(((
698 698  (% class="western" %)
699 -},
700 -
594 +Users
595 +)))|=(((
596 +(% class="western" align="left" %)
597 +Users
598 +)))|(((
701 701  (% class="western" %)
702 -"Questions": [
600 +Updated user returned with the demo field requested in return parameter in json format.
601 +)))
703 703  
704 704  (% class="western" %)
705 -{
604 +\\
706 706  
707 707  (% class="western" %)
708 -"Id": "6",
607 +\\
709 709  
710 710  (% class="western" %)
711 -"Text": "FirstName",
610 +Create new users. Here in this example the JSON for request is passed in userFile.json file.
712 712  
713 -(% class="western" %)
714 -"Type": "1",
612 +{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
715 715  
716 716  (% class="western" %)
717 -"Alias": "FName"
615 +**
616 +**
718 718  
719 719  (% class="western" %)
720 -}
619 +**
620 +**
721 721  
722 -(% class="western" %)
723 -]
622 +\\
724 724  
725 725  (% class="western" %)
726 -}
625 +**COMPONENT: Questions**
727 727  
728 728  (% class="western" %)
628 +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).
729 729  
730 -**Users**
731 -
732 732  (% class="western" %)
733 -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.
631 +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.
734 734  
735 735  (% class="western" %)
736 -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.
634 +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)
737 737  
738 738  (% class="western" %)
739 -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.
637 +There can be 6 types of questions:
740 740  
741 -(% class="western" %)
742 -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.
743 -
744 -(% class="western" %)
745 -Return parameter will have the comma separated list of question Ids that is requested back from the API.
746 -
747 -(% class="western" %)
748 -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.
749 -
750 -(% class="western" %)
751 -
752 -
753 753  (% class="wrapped" %)
754 754  |(((
755 -(% class="western" %)
756 -**Method**
641 +(% class="western" align="center" %)
642 +**Type**
757 757  )))|(((
758 758  (% class="western" %)
759 -**Url**
645 +**Description**
646 +)))
647 +|(((
648 +(% class="western" align="center" %)
649 +1
760 760  )))|(((
761 761  (% class="western" %)
762 -**Action**
652 +Textbox type questions or short response type question. The response length needs to be less than 255 characters.
763 763  )))
764 764  |(((
765 -(% class="western" %)
766 -GET
655 +(% class="western" align="center" %)
656 +2
767 767  )))|(((
768 768  (% class="western" %)
769 -/users
659 +Textarea type question or long response type question.
660 +)))
661 +|(((
662 +(% class="western" align="center" %)
663 +3
770 770  )))|(((
771 771  (% class="western" %)
772 -Get users data limiting 25.
666 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.
773 773  )))
774 774  |(((
669 +(% class="western" align="center" %)
670 +4
671 +)))|(((
775 775  (% class="western" %)
776 -GET
673 +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.
674 +)))
675 +|(((
676 +(% class="western" align="center" %)
677 +5
777 777  )))|(((
778 778  (% class="western" %)
779 -/users/1
680 +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.
681 +)))
682 +|(((
683 +(% class="western" align="center" %)
684 +6
780 780  )))|(((
781 781  (% class="western" %)
782 -Get data for user id 1. The user id can be a numeric value or a hash
687 +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.
783 783  )))
689 +
690 +(% class="wrapped" %)
784 784  |(((
785 785  (% class="western" %)
786 -GET
693 +**Method**
787 787  )))|(((
788 788  (% class="western" %)
789 -/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2
696 +**Url**
790 790  )))|(((
791 791  (% class="western" %)
792 -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.
793 -
794 -(% class="western" %)
795 -Return parameter defines a csv of question id that are requested back in response.
699 +**Action**
796 796  )))
797 797  |(((
798 798  (% class="western" %)
799 -POST
703 +GET
800 800  )))|(((
801 801  (% class="western" %)
802 -/users
706 +/questions
803 803  )))|(((
804 804  (% class="western" %)
805 -Create a new users
806 -
807 -(% class="western" %)
808 -Parameters required to create the user needs to be sent as post data in JSON format.
709 +List all questions
809 809  )))
810 810  |(((
811 811  (% class="western" %)
812 -PUT
713 +GET
813 813  )))|(((
814 814  (% class="western" %)
815 -/users/1
716 +/questions/1
816 816  )))|(((
817 817  (% class="western" %)
818 -Update user id 1. The user id can be a numeric value or a hash
819 -
820 -(% class="western" %)
821 -Parameters required to update the user needs to be sent as post data in JSON format.
719 +Returns question id 1
822 822  )))
823 823  |(((
824 824  (% class="western" %)
... ... @@ -825,10 +825,10 @@
825 825  GET
826 826  )))|(((
827 827  (% class="western" %)
828 -/users/1/partners/2
726 +/questions/lookup?Text=Email
829 829  )))|(((
830 830  (% class="western" %)
831 -Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.
729 +Returns all questions with “Email" in question text
832 832  )))
833 833  |(((
834 834  (% class="western" %)
... ... @@ -835,40 +835,32 @@
835 835  POST
836 836  )))|(((
837 837  (% class="western" %)
838 -/users/login
736 +/questions
839 839  )))|(((
840 840  (% class="western" %)
841 -Check to see user exist with username/email and password.
739 +Create a new question
842 842  
843 843  (% class="western" %)
844 -Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param.
845 -
742 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent.
743 +)))
744 +|(((
846 846  (% class="western" %)
847 -Example:
848 -
746 +PUT
747 +)))|(((
849 849  (% class="western" %)
850 -{"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"}
851 -
749 +/questions
750 +)))|(((
852 852  (% class="western" %)
853 -OR
752 +Update a question
854 854  
855 855  (% class="western" %)
856 -{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
857 -
858 -(% class="western" %)
859 -OR
860 -
861 -(% class="western" %)
862 -{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
863 -
864 -(% class="western" %)
865 -**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found.
755 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
866 866  )))
867 867  
868 -
758 +\\
869 869  
870 870  (% class="western" %)
871 -**GET method should be used to lookup users.**
761 +**GET method can be used to lookup questions.**
872 872  
873 873  (% class="wrapped" %)
874 874  |(((
... ... @@ -889,19 +889,18 @@
889 889  String
890 890  )))|(((
891 891  (% class="western" %)
892 -URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object.
782 +URL encoded key value string parameters for the question that a user is trying to search.
893 893  
894 894  (% class="western" %)
895 -Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]
785 +Params:
896 896  
897 897  (% class="western" %)
898 -return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
788 +Text: Word or phrase that should be present in the question text (String)
789 +
790 +(% class="western" %)
791 +Type: Look up the question type.
899 899  )))
900 900  
901 -
902 -
903 -
904 -
905 905  (% class="wrapped" %)
906 906  |(((
907 907  (% class="western" %)
... ... @@ -915,19 +915,19 @@
915 915  )))
916 916  |(((
917 917  (% class="western" %)
918 -Users
919 -)))|=(((
920 -(% class="western" align="left" %)
921 -Users
807 +Questions
922 922  )))|(((
923 923  (% class="western" %)
924 -Found users returned with the demo field requested in return parameter in json format.
810 +Questions
811 +)))|(((
812 +(% class="western" %)
813 +Returns found question details.
925 925  )))
926 926  
927 -
816 +\\
928 928  
929 929  (% class="western" %)
930 -**POST method should be used to create users.**
819 +**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).**
931 931  
932 932  (% class="wrapped" %)
933 933  |(((
... ... @@ -942,49 +942,46 @@
942 942  )))
943 943  |(((
944 944  (% class="western" %)
945 -Users
834 +Questions
946 946  )))|(((
947 947  (% class="western" %)
948 -Users
837 +Questions
949 949  )))|(((
950 950  (% class="western" %)
951 -Users object that contains information about user to create. PartnerId Needs to be specified.
840 +This defines the question contents and possible responses.
952 952  )))
842 +
843 +(% class="wrapped" %)
953 953  |(((
954 954  (% class="western" %)
955 -Transactions
846 +**Response**
956 956  )))|(((
957 957  (% class="western" %)
958 -Transactions
849 +**Type**
959 959  )))|(((
960 960  (% class="western" %)
961 -(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.
852 +**Description**
962 962  )))
963 963  |(((
964 964  (% class="western" %)
965 -DedupeColumns
856 +QuestionId
966 966  )))|(((
967 967  (% class="western" %)
968 -String
859 +Int
969 969  )))|(((
970 970  (% class="western" %)
971 -CSV of question id's that should be considered to find duplicate.
862 +Returns ONEcount question id on successful creation of the question.
972 972  )))
973 -|(((
864 +
865 +\\
866 +
974 974  (% class="western" %)
975 -Return
976 -)))|(((
977 -(% class="western" %)
978 -String
979 -)))|(((
980 -(% class="western" %)
981 -CSV of ONEcount QuestionId's requested back in Users object in response.
982 -)))
868 +PUT method should be used to update question.
983 983  
984 984  (% class="wrapped" %)
985 985  |(((
986 986  (% class="western" %)
987 -**Response**
873 +**Request**
988 988  )))|(((
989 989  (% class="western" %)
990 990  **Type**
... ... @@ -994,24 +994,19 @@
994 994  )))
995 995  |(((
996 996  (% class="western" %)
997 -Users
998 -)))|=(((
999 -(% class="western" align="left" %)
1000 -Users
883 +Questions
1001 1001  )))|(((
1002 1002  (% class="western" %)
1003 -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 +Questions
887 +)))|(((
888 +(% class="western" %)
889 +This defines the question contents and responses.
1004 1004  )))
1005 1005  
1006 -
1007 -
1008 -(% class="western" %)
1009 -**PUT method should be used to update users.**
1010 -
1011 1011  (% class="wrapped" %)
1012 1012  |(((
1013 1013  (% class="western" %)
1014 -**Request**
895 +**Response**
1015 1015  )))|(((
1016 1016  (% class="western" %)
1017 1017  **Type**
... ... @@ -1021,72 +1021,81 @@
1021 1021  )))
1022 1022  |(((
1023 1023  (% class="western" %)
1024 -Users
905 +QuestionId
1025 1025  )))|(((
1026 1026  (% class="western" %)
1027 -Users
908 +Int
1028 1028  )))|(((
1029 1029  (% class="western" %)
1030 -Users object with update fields. Return property has csv of questions id requested back in Users object.
911 +Returns ONEcount question id on successful update of the question.
1031 1031  )))
1032 -|(((
913 +
1033 1033  (% class="western" %)
1034 -Return
1035 -)))|(((
915 +\\
916 +
1036 1036  (% class="western" %)
1037 -String
1038 -)))|(((
918 +Example: Get list of questions from api which has FirstName in text
919 +
920 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}}
921 +
1039 1039  (% class="western" %)
1040 -CSV of ONEcount QuestionId's requested back in Users object in response
1041 -)))
1042 -|(((
923 +{
924 +
1043 1043  (% class="western" %)
1044 -RequestDate
1045 -)))|(((
926 +"result": {
927 +
1046 1046  (% class="western" %)
1047 -Date
1048 -)))|(((
929 +"success": "1",
930 +
1049 1049  (% class="western" %)
1050 -RequestDate to use for the demo update. If not provided current date will be used.
1051 -)))
932 +"error": {
1052 1052  
1053 -(% class="wrapped" %)
1054 -|(((
1055 1055  (% class="western" %)
1056 -**Response**
1057 -)))|(((
935 +"code": "0",
936 +
1058 1058  (% class="western" %)
1059 -**Type**
1060 -)))|(((
938 +"message": ""
939 +
1061 1061  (% class="western" %)
1062 -**Description**
1063 -)))
1064 -|(((
941 +}
942 +
1065 1065  (% class="western" %)
1066 -Users
1067 -)))|=(((
1068 -(% class="western" align="left" %)
1069 -Users
1070 -)))|(((
944 +},
945 +
1071 1071  (% class="western" %)
1072 -Updated user returned with the demo field requested in return parameter in json format.
1073 -)))
947 +"Questions": [
1074 1074  
1075 1075  (% class="western" %)
1076 -
950 +{
1077 1077  
1078 1078  (% class="western" %)
1079 -
953 +"Id": "6",
1080 1080  
1081 1081  (% class="western" %)
1082 -Create new users. Here in this example the JSON for request is passed in userFile.json file.
956 +"Text": "FirstName",
1083 1083  
1084 -{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
958 +(% class="western" %)
959 +"Type": "1",
1085 1085  
1086 1086  (% class="western" %)
1087 -**Products**
962 +"Alias": "FName"
1088 1088  
1089 1089  (% class="western" %)
965 +}
966 +
967 +(% class="western" %)
968 +]
969 +
970 +(% class="western" %)
971 +}
972 +
973 +(% class="western" %)
974 +\\
975 +
976 +(% class="western" %)
977 +**COMPONENT: Products**
978 +
979 +(% class="western" %)
1090 1090  This resource is for manipulating products resource. A product can be created, updated or searched.
1091 1091  
1092 1092  (% class="wrapped" %)
... ... @@ -1170,7 +1170,7 @@
1170 1170  {"ProductID":"65","ResourceID":”121"}
1171 1171  )))
1172 1172  
1173 -
1063 +\\
1174 1174  
1175 1175  (% class="western" %)
1176 1176  **GET method should be used to lookup products.**
... ... @@ -1225,7 +1225,7 @@
1225 1225  Returns found product details.
1226 1226  )))
1227 1227  
1228 -
1118 +\\
1229 1229  
1230 1230  (% class="western" %)
1231 1231  **POST method should be used to create products.**
... ... @@ -1255,7 +1255,7 @@
1255 1255  Example:
1256 1256  
1257 1257  (% class="western" %)
1258 -{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1148 +{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1259 1259  )))
1260 1260  
1261 1261  (% class="wrapped" %)
... ... @@ -1280,7 +1280,7 @@
1280 1280  Product Id of the newly created product.
1281 1281  )))
1282 1282  
1283 -
1173 +\\
1284 1284  
1285 1285  (% class="western" %)
1286 1286  PUT method should be used to update an individual product given the product info.
... ... @@ -1313,7 +1313,7 @@
1313 1313  **Example**:
1314 1314  
1315 1315  (% class="western" %)
1316 -{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1206 +{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17}
1317 1317  )))
1318 1318  
1319 1319  (% class="wrapped" %)
... ... @@ -1338,10 +1338,10 @@
1338 1338  Product id of the updated product.
1339 1339  )))
1340 1340  
1341 -
1231 +\\
1342 1342  
1343 1343  (% class="western" %)
1344 -**Terms**
1234 +**COMPONENT: Terms**
1345 1345  
1346 1346  (% class="western" %)
1347 1347  This resource is for manipulating terms resource. A term can be created, updated or searched.
... ... @@ -1398,7 +1398,7 @@
1398 1398  JSON of the terms type object needs to be sent as post data. Id field is mandatory for update.
1399 1399  )))
1400 1400  
1401 -
1291 +\\
1402 1402  
1403 1403  (% class="western" %)
1404 1404  **GET method should be used to lookup products.**
... ... @@ -1453,7 +1453,7 @@
1453 1453  Returns found term details.
1454 1454  )))
1455 1455  
1456 -
1346 +\\
1457 1457  
1458 1458  (% class="western" %)
1459 1459  **POST method should be used to create products.**
... ... @@ -1511,7 +1511,7 @@
1511 1511  Term Id of the newly created term.
1512 1512  )))
1513 1513  
1514 -
1404 +\\
1515 1515  
1516 1516  (% class="western" %)
1517 1517  PUT method should be used to update an individual term given the term info.
... ... @@ -1538,7 +1538,7 @@
1538 1538  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.
1539 1539  
1540 1540  (% class="western" %)
1541 -
1431 +\\
1542 1542  
1543 1543  (% class="western" %)
1544 1544  **Example**:
... ... @@ -1569,12 +1569,48 @@
1569 1569  term id of the updated term.
1570 1570  )))
1571 1571  
1572 -
1462 +\\
1573 1573  
1574 1574  (% class="western" %)
1575 -**Resources**
1465 +**COMPONENT: Resources**
1576 1576  
1577 1577  (% class="western" %)
1468 +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.
1469 +
1470 +* (((
1471 +(% class="western" %)
1472 +questions
1473 +)))
1474 +* (((
1475 +(% class="western" %)
1476 +users
1477 +)))
1478 +* (((
1479 +(% class="western" %)
1480 +products
1481 +)))
1482 +* (((
1483 +(% class="western" %)
1484 +terms
1485 +)))
1486 +* (((
1487 +(% class="western" %)
1488 +resources
1489 +)))
1490 +* (((
1491 +(% class="western" %)
1492 +sources
1493 +)))
1494 +* (((
1495 +(% class="western" %)
1496 +transactions
1497 +)))
1498 +
1499 +(% class="western" %)
1500 +**
1501 +**
1502 +
1503 +(% class="western" %)
1578 1578  This resource is for manipulating resources resource. A resource can be created, updated or searched.
1579 1579  
1580 1580  (% class="wrapped" %)
... ... @@ -1629,10 +1629,10 @@
1629 1629  JSON of the resources type object needs to be sent as post data. Id field is mandatory for update.
1630 1630  )))
1631 1631  
1632 -
1558 +\\
1633 1633  
1634 1634  (% class="western" %)
1635 -**GET method should be used to lookup products.**
1561 +**GET method should be used to lookup resources.**
1636 1636  
1637 1637  (% class="wrapped" %)
1638 1638  |(((
... ... @@ -1684,10 +1684,10 @@
1684 1684  Returns found resource details.
1685 1685  )))
1686 1686  
1687 -
1613 +\\
1688 1688  
1689 1689  (% class="western" %)
1690 -**POST method should be used to create products.**
1616 +**POST method should be used to create resources.**
1691 1691  
1692 1692  (% class="wrapped" %)
1693 1693  |(((
... ... @@ -1711,7 +1711,7 @@
1711 1711  resource details in json to be sent as post data. Id should not be set.
1712 1712  
1713 1713  (% class="western" %)
1714 -**Possible Request Params**: Name, Description, Type, Value
1640 +**Possible Request Params**: Name, Description, Type, Value, FreePass
1715 1715  
1716 1716  (% class="western" %)
1717 1717  **Example**:
... ... @@ -1718,6 +1718,15 @@
1718 1718  
1719 1719  (% class="western" %)
1720 1720  {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”}
1647 +
1648 +(% class="western" %)
1649 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]}
1650 +
1651 +(% class="western" %)
1652 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1}
1653 +
1654 +(% class="western" %)
1655 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1}
1721 1721  )))
1722 1722  
1723 1723  (% class="wrapped" %)
... ... @@ -1742,7 +1742,7 @@
1742 1742  Resource Id of the newly created resource.
1743 1743  )))
1744 1744  
1745 -
1680 +\\
1746 1746  
1747 1747  (% class="western" %)
1748 1748  PUT method should be used to update an individual resource given the resource info.
... ... @@ -1766,16 +1766,25 @@
1766 1766  Resource
1767 1767  )))|(((
1768 1768  (% class="western" %)
1769 -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.
1704 +Resource details to be updated injsonformat to be sent withrequest. Id property needs to be set to identify the resource to be updated.
1770 1770  
1771 1771  (% class="western" %)
1772 -
1707 +\\
1773 1773  
1774 1774  (% class="western" %)
1775 -Example:
1710 +Examples:
1776 1776  
1777 1777  (% class="western" %)
1778 1778  {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”}
1714 +
1715 +(% class="western" %)
1716 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]}
1717 +
1718 +(% class="western" %)
1719 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1}
1720 +
1721 +(% class="western" %)
1722 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1}
1779 1779  )))
1780 1780  
1781 1781  (% class="wrapped" %)
... ... @@ -1800,19 +1800,19 @@
1800 1800  resource id of the updated resource.
1801 1801  )))
1802 1802  
1803 -
1747 +\\
1804 1804  
1805 -(% class="western" %)
1806 -
1749 +\\
1807 1807  
1808 1808  (% class="western" %)
1809 -
1752 +\\
1810 1810  
1811 1811  (% class="western" %)
1812 -**Sources**
1755 +**COMPONENT: Source Codes
1756 +**
1813 1813  
1814 1814  (% class="western" %)
1815 -This resource is for manipulating sources resource. A source can be created, updated or searched.
1759 +This resource is for manipulating source code for a resource. A source code can be created, updated or searched.
1816 1816  
1817 1817  (% class="wrapped" %)
1818 1818  |(((
... ... @@ -1866,7 +1866,7 @@
1866 1866  JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update.
1867 1867  )))
1868 1868  
1869 -
1813 +\\
1870 1870  
1871 1871  (% class="western" %)
1872 1872  **Sources can be looked up given the code or Id. GET method should be used for lookup.**
... ... @@ -1921,10 +1921,10 @@
1921 1921  Returns found source details.
1922 1922  )))
1923 1923  
1924 -
1868 +\\
1925 1925  
1926 1926  (% class="western" %)
1927 -
1871 +\\
1928 1928  
1929 1929  (% class="western" %)
1930 1930  POST method should be used to create an individual source given the source parameters.
... ... @@ -1973,7 +1973,7 @@
1973 1973  Returns created source code id.
1974 1974  )))
1975 1975  
1976 -
1920 +\\
1977 1977  
1978 1978  (% class="western" %)
1979 1979  **PUT method can be used to update an individual source given the id.**
... ... @@ -2022,13 +2022,13 @@
2022 2022  Returns updated source id.
2023 2023  )))
2024 2024  
2025 -
1969 +\\
2026 2026  
2027 2027  (% class="western" %)
2028 -
1972 +\\
2029 2029  
2030 2030  (% class="western" %)
2031 -**Transactions**
1975 +**COMPONENT: Transactions**
2032 2032  
2033 2033  (% class="western" %)
2034 2034  This resource is for manipulating transactions resource. A transaction can be created or searched.
... ... @@ -2075,10 +2075,10 @@
2075 2075  JSON of the Transactions type object needs to be sent as post data. Id field should not be sent.
2076 2076  )))
2077 2077  
2078 -
2022 +\\
2079 2079  
2080 2080  (% class="western" %)
2081 -
2025 +\\
2082 2082  
2083 2083  (% class="western" %)
2084 2084  Transactions can be looked up using transactionId, date range, userid. Use GET method to do lookup.
... ... @@ -2117,11 +2117,7 @@
2117 2117  EndDate: When the search should end. Only valid when UserId is set. (Date)
2118 2118  )))
2119 2119  
2120 -
2121 -
2122 -
2123 -
2124 -(% class="wrapped" %)
2064 +(% class="wrapped" style="letter-spacing: 0.0px;" %)
2125 2125  |(((
2126 2126  (% class="western" %)
2127 2127  **Response**
... ... @@ -2140,11 +2140,23 @@
2140 2140  Transactions
2141 2141  )))|(((
2142 2142  (% class="western" %)
2143 -Returns all transaction that satisfies the search criteria.
2083 +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.
2144 2144  )))
2145 2145  
2146 -
2086 +\\
2147 2147  
2088 +**Sample response for /(% style="color: rgb(80,80,80);" %)transactions/lookup?UserId=25255105:(%%)**
2089 +
2090 +(% class="wrapped" %)
2091 +|=(((
2092 +(% class="content-wrapper" %)
2093 +(((
2094 +[[image:attach:Screen Shot 2020-02-26 at 11.14.29 AM.png||width="1407"]]
2095 +)))
2096 +)))
2097 +
2098 +\\
2099 +
2148 2148  (% class="western" %)
2149 2149  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.
2150 2150  
... ... @@ -2192,39 +2192,35 @@
2192 2192  Returns transactionId of the newly created transaction.
2193 2193  )))
2194 2194  
2195 -
2147 +\\
2196 2196  
2197 -
2149 +\\
2198 2198  
2199 -
2200 -
2201 -
2202 -
2203 -
2204 -
2205 2205  (% class="western" %)
2206 -**Stats**
2152 +**COMPONENT: Leads
2153 +**
2207 2207  
2208 2208  (% class="western" %)
2209 2209  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.
2210 2210  
2211 2211  (% class="western" %)
2212 -
2159 +\\
2213 2213  
2214 2214  (% class="western" %)
2215 -
2162 +\\
2216 2216  
2217 2217  (% class="western" %)
2218 -
2165 +\\
2219 2219  
2220 2220  (% class="western" %)
2221 -
2168 +\\
2222 2222  
2223 2223  (% class="western" %)
2224 -
2171 +\\
2225 2225  
2226 2226  (% class="western" %)
2227 -**Telemarketing**
2174 +**Telemarketing Leads
2175 +**
2228 2228  
2229 2229  (% class="western" %)
2230 2230  
... ... @@ -2272,7 +2272,7 @@
2272 2272  JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent.
2273 2273  )))
2274 2274  
2275 -
2223 +\\
2276 2276  
2277 2277  (% class="western" %)
2278 2278  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.
... ... @@ -2342,13 +2342,13 @@
2342 2342  )))
2343 2343  |(((
2344 2344  (% class="western" %)
2345 -
2293 +\\
2346 2346  )))|(((
2347 2347  (% class="western" %)
2348 -
2296 +\\
2349 2349  )))|(((
2350 2350  (% class="western" %)
2351 -
2299 +\\
2352 2352  )))
2353 2353  
2354 2354  (% class="wrapped" %)
... ... @@ -2373,18 +2373,18 @@
2373 2373  Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format.
2374 2374  )))
2375 2375  
2376 -
2324 +\\
2377 2377  
2378 -
2326 +\\
2379 2379  
2380 -
2328 +\\
2381 2381  
2382 -
2330 +\\
2383 2383  
2384 -
2332 +\\
2385 2385  
2386 2386  (% class="western" %)
2387 -**Reference**
2335 +**API REFERENCE**
2388 2388  
2389 2389  (% class="western" %)
2390 2390  **Type: Questions**
... ... @@ -2430,12 +2430,12 @@
2430 2430  (% class="western" %)
2431 2431  Determines which type of question it is. Textbox, checkbox, select, radio.
2432 2432  There can be 6 types of questions.
2433 - type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2434 - type=2 means textarea type question or long response type question.
2435 - type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2436 - 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.
2437 - 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.
2438 - 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.
2381 +type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2382 +type=2 means textarea type question or long response type question.
2383 +type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2384 +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.
2385 +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.
2386 +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.
2439 2439  )))
2440 2440  |(((
2441 2441  (% class="western" %)
... ... @@ -2458,13 +2458,13 @@
2458 2458  Alias for admin purpose.
2459 2459  )))
2460 2460  
2461 -
2409 +\\
2462 2462  
2463 2463  (% class="western" %)
2464 -
2412 +\\
2465 2465  
2466 2466  (% class="western" %)
2467 -
2415 +\\
2468 2468  
2469 2469  (% class="western" %)
2470 2470  **Type: Choices**
... ... @@ -2531,7 +2531,7 @@
2531 2531  Tied to which question id.
2532 2532  )))
2533 2533  
2534 -
2482 +\\
2535 2535  
2536 2536  (% class="western" %)
2537 2537  **Type: Users**
... ... @@ -2588,7 +2588,7 @@
2588 2588  Request date.
2589 2589  )))
2590 2590  
2591 -
2539 +\\
2592 2592  
2593 2593  (% class="western" %)
2594 2594  **Type: Demo**
... ... @@ -2635,7 +2635,7 @@
2635 2635  ...
2636 2636  )))
2637 2637  
2638 -
2586 +\\
2639 2639  
2640 2640  (% class="western" %)
2641 2641  **Type: Transactions**
... ... @@ -2782,7 +2782,7 @@
2782 2782  If there is amount (USD) included in transaction.
2783 2783  )))
2784 2784  
2785 -
2733 +\\
2786 2786  
2787 2787  (% class="western" %)
2788 2788  **Type: Sources**
... ... @@ -2839,10 +2839,10 @@
2839 2839  If this is a child source then list the parent source id.
2840 2840  )))
2841 2841  
2842 -
2790 +\\
2843 2843  
2844 2844  (% class="western" %)
2845 -
2793 +\\
2846 2846  
2847 2847  (% class="western" %)
2848 2848  **Type: Products**
... ... @@ -2899,7 +2899,7 @@
2899 2899  (Array of) Terms associated with the product.
2900 2900  )))
2901 2901  
2902 -
2850 +\\
2903 2903  
2904 2904  (% class="western" %)
2905 2905  **Type: Terms**
... ... @@ -2986,7 +2986,7 @@
2986 2986  If there is price (USD) for the term.
2987 2987  )))
2988 2988  
2989 -
2937 +\\
2990 2990  
2991 2991  (% class="western" %)
2992 2992  **Type: Resources**
... ... @@ -3063,14 +3063,30 @@
3063 3063  )))|(((
3064 3064  (% class="western" %)
3065 3065  String
3014 +
3015 +(% class="western" %)
3016 +or
3017 +
3018 +(% class="western" %)
3019 +Array
3066 3066  )))|(((
3067 3067  (% class="western" %)
3068 -Value of Resource Type.
3022 +Value of Resource Type:
3069 3069  
3070 3070  (% class="western" %)
3071 -Example : if the Type sent is 3 then Value would be **/digital/**
3025 +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.
3072 3072  
3073 3073  (% class="western" %)
3028 +For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests.
3029 +
3030 +(% class="western" %)
3031 +Example :
3032 +
3033 +(% class="western" %)
3034 +if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** **
3035 +**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"]
3036 +
3037 +(% class="western" %)
3074 3074  For Function type resource leave it blank.
3075 3075  )))
3076 3076  |(((
... ... @@ -3081,10 +3081,20 @@
3081 3081  Int
3082 3082  )))|(((
3083 3083  (% class="western" %)
3084 -Default limit is 25 but all the data needs to be pulled then pass limit=0.
3048 +Default limit is 25 but if all the data needs to be pulled then pass limit=0.
3085 3085  )))
3050 +|(% colspan="1" %)(% colspan="1" %)
3051 +(((
3052 +FreePass
3053 +)))|(% colspan="1" %)(% colspan="1" %)
3054 +(((
3055 +Int
3056 +)))|(% colspan="1" %)(% colspan="1" %)
3057 +(((
3058 +Default value is 0. This parameter is used to provide access to protected content.
3059 +)))
3086 3086  
3087 -
3061 +\\
3088 3088  
3089 3089  (% class="western" %)
3090 3090  **Type: Telemarketing**
... ... @@ -3174,8 +3174,12 @@
3174 3174  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.
3175 3175  
3176 3176  (% class="western" %)
3177 -
3151 +\\
3178 3178  
3179 3179  (% class="western" %)
3180 3180  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.
3181 3181  )))
3156 +
3157 +\\
3158 +
3159 +\\
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -3539007
1 +66715790
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/3539007/ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/66715790/ONEcount API Documentation