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.ayush - 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" %) ... ... @@ -202,7 +202,7 @@ 202 202 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. ... ... @@ -336,142 +336,97 @@ 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 513 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,19 @@ 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: Word or phrase that should be present in the question text (String) 544 - 545 -(% class="western" %) 546 -Type: Look up the question type. 397 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 547 547 ))) 548 548 400 + 401 + 402 + 403 + 549 549 (% class="wrapped" %) 550 550 |((( 551 551 (% class="western" %) ... ... @@ -559,19 +559,19 @@ 559 559 ))) 560 560 |((( 561 561 (% class="western" %) 562 -Questions 417 +Users 418 +)))|=((( 419 +(% class="western" align="left" %) 420 +Users 563 563 )))|((( 564 564 (% class="western" %) 565 -Questions 566 -)))|((( 567 -(% class="western" %) 568 -Returns found question details. 423 +Found users returned with the demo field requested in return parameter in json format. 569 569 ))) 570 570 571 571 572 572 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).**429 +**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 - Questions444 +Users 590 590 )))|((( 591 591 (% class="western" %) 592 - Questions447 +Users 593 593 )))|((( 594 594 (% class="western" %) 595 - Thisdefinesthequestioncontentsandpossibleresponses.450 +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**454 +Transactions 602 602 )))|((( 603 603 (% class="western" %) 604 - **Type**457 +Transactions 605 605 )))|((( 606 606 (% class="western" %) 607 - **Description**460 +(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 - QuestionId464 +DedupeColumns 612 612 )))|((( 613 613 (% class="western" %) 614 - Int467 +String 615 615 )))|((( 616 616 (% class="western" %) 617 - ReturnsONEcountquestion idonsuccessful creationofthe question.470 +CSV of question id's that should be considered to find duplicate. 618 618 ))) 619 - 620 - 621 - 472 +|((( 622 622 (% class="western" %) 623 -PUT method should be used to update question. 474 +Return 475 +)))|((( 476 +(% class="western" %) 477 +String 478 +)))|((( 479 +(% class="western" %) 480 +CSV of ONEcount QuestionId's requested back in Users object in response. 481 +))) 624 624 625 625 (% class="wrapped" %) 626 626 |((( 627 627 (% class="western" %) 628 -**Re quest**486 +**Response** 629 629 )))|((( 630 630 (% class="western" %) 631 631 **Type** ... ... @@ -635,19 +635,24 @@ 635 635 ))) 636 636 |((( 637 637 (% class="western" %) 638 -Questions 496 +Users 497 +)))|=((( 498 +(% class="western" align="left" %) 499 +Users 639 639 )))|((( 640 640 (% class="western" %) 641 -Questions 642 -)))|((( 643 -(% class="western" %) 644 -This defines the question contents and responses. 502 +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 505 + 506 + 507 +(% class="western" %) 508 +**PUT method should be used to update users.** 509 + 647 647 (% class="wrapped" %) 648 648 |((( 649 649 (% class="western" %) 650 -**Re sponse**513 +**Request** 651 651 )))|((( 652 652 (% class="western" %) 653 653 **Type** ... ... @@ -657,168 +657,174 @@ 657 657 ))) 658 658 |((( 659 659 (% class="western" %) 660 - QuestionId523 +Users 661 661 )))|((( 662 662 (% class="western" %) 663 - Int526 +Users 664 664 )))|((( 665 665 (% class="western" %) 666 -Returns ONEcountquestion idon successful updateofthequestion.529 +Users object with update fields. Return property has csv of questions id requested back in Users object. 667 667 ))) 668 - 531 +|((( 669 669 (% class="western" %) 670 - 671 - 533 +Return 534 +)))|((( 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 - 536 +String 537 +)))|((( 677 677 (% class="western" %) 678 -{ 679 - 539 +CSV of ONEcount QuestionId's requested back in Users object in response 540 +))) 541 +|((( 680 680 (% class="western" %) 681 - "result": {682 - 543 +RequestDate 544 +)))|((( 683 683 (% class="western" %) 684 - "success": "1",685 - 546 +Date 547 +)))|((( 686 686 (% class="western" %) 687 -"error": { 549 +RequestDate to use for the demo update. If not provided current date will be used. 550 +))) 688 688 552 +(% class="wrapped" %) 553 +|((( 689 689 (% class="western" %) 690 - "code": "0",691 - 555 +**Response** 556 +)))|((( 692 692 (% class="western" %) 693 - "message": ""694 - 558 +**Type** 559 +)))|((( 695 695 (% class="western" %) 696 -} 697 - 561 +**Description** 562 +))) 563 +|((( 698 698 (% class="western" %) 699 -}, 700 - 565 +Users 566 +)))|=((( 567 +(% class="western" align="left" %) 568 +Users 569 +)))|((( 701 701 (% class="western" %) 702 -"Questions": [ 571 +Updated user returned with the demo field requested in return parameter in json format. 572 +))) 703 703 704 704 (% class="western" %) 705 - {575 + 706 706 707 707 (% class="western" %) 708 - "Id":"6",578 + 709 709 710 710 (% class="western" %) 711 - "Text":"FirstName",581 +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", 583 +{{{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" 586 +** 587 +** 718 718 719 719 (% class="western" %) 720 -} 590 +** 591 +** 721 721 722 -(% class="western" %) 723 -] 593 + 724 724 725 725 (% class="western" %) 726 - }596 +**COMPONENT: Questions** 727 727 728 728 (% class="western" %) 599 +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.602 +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.605 +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.608 +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**612 +(% class="western" align="center" %) 613 +**Type** 757 757 )))|((( 758 758 (% class="western" %) 759 -**Url** 616 +**Description** 617 +))) 618 +|((( 619 +(% class="western" align="center" %) 620 +1 760 760 )))|((( 761 761 (% class="western" %) 762 - **Action**623 +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 - GET626 +(% class="western" align="center" %) 627 +2 767 767 )))|((( 768 768 (% class="western" %) 769 -/users 630 +Textarea type question or long response type question. 631 +))) 632 +|((( 633 +(% class="western" align="center" %) 634 +3 770 770 )))|((( 771 771 (% class="western" %) 772 - Get users datalimiting25.637 +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 |((( 640 +(% class="western" align="center" %) 641 +4 642 +)))|((( 775 775 (% class="western" %) 776 -GET 644 +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. 645 +))) 646 +|((( 647 +(% class="western" align="center" %) 648 +5 777 777 )))|((( 778 778 (% class="western" %) 779 -/users/1 651 +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. 652 +))) 653 +|((( 654 +(% class="western" align="center" %) 655 +6 780 780 )))|((( 781 781 (% class="western" %) 782 - Getdataforuserid1.The useridcan be anumericvalueorahash658 +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 ))) 660 + 661 +(% class="wrapped" %) 784 784 |((( 785 785 (% class="western" %) 786 - GET664 +**Method** 787 787 )))|((( 788 788 (% class="western" %) 789 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2667 +**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. 670 +**Action** 796 796 ))) 797 797 |((( 798 798 (% class="western" %) 799 - POST674 +GET 800 800 )))|((( 801 801 (% class="western" %) 802 -/u sers677 +/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. 680 +List all questions 809 809 ))) 810 810 |((( 811 811 (% class="western" %) 812 - PUT684 +GET 813 813 )))|((( 814 814 (% class="western" %) 815 -/u sers/1687 +/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. 690 +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/2697 +/questions/lookup?Text=Email 829 829 )))|((( 830 830 (% class="western" %) 831 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.700 +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/login707 +/questions 839 839 )))|((( 840 840 (% class="western" %) 841 -C heckto seeuserexistwithusername/email and password.710 +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 - 713 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 714 +))) 715 +|((( 846 846 (% class="western" %) 847 - Example:848 - 717 +PUT 718 +)))|((( 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 - 720 +/questions 721 +)))|((( 852 852 (% class="western" %) 853 - OR723 +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. 726 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 866 866 ))) 867 867 868 868 869 869 870 870 (% class="western" %) 871 -**GET method shouldbe used to lookup users.**732 +**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.753 +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"]]756 +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) 759 +Text: Word or phrase that should be present in the question text (String) 760 + 761 +(% class="western" %) 762 +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 778 +Questions 922 922 )))|((( 923 923 (% class="western" %) 924 -Found users returned with the demo field requested in return parameter in json format. 781 +Questions 782 +)))|((( 783 +(% class="western" %) 784 +Returns found question details. 925 925 ))) 926 926 927 927 928 928 929 929 (% class="western" %) 930 -**POST method should be used to create users.** 790 +**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 - Users805 +Questions 946 946 )))|((( 947 947 (% class="western" %) 948 - Users808 +Questions 949 949 )))|((( 950 950 (% class="western" %) 951 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.811 +This defines the question contents and possible responses. 952 952 ))) 813 + 814 +(% class="wrapped" %) 953 953 |((( 954 954 (% class="western" %) 955 - Transactions817 +**Response** 956 956 )))|((( 957 957 (% class="western" %) 958 -T ransactions820 +**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.823 +**Description** 962 962 ))) 963 963 |((( 964 964 (% class="western" %) 965 - DedupeColumns827 +QuestionId 966 966 )))|((( 967 967 (% class="western" %) 968 - String830 +Int 969 969 )))|((( 970 970 (% class="western" %) 971 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.833 +Returns ONEcount question id on successful creation of the question. 972 972 ))) 973 -|((( 835 + 836 + 837 + 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 -))) 839 +PUT method should be used to update question. 983 983 984 984 (% class="wrapped" %) 985 985 |((( 986 986 (% class="western" %) 987 -**Re sponse**844 +**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 854 +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. 857 +Questions 858 +)))|((( 859 +(% class="western" %) 860 +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**866 +**Response** 1015 1015 )))|((( 1016 1016 (% class="western" %) 1017 1017 **Type** ... ... @@ -1021,72 +1021,81 @@ 1021 1021 ))) 1022 1022 |((( 1023 1023 (% class="western" %) 1024 - Users876 +QuestionId 1025 1025 )))|((( 1026 1026 (% class="western" %) 1027 - Users879 +Int 1028 1028 )))|((( 1029 1029 (% class="western" %) 1030 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.882 +Returns ONEcount question id on successful update of the question. 1031 1031 ))) 1032 - |(((884 + 1033 1033 (% class="western" %) 1034 - Return1035 - )))|(((886 + 887 + 1036 1036 (% class="western" %) 1037 -String 1038 -)))|((( 889 +Example: Get list of questions from api which has FirstName in text 890 + 891 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 892 + 1039 1039 (% class="western" %) 1040 -CSV of ONEcount QuestionId's requested back in Users object in response 1041 -))) 1042 -|((( 894 +{ 895 + 1043 1043 (% class="western" %) 1044 - RequestDate1045 - )))|(((897 +"result": { 898 + 1046 1046 (% class="western" %) 1047 - Date1048 - )))|(((900 +"success": "1", 901 + 1049 1049 (% class="western" %) 1050 -RequestDate to use for the demo update. If not provided current date will be used. 1051 -))) 903 +"error": { 1052 1052 1053 -(% class="wrapped" %) 1054 -|((( 1055 1055 (% class="western" %) 1056 - **Response**1057 - )))|(((906 +"code": "0", 907 + 1058 1058 (% class="western" %) 1059 - **Type**1060 - )))|(((909 +"message": "" 910 + 1061 1061 (% class="western" %) 1062 -**Description** 1063 -))) 1064 -|((( 912 +} 913 + 1065 1065 (% class="western" %) 1066 -Users 1067 -)))|=((( 1068 -(% class="western" align="left" %) 1069 -Users 1070 -)))|((( 915 +}, 916 + 1071 1071 (% class="western" %) 1072 -Updated user returned with the demo field requested in return parameter in json format. 1073 -))) 918 +"Questions": [ 1074 1074 1075 1075 (% class="western" %) 1076 - 921 +{ 1077 1077 1078 1078 (% class="western" %) 1079 - 924 +"Id": "6", 1080 1080 1081 1081 (% class="western" %) 1082 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.927 +"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}}} 929 +(% class="western" %) 930 +"Type": "1", 1085 1085 1086 1086 (% class="western" %) 1087 - **Products**933 +"Alias": "FName" 1088 1088 1089 1089 (% class="western" %) 936 +} 937 + 938 +(% class="western" %) 939 +] 940 + 941 +(% class="western" %) 942 +} 943 + 944 +(% class="western" %) 945 + 946 + 947 +(% class="western" %) 948 +**COMPONENT: Products** 949 + 950 +(% 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" %) ... ... @@ -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} 1119 +{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1259 1259 ))) 1260 1260 1261 1261 (% class="wrapped" %) ... ... @@ -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}1177 +{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17} 1317 1317 ))) 1318 1318 1319 1319 (% class="wrapped" %) ... ... @@ -1341,7 +1341,7 @@ 1341 1341 1342 1342 1343 1343 (% class="western" %) 1344 -**Terms** 1205 +**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. ... ... @@ -1572,9 +1572,45 @@ 1572 1572 1573 1573 1574 1574 (% class="western" %) 1575 -**Resources** 1436 +**COMPONENT: Resources** 1576 1576 1577 1577 (% class="western" %) 1439 +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. 1440 + 1441 +* ((( 1442 +(% class="western" %) 1443 +questions 1444 +))) 1445 +* ((( 1446 +(% class="western" %) 1447 +users 1448 +))) 1449 +* ((( 1450 +(% class="western" %) 1451 +products 1452 +))) 1453 +* ((( 1454 +(% class="western" %) 1455 +terms 1456 +))) 1457 +* ((( 1458 +(% class="western" %) 1459 +resources 1460 +))) 1461 +* ((( 1462 +(% class="western" %) 1463 +sources 1464 +))) 1465 +* ((( 1466 +(% class="western" %) 1467 +transactions 1468 +))) 1469 + 1470 +(% class="western" %) 1471 +** 1472 +** 1473 + 1474 +(% 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" %) ... ... @@ -1632,7 +1632,7 @@ 1632 1632 1633 1633 1634 1634 (% class="western" %) 1635 -**GET method should be used to lookup products.**1532 +**GET method should be used to lookup resources.** 1636 1636 1637 1637 (% class="wrapped" %) 1638 1638 |((( ... ... @@ -1687,7 +1687,7 @@ 1687 1687 1688 1688 1689 1689 (% class="western" %) 1690 -**POST method should be used to create products.**1587 +**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 1611 +**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/”} 1618 + 1619 +(% class="western" %) 1620 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1621 + 1622 +(% class="western" %) 1623 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1} 1624 + 1625 +(% class="western" %) 1626 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1721 1721 ))) 1722 1722 1723 1723 (% class="wrapped" %) ... ... @@ -1766,16 +1766,25 @@ 1766 1766 Resource 1767 1767 )))|((( 1768 1768 (% class="western" %) 1769 -Resource details to be updated in 1675 +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 1772 1773 1773 1774 1774 (% class="western" %) 1775 -Example: 1681 +Examples: 1776 1776 1777 1777 (% class="western" %) 1778 1778 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1685 + 1686 +(% class="western" %) 1687 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1688 + 1689 +(% class="western" %) 1690 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1} 1691 + 1692 +(% class="western" %) 1693 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1779 1779 ))) 1780 1780 1781 1781 (% class="wrapped" %) ... ... @@ -1802,7 +1802,6 @@ 1802 1802 1803 1803 1804 1804 1805 -(% class="western" %) 1806 1806 1807 1807 1808 1808 (% class="western" %) ... ... @@ -1809,10 +1809,11 @@ 1809 1809 1810 1810 1811 1811 (% class="western" %) 1812 -**Sources** 1726 +**COMPONENT: Source Codes 1727 +** 1813 1813 1814 1814 (% class="western" %) 1815 -This resource is for manipulating source sresource. A source can be created, updated or searched.1730 +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 |((( ... ... @@ -2028,7 +2028,7 @@ 2028 2028 2029 2029 2030 2030 (% class="western" %) 2031 -**Transactions** 1946 +**COMPONENT: Transactions** 2032 2032 2033 2033 (% class="western" %) 2034 2034 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -2196,14 +2196,9 @@ 2196 2196 2197 2197 2198 2198 2199 - 2200 - 2201 - 2202 - 2203 - 2204 - 2205 2205 (% class="western" %) 2206 -**Stats** 2115 +**COMPONENT: Leads 2116 +** 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. ... ... @@ -2224,7 +2224,8 @@ 2224 2224 2225 2225 2226 2226 (% class="western" %) 2227 -**Telemarketing** 2137 +**Telemarketing Leads 2138 +** 2228 2228 2229 2229 (% class="western" %) 2230 2230 ... ... @@ -2384,7 +2384,7 @@ 2384 2384 2385 2385 2386 2386 (% class="western" %) 2387 -**R eference**2298 +**API REFERENCE** 2388 2388 2389 2389 (% class="western" %) 2390 2390 **Type: Questions** ... ... @@ -3063,14 +3063,30 @@ 3063 3063 )))|((( 3064 3064 (% class="western" %) 3065 3065 String 2977 + 2978 +(% class="western" %) 2979 +or 2980 + 2981 +(% class="western" %) 2982 +Array 3066 3066 )))|((( 3067 3067 (% class="western" %) 3068 -Value of Resource Type .2985 +Value of Resource Type: 3069 3069 3070 3070 (% class="western" %) 3071 - Example:ifthe Type sent is3thenValuewouldbe**/digital/**2988 +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" %) 2991 +For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests. 2992 + 2993 +(% class="western" %) 2994 +Example : 2995 + 2996 +(% class="western" %) 2997 +if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** ** 2998 +**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"] 2999 + 3000 +(% class="western" %) 3074 3074 For Function type resource leave it blank. 3075 3075 ))) 3076 3076 |((( ... ... @@ -3083,6 +3083,16 @@ 3083 3083 (% class="western" %) 3084 3084 Default limit is 25 but all the data needs to be pulled then pass limit=0. 3085 3085 ))) 3013 +|(% colspan="1" %)(% colspan="1" %) 3014 +((( 3015 +FreePass 3016 +)))|(% colspan="1" %)(% colspan="1" %) 3017 +((( 3018 +Int 3019 +)))|(% colspan="1" %)(% colspan="1" %) 3020 +((( 3021 +Default value is 0. This parameter is used to provide access to protected content. 3022 +))) 3086 3086 3087 3087 3088 3088
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 - 35390071 +4882495 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/ 3539007/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/4882495/ONEcount API Documentation