Changes for page OLD-ONEcount API Documentation
Last modified by Admin on 2025/06/27 12:14
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Admin1 +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 update ddifferent ONEcountresources 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 - Resourcesare theavailable entities thatcanbeaccessed/modifiedviaAPI.Each resourcecanbe created, updatedorrequested by usingthe correspondinghttpmethoddescribedabove.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 resourceisfor manipulating questionsresource.Questionsin ONEcount means anyquestionthatis asked to the subscriber. Itcould be anyquestions thatappears on customerforms or printforms that gets answeredbya subscriber. Questionsapi call will allow creation,update andsearchof questioninONEcount.Toadd a newquestionsto thesystem you'll makea POST apicallto thequestions 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 questionor long response type question.261 +**Action** 415 415 ))) 416 416 |((( 417 -(% class="western" align="center"%)418 - 3264 +(% 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 - Selector dropdown type questions. This is a multiplechoice, 1responsetype question. When creating this type of question the choices block also needs to be partof the questions object thatwill hold the possible choices ofthe select question.271 +Get users data limiting 25. 429 429 ))) 430 430 |((( 431 -(% class="western" align="center"%)432 - 5274 +(% 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 - Checkboxtypequestion. This isamultiple choice,multi responsetype question.Whencreating this type of question thechoicesblockalsoneedstobepartof the questions objectthat will hold thepossiblechoicesof 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 - GET298 +POST 459 459 )))|((( 460 460 (% class="western" %) 461 -/ questions301 +/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 - GET311 +PUT 469 469 )))|((( 470 470 (% class="western" %) 471 -/ questions/1314 +/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=Email327 +/users/1/partners/2 482 482 )))|((( 483 483 (% class="western" %) 484 - Returns allquestionswith“Email"inquestiontext330 +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 -/ questions337 +/users/login 492 492 )))|((( 493 493 (% class="western" %) 494 -C reateanewquestion340 +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 - PUT502 - )))|(((346 +Example: 347 + 503 503 (% class="western" %) 504 - /questions505 - )))|(((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 question352 +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 canbe used to lookupquestions.**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 thatauser isryingtosearch.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:Wordorphrase that should bepresent inthequestiontext(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:Lookup thequestiontype.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,42 @@ 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 +(% class="relative-table" 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 +|=((( 446 +(% class="content-wrapper" %) 447 +((( 448 +[[image:attach:Screen Shot 2020-02-26 at 11.22.13 AM.png||height="250"]] 449 +))) 450 +))) 451 + 452 +\\ 453 + 573 573 (% class="western" %) 574 -**POST method should be used to create questions. Thedata 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).**455 +**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 - Questions470 +Users 590 590 )))|((( 591 591 (% class="western" %) 592 - Questions473 +Users 593 593 )))|((( 594 594 (% class="western" %) 595 - Thisdefinesthequestioncontentsandpossibleresponses.476 +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**480 +Transactions 602 602 )))|((( 603 603 (% class="western" %) 604 - **Type**483 +Transactions 605 605 )))|((( 606 606 (% class="western" %) 607 - **Description**486 +(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 - QuestionId490 +DedupeColumns 612 612 )))|((( 613 613 (% class="western" %) 614 - Int493 +String 615 615 )))|((( 616 616 (% class="western" %) 617 - ReturnsONEcountquestion idonsuccessful creationofthe question.496 +CSV of question id's that should be considered to find duplicate. 618 618 ))) 619 - 620 - 621 - 498 +|((( 622 622 (% class="western" %) 623 -PUT method should be used to update question. 500 +Return 501 +)))|((( 502 +(% class="western" %) 503 +String 504 +)))|((( 505 +(% class="western" %) 506 +CSV of ONEcount QuestionId's requested back in Users object in response. 507 +))) 624 624 625 625 (% class="wrapped" %) 626 626 |((( 627 627 (% class="western" %) 628 -**Re quest**512 +**Response** 629 629 )))|((( 630 630 (% class="western" %) 631 631 **Type** ... ... @@ -635,19 +635,24 @@ 635 635 ))) 636 636 |((( 637 637 (% class="western" %) 638 -Questions 522 +Users 523 +)))|=((( 524 +(% class="western" align="left" %) 525 +Users 639 639 )))|((( 640 640 (% class="western" %) 641 -Questions 642 -)))|((( 643 -(% class="western" %) 644 -This defines the question contents and responses. 528 +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 531 +\\ 532 + 533 +(% class="western" %) 534 +**PUT method should be used to update users.** 535 + 647 647 (% class="wrapped" %) 648 648 |((( 649 649 (% class="western" %) 650 -**Re sponse**539 +**Request** 651 651 )))|((( 652 652 (% class="western" %) 653 653 **Type** ... ... @@ -657,168 +657,174 @@ 657 657 ))) 658 658 |((( 659 659 (% class="western" %) 660 - QuestionId549 +Users 661 661 )))|((( 662 662 (% class="western" %) 663 - Int552 +Users 664 664 )))|((( 665 665 (% class="western" %) 666 -Returns ONEcountquestion idon successful updateofthequestion.555 +Users object with update fields. Return property has csv of questions id requested back in Users object. 667 667 ))) 668 - 557 +|((( 669 669 (% class="western" %) 670 - 671 - 559 +Return 560 +)))|((( 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 - 562 +String 563 +)))|((( 677 677 (% class="western" %) 678 -{ 679 - 565 +CSV of ONEcount QuestionId's requested back in Users object in response 566 +))) 567 +|((( 680 680 (% class="western" %) 681 - "result": {682 - 569 +RequestDate 570 +)))|((( 683 683 (% class="western" %) 684 - "success": "1",685 - 572 +Date 573 +)))|((( 686 686 (% class="western" %) 687 -"error": { 575 +RequestDate to use for the demo update. If not provided current date will be used. 576 +))) 688 688 578 +(% class="wrapped" %) 579 +|((( 689 689 (% class="western" %) 690 - "code": "0",691 - 581 +**Response** 582 +)))|((( 692 692 (% class="western" %) 693 - "message": ""694 - 584 +**Type** 585 +)))|((( 695 695 (% class="western" %) 696 -} 697 - 587 +**Description** 588 +))) 589 +|((( 698 698 (% class="western" %) 699 -}, 700 - 591 +Users 592 +)))|=((( 593 +(% class="western" align="left" %) 594 +Users 595 +)))|((( 701 701 (% class="western" %) 702 -"Questions": [ 597 +Updated user returned with the demo field requested in return parameter in json format. 598 +))) 703 703 704 704 (% class="western" %) 705 - {601 +\\ 706 706 707 707 (% class="western" %) 708 - "Id": "6",604 +\\ 709 709 710 710 (% class="western" %) 711 - "Text":"FirstName",607 +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", 609 +{{{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" 612 +** 613 +** 718 718 719 719 (% class="western" %) 720 -} 616 +** 617 +** 721 721 722 -(% class="western" %) 723 -] 619 +\\ 724 724 725 725 (% class="western" %) 726 - }622 +**COMPONENT: Questions** 727 727 728 728 (% class="western" %) 625 +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 meansthecustomers of yoursystem.Users canbe added,updatedand searchedforusingthe usersresourcefrom the api.Forlookup,Ifa return parameterisspecifiedUsersbjectwillhavethosefields. IfnothingispecifiedbydefaultonlyUserIdis returned.628 +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)transactionobject specifyingpartsof thetransactiontobeaddedtothenewusercan be specified.UserId,TransactionIdand SubscriptionTypewillbeignoredifspecifiedforthiscase.Ashisisnewuserand newtransactionisbeingadded.631 +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 casethe provideddemographicinformationin users objectwillbe usedto create a new user in ONEcount and then a responsewill be generated. Before creating a new user,a check for duplicate will be performedbased on Dedupecolumnsandif found, and error code will be generated.634 +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**638 +(% class="western" align="center" %) 639 +**Type** 757 757 )))|((( 758 758 (% class="western" %) 759 -**Url** 642 +**Description** 643 +))) 644 +|((( 645 +(% class="western" align="center" %) 646 +1 760 760 )))|((( 761 761 (% class="western" %) 762 - **Action**649 +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 - GET652 +(% class="western" align="center" %) 653 +2 767 767 )))|((( 768 768 (% class="western" %) 769 -/users 656 +Textarea type question or long response type question. 657 +))) 658 +|((( 659 +(% class="western" align="center" %) 660 +3 770 770 )))|((( 771 771 (% class="western" %) 772 - Get users datalimiting25.663 +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 |((( 666 +(% class="western" align="center" %) 667 +4 668 +)))|((( 775 775 (% class="western" %) 776 -GET 670 +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. 671 +))) 672 +|((( 673 +(% class="western" align="center" %) 674 +5 777 777 )))|((( 778 778 (% class="western" %) 779 -/users/1 677 +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. 678 +))) 679 +|((( 680 +(% class="western" align="center" %) 681 +6 780 780 )))|((( 781 781 (% class="western" %) 782 - Getdataforuserid1.The useridcan be anumericvalueorahash684 +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 ))) 686 + 687 +(% class="wrapped" %) 784 784 |((( 785 785 (% class="western" %) 786 - GET690 +**Method** 787 787 )))|((( 788 788 (% class="western" %) 789 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2693 +**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. 696 +**Action** 796 796 ))) 797 797 |((( 798 798 (% class="western" %) 799 - POST700 +GET 800 800 )))|((( 801 801 (% class="western" %) 802 -/u sers703 +/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. 706 +List all questions 809 809 ))) 810 810 |((( 811 811 (% class="western" %) 812 - PUT710 +GET 813 813 )))|((( 814 814 (% class="western" %) 815 -/u sers/1713 +/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. 716 +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 -/u sers/1/partners/2723 +/questions/lookup?Text=Email 829 829 )))|((( 830 830 (% class="western" %) 831 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.726 +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 -/u sers/login733 +/questions 839 839 )))|((( 840 840 (% class="western" %) 841 -C heckto seeuserexistwithusername/email and password.736 +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 - 739 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 740 +))) 741 +|((( 846 846 (% class="western" %) 847 - Example:848 - 743 +PUT 744 +)))|((( 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 - 746 +/questions 747 +)))|((( 852 852 (% class="western" %) 853 - OR749 +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. 752 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 866 866 ))) 867 867 868 - 755 +\\ 869 869 870 870 (% class="western" %) 871 -**GET method shouldbe used to lookup users.**758 +**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. Returnpropertyhascsvof questionsid requestedbackinUsers object.779 +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"]]782 +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) 785 +Text: Word or phrase that should be present in the question text (String) 786 + 787 +(% class="western" %) 788 +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 804 +Questions 922 922 )))|((( 923 923 (% class="western" %) 924 -Found users returned with the demo field requested in return parameter in json format. 807 +Questions 808 +)))|((( 809 +(% class="western" %) 810 +Returns found question details. 925 925 ))) 926 926 927 - 813 +\\ 928 928 929 929 (% class="western" %) 930 -**POST method should be used to create users.** 816 +**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 - Users831 +Questions 946 946 )))|((( 947 947 (% class="western" %) 948 - Users834 +Questions 949 949 )))|((( 950 950 (% class="western" %) 951 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.837 +This defines the question contents and possible responses. 952 952 ))) 839 + 840 +(% class="wrapped" %) 953 953 |((( 954 954 (% class="western" %) 955 - Transactions843 +**Response** 956 956 )))|((( 957 957 (% class="western" %) 958 -T ransactions846 +**Type** 959 959 )))|((( 960 960 (% class="western" %) 961 - (Array of) transaction objectspecifying 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 +**Description** 962 962 ))) 963 963 |((( 964 964 (% class="western" %) 965 - DedupeColumns853 +QuestionId 966 966 )))|((( 967 967 (% class="western" %) 968 - String856 +Int 969 969 )))|((( 970 970 (% class="western" %) 971 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.859 +Returns ONEcount question id on successful creation of the question. 972 972 ))) 973 -|((( 861 + 862 +\\ 863 + 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 -))) 865 +PUT method should be used to update question. 983 983 984 984 (% class="wrapped" %) 985 985 |((( 986 986 (% class="western" %) 987 -**Re sponse**870 +**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 880 +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. 883 +Questions 884 +)))|((( 885 +(% class="western" %) 886 +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 -**Re quest**892 +**Response** 1015 1015 )))|((( 1016 1016 (% class="western" %) 1017 1017 **Type** ... ... @@ -1021,72 +1021,81 @@ 1021 1021 ))) 1022 1022 |((( 1023 1023 (% class="western" %) 1024 - Users902 +QuestionId 1025 1025 )))|((( 1026 1026 (% class="western" %) 1027 - Users905 +Int 1028 1028 )))|((( 1029 1029 (% class="western" %) 1030 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.908 +Returns ONEcount question id on successful update of the question. 1031 1031 ))) 1032 - |(((910 + 1033 1033 (% class="western" %) 1034 - Return1035 - )))|(((912 +\\ 913 + 1036 1036 (% class="western" %) 1037 -String 1038 -)))|((( 915 +Example: Get list of questions from api which has FirstName in text 916 + 917 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 918 + 1039 1039 (% class="western" %) 1040 -CSV of ONEcount QuestionId's requested back in Users object in response 1041 -))) 1042 -|((( 920 +{ 921 + 1043 1043 (% class="western" %) 1044 - RequestDate1045 - )))|(((923 +"result": { 924 + 1046 1046 (% class="western" %) 1047 - Date1048 - )))|(((926 +"success": "1", 927 + 1049 1049 (% class="western" %) 1050 -RequestDate to use for the demo update. If not provided current date will be used. 1051 -))) 929 +"error": { 1052 1052 1053 -(% class="wrapped" %) 1054 -|((( 1055 1055 (% class="western" %) 1056 - **Response**1057 - )))|(((932 +"code": "0", 933 + 1058 1058 (% class="western" %) 1059 - **Type**1060 - )))|(((935 +"message": "" 936 + 1061 1061 (% class="western" %) 1062 -**Description** 1063 -))) 1064 -|((( 938 +} 939 + 1065 1065 (% class="western" %) 1066 -Users 1067 -)))|=((( 1068 -(% class="western" align="left" %) 1069 -Users 1070 -)))|((( 941 +}, 942 + 1071 1071 (% class="western" %) 1072 -Updated user returned with the demo field requested in return parameter in json format. 1073 -))) 944 +"Questions": [ 1074 1074 1075 1075 (% class="western" %) 1076 - 947 +{ 1077 1077 1078 1078 (% class="western" %) 1079 - 950 +"Id": "6", 1080 1080 1081 1081 (% class="western" %) 1082 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.953 +"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}}} 955 +(% class="western" %) 956 +"Type": "1", 1085 1085 1086 1086 (% class="western" %) 1087 - **Products**959 +"Alias": "FName" 1088 1088 1089 1089 (% class="western" %) 962 +} 963 + 964 +(% class="western" %) 965 +] 966 + 967 +(% class="western" %) 968 +} 969 + 970 +(% class="western" %) 971 +\\ 972 + 973 +(% class="western" %) 974 +**COMPONENT: Products** 975 + 976 +(% 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 - 1060 +\\ 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 - 1115 +\\ 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} 1145 +{"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 - 1170 +\\ 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}1203 +{"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 - 1228 +\\ 1342 1342 1343 1343 (% class="western" %) 1344 -**Terms** 1231 +**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 - 1288 +\\ 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 - 1343 +\\ 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 - 1401 +\\ 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 - 1428 +\\ 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 - 1459 +\\ 1573 1573 1574 1574 (% class="western" %) 1575 -**Resources** 1462 +**COMPONENT: Resources** 1576 1576 1577 1577 (% class="western" %) 1465 +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. 1466 + 1467 +* ((( 1468 +(% class="western" %) 1469 +questions 1470 +))) 1471 +* ((( 1472 +(% class="western" %) 1473 +users 1474 +))) 1475 +* ((( 1476 +(% class="western" %) 1477 +products 1478 +))) 1479 +* ((( 1480 +(% class="western" %) 1481 +terms 1482 +))) 1483 +* ((( 1484 +(% class="western" %) 1485 +resources 1486 +))) 1487 +* ((( 1488 +(% class="western" %) 1489 +sources 1490 +))) 1491 +* ((( 1492 +(% class="western" %) 1493 +transactions 1494 +))) 1495 + 1496 +(% class="western" %) 1497 +** 1498 +** 1499 + 1500 +(% 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 - 1555 +\\ 1633 1633 1634 1634 (% class="western" %) 1635 -**GET method should be used to lookup products.**1558 +**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 - 1610 +\\ 1688 1688 1689 1689 (% class="western" %) 1690 -**POST method should be used to create products.**1613 +**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 1637 +**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/”} 1644 + 1645 +(% class="western" %) 1646 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1647 + 1648 +(% class="western" %) 1649 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1} 1650 + 1651 +(% class="western" %) 1652 +{"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 - 1677 +\\ 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 1701 +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 - 1704 +\\ 1773 1773 1774 1774 (% class="western" %) 1775 -Example: 1707 +Examples: 1776 1776 1777 1777 (% class="western" %) 1778 1778 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1711 + 1712 +(% class="western" %) 1713 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1714 + 1715 +(% class="western" %) 1716 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1} 1717 + 1718 +(% class="western" %) 1719 +{"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 - 1744 +\\ 1804 1804 1805 -(% class="western" %) 1806 - 1746 +\\ 1807 1807 1808 1808 (% class="western" %) 1809 - 1749 +\\ 1810 1810 1811 1811 (% class="western" %) 1812 -**Sources** 1752 +**COMPONENT: Source Codes 1753 +** 1813 1813 1814 1814 (% class="western" %) 1815 -This resource is for manipulating source sresource. A source can be created, updated or searched.1756 +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 - 1810 +\\ 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 - 1865 +\\ 1925 1925 1926 1926 (% class="western" %) 1927 - 1868 +\\ 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 - 1917 +\\ 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 - 1966 +\\ 2026 2026 2027 2027 (% class="western" %) 2028 - 1969 +\\ 2029 2029 2030 2030 (% class="western" %) 2031 -**Transactions** 1972 +**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 - 2019 +\\ 2079 2079 2080 2080 (% class="western" %) 2081 - 2022 +\\ 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" %) 2061 +(% class="wrapped" style="letter-spacing: 0.0px;" %) 2125 2125 |((( 2126 2126 (% class="western" %) 2127 2127 **Response** ... ... @@ -2140,11 +2140,22 @@ 2140 2140 Transactions 2141 2141 )))|((( 2142 2142 (% class="western" %) 2143 -Returns all transaction that satisfies the search criteria. 2080 +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 - 2083 +\\ 2147 2147 2085 +**Sample response for /(% style="color: rgb(80,80,80);" %)transactions/lookup?UserId=25255105:(%%)** 2086 + 2087 +|=((( 2088 +(% class="content-wrapper" %) 2089 +((( 2090 +[[image:attach:Screen Shot 2020-02-26 at 11.14.29 AM.png||width="1407"]] 2091 +))) 2092 +))) 2093 + 2094 +\\ 2095 + 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 - 2143 +\\ 2196 2196 2197 - 2145 +\\ 2198 2198 2199 - 2200 - 2201 - 2202 - 2203 - 2204 - 2205 2205 (% class="western" %) 2206 -**Stats** 2148 +**COMPONENT: Leads 2149 +** 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 - 2155 +\\ 2213 2213 2214 2214 (% class="western" %) 2215 - 2158 +\\ 2216 2216 2217 2217 (% class="western" %) 2218 - 2161 +\\ 2219 2219 2220 2220 (% class="western" %) 2221 - 2164 +\\ 2222 2222 2223 2223 (% class="western" %) 2224 - 2167 +\\ 2225 2225 2226 2226 (% class="western" %) 2227 -**Telemarketing** 2170 +**Telemarketing Leads 2171 +** 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 - 2219 +\\ 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 - 2289 +\\ 2346 2346 )))|((( 2347 2347 (% class="western" %) 2348 - 2292 +\\ 2349 2349 )))|((( 2350 2350 (% class="western" %) 2351 - 2295 +\\ 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 - 2320 +\\ 2377 2377 2378 - 2322 +\\ 2379 2379 2380 - 2324 +\\ 2381 2381 2382 - 2326 +\\ 2383 2383 2384 - 2328 +\\ 2385 2385 2386 2386 (% class="western" %) 2387 -**R eference**2331 +**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 - 2434 - 2435 - 2436 - 2437 - 2438 - 2377 +type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters. 2378 +type=2 means textarea type question or long response type question. 2379 +type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as * 2380 +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. 2381 +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. 2382 +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 - 2405 +\\ 2462 2462 2463 2463 (% class="western" %) 2464 - 2408 +\\ 2465 2465 2466 2466 (% class="western" %) 2467 - 2411 +\\ 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 - 2478 +\\ 2535 2535 2536 2536 (% class="western" %) 2537 2537 **Type: Users** ... ... @@ -2588,7 +2588,7 @@ 2588 2588 Request date. 2589 2589 ))) 2590 2590 2591 - 2535 +\\ 2592 2592 2593 2593 (% class="western" %) 2594 2594 **Type: Demo** ... ... @@ -2635,7 +2635,7 @@ 2635 2635 ... 2636 2636 ))) 2637 2637 2638 - 2582 +\\ 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 - 2729 +\\ 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 - 2786 +\\ 2843 2843 2844 2844 (% class="western" %) 2845 - 2789 +\\ 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 - 2846 +\\ 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 - 2933 +\\ 2990 2990 2991 2991 (% class="western" %) 2992 2992 **Type: Resources** ... ... @@ -3063,14 +3063,30 @@ 3063 3063 )))|((( 3064 3064 (% class="western" %) 3065 3065 String 3010 + 3011 +(% class="western" %) 3012 +or 3013 + 3014 +(% class="western" %) 3015 +Array 3066 3066 )))|((( 3067 3067 (% class="western" %) 3068 -Value of Resource Type .3018 +Value of Resource Type: 3069 3069 3070 3070 (% class="western" %) 3071 - Example:ifthe Type sent is3thenValuewouldbe**/digital/**3021 +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" %) 3024 +For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests. 3025 + 3026 +(% class="western" %) 3027 +Example : 3028 + 3029 +(% class="western" %) 3030 +if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** ** 3031 +**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"] 3032 + 3033 +(% 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. 3044 +Default limit is 25 but if all the data needs to be pulled then pass limit=0. 3085 3085 ))) 3046 +|(% colspan="1" %)(% colspan="1" %) 3047 +((( 3048 +FreePass 3049 +)))|(% colspan="1" %)(% colspan="1" %) 3050 +((( 3051 +Int 3052 +)))|(% colspan="1" %)(% colspan="1" %) 3053 +((( 3054 +Default value is 0. This parameter is used to provide access to protected content. 3055 +))) 3086 3086 3087 - 3057 +\\ 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 - 3147 +\\ 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 ))) 3152 + 3153 +\\ 3154 + 3155 +\\
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -3 5390071 +23331813 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/3 539007/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/23331813/ONEcount API Documentation