Changes for page OLD-ONEcount API Documentation
Last modified by Admin on 2025/06/27 12:14
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - sonish-APIDocument-230317-1008-181 +ONEcount API Documentation - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. sonish1 +XWiki.mikef - Content
-
... ... @@ -1,56 +49,8 @@ 1 -(% class="western" align="center" %) 2 - 3 - 4 -(% class="western" align="center" %) 5 - 6 - 7 -(% class="western" align="center" %) 8 - 9 - 10 -(% class="western" align="center" %) 11 - 12 - 13 -(% class="western" align="center" %) 14 - 15 - 16 -(% class="western" align="center" %) 17 - 18 - 19 -(% class="western" align="center" %) 20 -ONEcount REST API Developer's Guide 21 - 22 -(% class="western" align="center" %) 23 -Version 2.1 24 - 25 -(% class="western" align="center" %) 26 - 27 - 28 -(% class="western" align="center" %) 29 - 30 - 31 -(% class="western" align="center" %) 32 - 33 - 34 -(% class="western" align="center" %) 35 - 36 - 37 -(% class="western" align="center" %) 38 - 39 - 40 -(% class="western" align="center" %) 41 - 42 - 43 -(% class="western" align="center" %) 44 - 45 - 46 -(% class="western" align="center" %) 47 - 48 - 49 49 (% class="western" %) 50 50 **Introduction** 51 51 52 52 (% class="western" %) 53 -ONEcount REST API provides differentfunctionality toaccomplishmanytegrationrelatedtasks. This API can be used to lookup, create and updateddifferent 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. 54 54 55 55 (% class="western" %) 56 56 REST takes advantage of the HTTP request methods to layer itself into the existing HTTP architecture. These operations consist of the following: ... ... @@ -57,15 +57,12 @@ 57 57 58 58 1. ((( 59 59 (% class="western" %) 60 -**GET** - Used for lookup of resources 61 - 62 -* ((( 12 +**GET** - Used for lookup of resourcesresources 13 +))) 63 63 1. ((( 64 64 (% class="western" %) 65 65 **PUT** - Used to update a resource 66 66 ))) 67 -))) 68 -))) 69 69 1. ((( 70 70 (% class="western" %) 71 71 **POST** - Used to create a new resource ... ... @@ -72,178 +72,55 @@ 72 72 ))) 73 73 74 74 (% class="western" %) 75 -ONEcount API provides following functionalities:24 +Specifically, the ONEcount API provides to the following components: 76 76 77 -1. ((( 78 -(% class="western" %) 79 -**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 +\\\\\\ 80 80 81 -* 82 - 83 83 (% class="western" %) 84 - Userlookup60 +**Accessing API** 85 85 86 -* 87 - 88 88 (% class="western" %) 89 -T ransactionlookup63 +**REST API URL**: [[https:~~/~~/api.onecount.net/v2/>>url:https://api.onecount.net/v2/||shape="rect"]] 90 90 91 -* 92 - 93 93 (% class="western" %) 94 - Questionlookup66 +**Appkey**: THIS WILL BE PROVIDED TO YOU 95 95 96 -* 97 - 98 98 (% class="western" %) 99 -Source code lookup 69 +** 70 +** 100 100 101 -* 102 - 103 103 (% class="western" %) 104 -Product lookup 105 - 106 -* 107 - 108 -(% class="western" %) 109 -Term lookup 110 - 111 -* 112 - 113 -(% class="western" %) 114 -Resource lookup 115 -))) 116 -1. ((( 117 -(% class="western" %) 118 -**Create** 119 - 120 -* 121 - 122 -(% class="western" %) 123 -Add a user/demo 124 - 125 -* 126 - 127 -(% class="western" %) 128 -Add a question 129 - 130 -* 131 - 132 -(% class="western" %) 133 -Add user transaction 134 - 135 -* 136 - 137 -(% class="western" %) 138 -Add source code 139 - 140 -* 141 - 142 -(% class="western" %) 143 -Add Product 144 - 145 -* 146 - 147 -(% class="western" %) 148 -Add Term 149 - 150 -* 151 - 152 -(% class="western" %) 153 -Add Resource 154 - 155 -* 156 - 157 -(% class="western" %) 158 -Stats – Telemarketing 159 -))) 160 -1. ((( 161 -(% class="western" %) 162 -**Update** 163 - 164 -* 165 - 166 -(% class="western" %) 167 -Update a user/demo 168 - 169 -* 170 - 171 -(% class="western" %) 172 -Update a question 173 - 174 -* 175 - 176 -(% class="western" %) 177 -Update source code 178 - 179 -* 180 - 181 -(% class="western" %) 182 -Update product 183 - 184 -* 185 - 186 -(% class="western" %) 187 -Update term 188 - 189 -* 190 - 191 -(% class="western" %) 192 -Update resource 193 -))) 194 -1. ((( 195 -(% class="western" %) 196 -**List** 197 - 198 -* 199 - 200 -(% class="western" %) 201 -ListQuestions 202 - 203 -* 204 - 205 -(% class="western" %) 206 -ListSourceCodes 207 -))) 208 - 209 -(% class="western" %) 210 - 211 - 212 -1. ((( 213 -(% class="western" %) 214 -**Attach** 215 -))) 216 - 217 -* ((( 218 -(% class="western" %) 219 -Attach resource to product 220 -))) 221 - 222 -(% class="western" %) 223 - 224 - 225 -(% class="western" %) 226 - 227 - 228 -(% class="western" %) 229 -**REST API URL**: [[https:~~/~~/api.onecount.net/v2/>>url:https://api.onecount.net/v2/||shape="rect" class="western"]] 230 - 231 -(% class="western" %) 232 -**Appkey**: THIS WILL BE PROVIDED 233 - 234 -(% class="western" %) 235 - 236 - 237 -(% class="western" %) 238 -**Function** 239 - 240 -(% class="western" %) 241 -The ONEcount REST API will be used to create, update & lookup users, transactions and questions e.t.c. in ONEcount hosted install of the client. 242 - 243 -(% class="western" %) 244 -**Accessing API** 245 - 246 -(% class="western" %) 247 247 Your HTTP requests to a REST API resource should contain the following information: 248 248 249 249 * ((( ... ... @@ -264,9 +264,12 @@ 264 264 ))) 265 265 266 266 (% class="western" %) 267 - **Request**93 + 268 268 269 269 (% class="western" %) 96 +**General API Usage** 97 + 98 +(% class="western" %) 270 270 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. 271 271 272 272 (% class="western" %) ... ... @@ -395,131 +395,100 @@ 395 395 396 396 397 397 (% class="western" %) 398 -**Resources** 227 +** 228 +** 399 399 230 +**COMPONENT: Users** 231 + 400 400 (% class="western" %) 401 - Resourcesare theavailable entities thatcan be accessed/modifiedviaAPI. Each resourcecanbecreated,updatedor requested byusingthecorrespondinghttpmethod describedabove.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. 402 402 403 -* ((( 404 404 (% class="western" %) 405 -questions 406 -))) 407 -* ((( 408 -(% class="western" %) 409 -users 410 -))) 411 -* ((( 412 -(% class="western" %) 413 -products 414 -))) 415 -* ((( 416 -(% class="western" %) 417 -terms 418 -))) 419 -* ((( 420 -(% class="western" %) 421 -resources 422 -))) 423 -* ((( 424 -(% class="western" %) 425 -sources 426 -))) 427 -* ((( 428 -(% class="western" %) 429 -transactions 430 -))) 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. 431 431 432 432 (% class="western" %) 433 - **Questions**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. 434 434 435 435 (% class="western" %) 436 - Thisresource isforipulating questionsresource.QuestionsinONEcountmeans any questionthat is askedto thesubscriber.It couldbeanyquestions thatappearsoncustomerforms or print forms that getsansweredbyaubscriber.Questions api callwillallowcreation, updateandsearchof questioninONEcount. To add a new questionsto thesystemyou'll make aPOST apicall tothe questionsresource.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. 437 437 438 438 (% class="western" %) 439 - Thedatathat is sentshould be inJSON formatand oftypequestionsasdescribed in Referencessection.The type property of questionsobject isdescribed below. Questions object will only need ahoices blockifthe question is amultiplechoicequestion(type=4 or 5 or 6)245 +Return parameter will have the comma separated list of question Ids that is requested back from the API. 440 440 441 441 (% class="western" %) 442 - Therecanbe6types ofquestions: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. 443 443 250 + 251 + 252 +(% class="wrapped" %) 444 444 |((( 445 -(% class="western" align="center" %) 446 -**Type** 447 -)))|((( 448 448 (% class="western" %) 449 -**Description** 450 -))) 451 -|((( 452 -(% class="western" align="center" %) 453 -1 255 +**Method** 454 454 )))|((( 455 455 (% class="western" %) 456 -Textbox type questions or short response type question. The response length needs to be less than 255 characters. 457 -))) 458 -|((( 459 -(% class="western" align="center" %) 460 -2 258 +**Url** 461 461 )))|((( 462 462 (% class="western" %) 463 - Textarea type questionor long response type question.261 +**Action** 464 464 ))) 465 465 |((( 466 -(% class="western" align="center"%)467 - 3264 +(% class="western" %) 265 +GET 468 468 )))|((( 469 469 (% class="western" %) 470 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 471 -))) 472 -|((( 473 -(% class="western" align="center" %) 474 -4 268 +/users 475 475 )))|((( 476 476 (% class="western" %) 477 - 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. 478 478 ))) 479 479 |((( 480 -(% class="western" align="center"%)481 - 5274 +(% class="western" %) 275 +GET 482 482 )))|((( 483 483 (% class="western" %) 484 -Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question. 485 -))) 486 -|((( 487 -(% class="western" align="center" %) 488 -6 278 +/users/1 489 489 )))|((( 490 490 (% class="western" %) 491 - 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 492 492 ))) 493 - 494 494 |((( 495 495 (% class="western" %) 496 - **Method**285 +GET 497 497 )))|((( 498 498 (% class="western" %) 499 - **Url**288 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2 500 500 )))|((( 501 501 (% class="western" %) 502 -**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. 503 503 ))) 504 504 |((( 505 505 (% class="western" %) 506 - GET298 +POST 507 507 )))|((( 508 508 (% class="western" %) 509 -/ questions301 +/users 510 510 )))|((( 511 511 (% class="western" %) 512 -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. 513 513 ))) 514 514 |((( 515 515 (% class="western" %) 516 - GET311 +PUT 517 517 )))|((( 518 518 (% class="western" %) 519 -/ questions/1314 +/users/1 520 520 )))|((( 521 521 (% class="western" %) 522 -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. 523 523 ))) 524 524 |((( 525 525 (% class="western" %) ... ... @@ -526,10 +526,10 @@ 526 526 GET 527 527 )))|((( 528 528 (% class="western" %) 529 -/ questions/lookup?Text=Email327 +/users/1/partners/2 530 530 )))|((( 531 531 (% class="western" %) 532 - 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. 533 533 ))) 534 534 |((( 535 535 (% class="western" %) ... ... @@ -536,33 +536,42 @@ 536 536 POST 537 537 )))|((( 538 538 (% class="western" %) 539 -/ questions337 +/users/login 540 540 )))|((( 541 541 (% class="western" %) 542 -C reateanewquestion340 +Check to see user exist with username/email and password. 543 543 544 544 (% class="western" %) 545 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 546 -))) 547 -|((( 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 + 548 548 (% class="western" %) 549 - PUT550 - )))|(((346 +Example: 347 + 551 551 (% class="western" %) 552 - /questions553 - )))|(((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 + 554 554 (% class="western" %) 555 - Update a question352 +OR 556 556 557 557 (% class="western" %) 558 -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. 559 559 ))) 560 560 561 561 562 562 563 563 (% class="western" %) 564 -**GET method canbe used to lookupquestions.**370 +**GET method should be used to lookup users.** 565 565 372 +(% class="wrapped" %) 566 566 |((( 567 567 (% class="western" %) 568 568 **Request** ... ... @@ -581,18 +581,20 @@ 581 581 String 582 582 )))|((( 583 583 (% class="western" %) 584 -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. 585 585 586 586 (% class="western" %) 587 -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"]] 588 588 589 589 (% class="western" %) 590 -Text: Word or phrase that should be present in the question text (String) 591 - 592 -(% class="western" %) 593 -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) 594 594 ))) 595 595 400 + 401 + 402 + 403 + 404 +(% class="wrapped" %) 596 596 |((( 597 597 (% class="western" %) 598 598 **Response** ... ... @@ -605,20 +605,21 @@ 605 605 ))) 606 606 |((( 607 607 (% class="western" %) 608 -Questions 417 +Users 418 +)))|=((( 419 +(% class="western" align="left" %) 420 +Users 609 609 )))|((( 610 610 (% class="western" %) 611 -Questions 612 -)))|((( 613 -(% class="western" %) 614 -Returns found question details. 423 +Found users returned with the demo field requested in return parameter in json format. 615 615 ))) 616 616 617 617 618 618 619 619 (% class="western" %) 620 -**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.** 621 621 431 +(% class="wrapped" %) 622 622 |((( 623 623 (% class="western" %) 624 624 **Request** ... ... @@ -631,44 +631,49 @@ 631 631 ))) 632 632 |((( 633 633 (% class="western" %) 634 - Questions444 +Users 635 635 )))|((( 636 636 (% class="western" %) 637 - Questions447 +Users 638 638 )))|((( 639 639 (% class="western" %) 640 - Thisdefinesthequestioncontentsandpossibleresponses.450 +Users object that contains information about user to create. PartnerId Needs to be specified. 641 641 ))) 642 - 643 643 |((( 644 644 (% class="western" %) 645 - **Response**454 +Transactions 646 646 )))|((( 647 647 (% class="western" %) 648 - **Type**457 +Transactions 649 649 )))|((( 650 650 (% class="western" %) 651 - **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. 652 652 ))) 653 653 |((( 654 654 (% class="western" %) 655 - QuestionId464 +DedupeColumns 656 656 )))|((( 657 657 (% class="western" %) 658 - Int467 +String 659 659 )))|((( 660 660 (% class="western" %) 661 - ReturnsONEcountquestion idonsuccessful creationofthe question.470 +CSV of question id's that should be considered to find duplicate. 662 662 ))) 663 - 664 - 665 - 472 +|((( 666 666 (% class="western" %) 667 -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 +))) 668 668 483 +(% class="wrapped" %) 669 669 |((( 670 670 (% class="western" %) 671 -**Re quest**486 +**Response** 672 672 )))|((( 673 673 (% class="western" %) 674 674 **Type** ... ... @@ -678,18 +678,24 @@ 678 678 ))) 679 679 |((( 680 680 (% class="western" %) 681 -Questions 496 +Users 497 +)))|=((( 498 +(% class="western" align="left" %) 499 +Users 682 682 )))|((( 683 683 (% class="western" %) 684 -Questions 685 -)))|((( 686 -(% class="western" %) 687 -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. 688 688 ))) 689 689 505 + 506 + 507 +(% class="western" %) 508 +**PUT method should be used to update users.** 509 + 510 +(% class="wrapped" %) 690 690 |((( 691 691 (% class="western" %) 692 -**Re sponse**513 +**Request** 693 693 )))|((( 694 694 (% class="western" %) 695 695 **Type** ... ... @@ -699,167 +699,174 @@ 699 699 ))) 700 700 |((( 701 701 (% class="western" %) 702 - QuestionId523 +Users 703 703 )))|((( 704 704 (% class="western" %) 705 - Int526 +Users 706 706 )))|((( 707 707 (% class="western" %) 708 -Returns ONEcountquestion idon successful updateofthequestion.529 +Users object with update fields. Return property has csv of questions id requested back in Users object. 709 709 ))) 710 - 531 +|((( 711 711 (% class="western" %) 712 - 713 - 533 +Return 534 +)))|((( 714 714 (% class="western" %) 715 -Example: Get list of questions from api which has FirstName in text 716 - 717 -{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 718 - 536 +String 537 +)))|((( 719 719 (% class="western" %) 720 -{ 721 - 539 +CSV of ONEcount QuestionId's requested back in Users object in response 540 +))) 541 +|((( 722 722 (% class="western" %) 723 - "result": {724 - 543 +RequestDate 544 +)))|((( 725 725 (% class="western" %) 726 - "success": "1",727 - 546 +Date 547 +)))|((( 728 728 (% class="western" %) 729 -"error": { 549 +RequestDate to use for the demo update. If not provided current date will be used. 550 +))) 730 730 552 +(% class="wrapped" %) 553 +|((( 731 731 (% class="western" %) 732 - "code": "0",733 - 555 +**Response** 556 +)))|((( 734 734 (% class="western" %) 735 - "message": ""736 - 558 +**Type** 559 +)))|((( 737 737 (% class="western" %) 738 -} 739 - 561 +**Description** 562 +))) 563 +|((( 740 740 (% class="western" %) 741 -}, 742 - 565 +Users 566 +)))|=((( 567 +(% class="western" align="left" %) 568 +Users 569 +)))|((( 743 743 (% class="western" %) 744 -"Questions": [ 571 +Updated user returned with the demo field requested in return parameter in json format. 572 +))) 745 745 746 746 (% class="western" %) 747 - {575 + 748 748 749 749 (% class="western" %) 750 - "Id":"6",578 + 751 751 752 752 (% class="western" %) 753 - "Text":"FirstName",581 +Create new users. Here in this example the JSON for request is passed in userFile.json file. 754 754 755 -(% class="western" %) 756 -"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}}} 757 757 758 758 (% class="western" %) 759 -"Alias": "FName" 586 +** 587 +** 760 760 761 761 (% class="western" %) 762 -} 590 +** 591 +** 763 763 764 -(% class="western" %) 765 -] 593 + 766 766 767 767 (% class="western" %) 768 - }596 +**COMPONENT: Questions** 769 769 770 770 (% 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). 771 771 772 -**Users** 773 - 774 774 (% class="western" %) 775 - 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. 776 776 777 777 (% class="western" %) 778 - 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) 779 779 780 780 (% class="western" %) 781 - 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: 782 782 783 -(% class="western" %) 784 -If username and password is not one of the parameters being passed, then a random username and password will be generated for the user while creating his user account in ONEcount. 785 - 786 -(% class="western" %) 787 -Return parameter will have the comma separated list of question Ids that is requested back from the API. 788 - 789 -(% class="western" %) 790 -Return is an optional parameter in request. If return is not requested then by default, only UserId (which is ONEcount ID) will be returned in the Users object. 791 - 792 -(% class="western" %) 793 - 794 - 610 +(% class="wrapped" %) 795 795 |((( 796 -(% class="western" %) 797 -** Method**612 +(% class="western" align="center" %) 613 +**Type** 798 798 )))|((( 799 799 (% class="western" %) 800 -**Url** 616 +**Description** 617 +))) 618 +|((( 619 +(% class="western" align="center" %) 620 +1 801 801 )))|((( 802 802 (% class="western" %) 803 - **Action**623 +Textbox type questions or short response type question. The response length needs to be less than 255 characters. 804 804 ))) 805 805 |((( 806 -(% class="western" %) 807 - GET626 +(% class="western" align="center" %) 627 +2 808 808 )))|((( 809 809 (% class="western" %) 810 -/users 630 +Textarea type question or long response type question. 631 +))) 632 +|((( 633 +(% class="western" align="center" %) 634 +3 811 811 )))|((( 812 812 (% class="western" %) 813 - 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 *. 814 814 ))) 815 815 |((( 640 +(% class="western" align="center" %) 641 +4 642 +)))|((( 816 816 (% class="western" %) 817 -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 818 818 )))|((( 819 819 (% class="western" %) 820 -/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 821 821 )))|((( 822 822 (% class="western" %) 823 - 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. 824 824 ))) 660 + 661 +(% class="wrapped" %) 825 825 |((( 826 826 (% class="western" %) 827 - GET664 +**Method** 828 828 )))|((( 829 829 (% class="western" %) 830 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2667 +**Url** 831 831 )))|((( 832 832 (% class="western" %) 833 -Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name. 834 - 835 -(% class="western" %) 836 -Return parameter defines a csv of question id that are requested back in response. 670 +**Action** 837 837 ))) 838 838 |((( 839 839 (% class="western" %) 840 - POST674 +GET 841 841 )))|((( 842 842 (% class="western" %) 843 -/u sers677 +/questions 844 844 )))|((( 845 845 (% class="western" %) 846 -Create a new users 847 - 848 -(% class="western" %) 849 -Parameters required to create the user needs to be sent as post data in JSON format. 680 +List all questions 850 850 ))) 851 851 |((( 852 852 (% class="western" %) 853 - PUT684 +GET 854 854 )))|((( 855 855 (% class="western" %) 856 -/u sers/1687 +/questions/1 857 857 )))|((( 858 858 (% class="western" %) 859 -Update user id 1. The user id can be a numeric value or a hash 860 - 861 -(% class="western" %) 862 -Parameters required to update the user needs to be sent as post data in JSON format. 690 +Returns question id 1 863 863 ))) 864 864 |((( 865 865 (% class="western" %) ... ... @@ -866,10 +866,10 @@ 866 866 GET 867 867 )))|((( 868 868 (% class="western" %) 869 -/u sers/1/partners/2697 +/questions/lookup?Text=Email 870 870 )))|((( 871 871 (% class="western" %) 872 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.700 +Returns all questions with “Email" in question text 873 873 ))) 874 874 |((( 875 875 (% class="western" %) ... ... @@ -876,41 +876,34 @@ 876 876 POST 877 877 )))|((( 878 878 (% class="western" %) 879 -/u sers/login707 +/questions 880 880 )))|((( 881 881 (% class="western" %) 882 -C heckto seeuserexistwithusername/email and password.710 +Create a new question 883 883 884 884 (% class="western" %) 885 -Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param. 886 - 713 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 714 +))) 715 +|((( 887 887 (% class="western" %) 888 - Example:889 - 717 +PUT 718 +)))|((( 890 890 (% class="western" %) 891 - {"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","e":"abc@[[one-count.com>>url:http://one-count.com||shape="rect"]]","p":"1234"}892 - 720 +/questions 721 +)))|((( 893 893 (% class="western" %) 894 - OR723 +Update a question 895 895 896 896 (% class="western" %) 897 -{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 898 - 899 -(% class="western" %) 900 -OR 901 - 902 -(% class="western" %) 903 -{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 904 - 905 -(% class="western" %) 906 -**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found. 726 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 907 907 ))) 908 908 909 909 910 910 911 911 (% class="western" %) 912 -**GET method shouldbe used to lookup users.**732 +**GET method can be used to lookup questions.** 913 913 734 +(% class="wrapped" %) 914 914 |((( 915 915 (% class="western" %) 916 916 **Request** ... ... @@ -929,19 +929,19 @@ 929 929 String 930 930 )))|((( 931 931 (% class="western" %) 932 -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. 933 933 934 934 (% class="western" %) 935 -Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]756 +Params: 936 936 937 937 (% class="western" %) 938 -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. 939 939 ))) 940 940 941 - 942 - 943 - 944 - 765 +(% class="wrapped" %) 945 945 |((( 946 946 (% class="western" %) 947 947 **Response** ... ... @@ -954,20 +954,21 @@ 954 954 ))) 955 955 |((( 956 956 (% class="western" %) 957 -Users 958 -)))|=((( 959 -(% class="western" align="left" %) 960 -Users 778 +Questions 961 961 )))|((( 962 962 (% class="western" %) 963 -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. 964 964 ))) 965 965 966 966 967 967 968 968 (% class="western" %) 969 -**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).** 970 970 792 +(% class="wrapped" %) 971 971 |((( 972 972 (% class="western" %) 973 973 **Request** ... ... @@ -980,48 +980,46 @@ 980 980 ))) 981 981 |((( 982 982 (% class="western" %) 983 - Users805 +Questions 984 984 )))|((( 985 985 (% class="western" %) 986 - Users808 +Questions 987 987 )))|((( 988 988 (% class="western" %) 989 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.811 +This defines the question contents and possible responses. 990 990 ))) 813 + 814 +(% class="wrapped" %) 991 991 |((( 992 992 (% class="western" %) 993 - Transactions817 +**Response** 994 994 )))|((( 995 995 (% class="western" %) 996 -T ransactions820 +**Type** 997 997 )))|((( 998 998 (% class="western" %) 999 - (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** 1000 1000 ))) 1001 1001 |((( 1002 1002 (% class="western" %) 1003 - DedupeColumns827 +QuestionId 1004 1004 )))|((( 1005 1005 (% class="western" %) 1006 - String830 +Int 1007 1007 )))|((( 1008 1008 (% class="western" %) 1009 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.833 +Returns ONEcount question id on successful creation of the question. 1010 1010 ))) 1011 -|((( 835 + 836 + 837 + 1012 1012 (% class="western" %) 1013 -Return 1014 -)))|((( 1015 -(% class="western" %) 1016 -String 1017 -)))|((( 1018 -(% class="western" %) 1019 -CSV of ONEcount QuestionId's requested back in Users object in response. 1020 -))) 839 +PUT method should be used to update question. 1021 1021 841 +(% class="wrapped" %) 1022 1022 |((( 1023 1023 (% class="western" %) 1024 -**Re sponse**844 +**Request** 1025 1025 )))|((( 1026 1026 (% class="western" %) 1027 1027 **Type** ... ... @@ -1031,23 +1031,19 @@ 1031 1031 ))) 1032 1032 |((( 1033 1033 (% class="western" %) 1034 -Users 1035 -)))|=((( 1036 -(% class="western" align="left" %) 1037 -Users 854 +Questions 1038 1038 )))|((( 1039 1039 (% class="western" %) 1040 -Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 857 +Questions 858 +)))|((( 859 +(% class="western" %) 860 +This defines the question contents and responses. 1041 1041 ))) 1042 1042 1043 - 1044 - 1045 -(% class="western" %) 1046 -**PUT method should be used to update users.** 1047 - 863 +(% class="wrapped" %) 1048 1048 |((( 1049 1049 (% class="western" %) 1050 -**Re quest**866 +**Response** 1051 1051 )))|((( 1052 1052 (% class="western" %) 1053 1053 **Type** ... ... @@ -1057,73 +1057,84 @@ 1057 1057 ))) 1058 1058 |((( 1059 1059 (% class="western" %) 1060 - Users876 +QuestionId 1061 1061 )))|((( 1062 1062 (% class="western" %) 1063 - Users879 +Int 1064 1064 )))|((( 1065 1065 (% class="western" %) 1066 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.882 +Returns ONEcount question id on successful update of the question. 1067 1067 ))) 1068 - |(((884 + 1069 1069 (% class="western" %) 1070 - Return1071 - )))|(((886 + 887 + 1072 1072 (% class="western" %) 1073 -String 1074 -)))|((( 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 + 1075 1075 (% class="western" %) 1076 -CSV of ONEcount QuestionId's requested back in Users object in response 1077 -))) 1078 -|((( 894 +{ 895 + 1079 1079 (% class="western" %) 1080 - RequestDate1081 - )))|(((897 +"result": { 898 + 1082 1082 (% class="western" %) 1083 - Date1084 - )))|(((900 +"success": "1", 901 + 1085 1085 (% class="western" %) 1086 -RequestDate to use for the demo update. If not provided current date will be used. 1087 -))) 903 +"error": { 1088 1088 1089 -|((( 1090 1090 (% class="western" %) 1091 - **Response**1092 - )))|(((906 +"code": "0", 907 + 1093 1093 (% class="western" %) 1094 - **Type**1095 - )))|(((909 +"message": "" 910 + 1096 1096 (% class="western" %) 1097 -**Description** 1098 -))) 1099 -|((( 912 +} 913 + 1100 1100 (% class="western" %) 1101 -Users 1102 -)))|=((( 1103 -(% class="western" align="left" %) 1104 -Users 1105 -)))|((( 915 +}, 916 + 1106 1106 (% class="western" %) 1107 -Updated user returned with the demo field requested in return parameter in json format. 1108 -))) 918 +"Questions": [ 1109 1109 1110 1110 (% class="western" %) 1111 - 921 +{ 1112 1112 1113 1113 (% class="western" %) 1114 - 924 +"Id": "6", 1115 1115 1116 1116 (% class="western" %) 1117 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.927 +"Text": "FirstName", 1118 1118 1119 -{{{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", 1120 1120 1121 1121 (% class="western" %) 1122 - **Products**933 +"Alias": "FName" 1123 1123 1124 1124 (% 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" %) 1125 1125 This resource is for manipulating products resource. A product can be created, updated or searched. 1126 1126 953 +(% class="wrapped" %) 1127 1127 |((( 1128 1128 (% class="western" %) 1129 1129 **Method** ... ... @@ -1209,6 +1209,7 @@ 1209 1209 (% class="western" %) 1210 1210 **GET method should be used to lookup products.** 1211 1211 1039 +(% class="wrapped" %) 1212 1212 |((( 1213 1213 (% class="western" %) 1214 1214 **Request** ... ... @@ -1236,6 +1236,7 @@ 1236 1236 Name: Name of the Product for lookup (String) 1237 1237 ))) 1238 1238 1067 +(% class="wrapped" %) 1239 1239 |((( 1240 1240 (% class="western" %) 1241 1241 **Response** ... ... @@ -1262,6 +1262,7 @@ 1262 1262 (% class="western" %) 1263 1263 **POST method should be used to create products.** 1264 1264 1094 +(% class="wrapped" %) 1265 1265 |((( 1266 1266 (% class="western" %) 1267 1267 **Request** ... ... @@ -1286,9 +1286,10 @@ 1286 1286 Example: 1287 1287 1288 1288 (% class="western" %) 1289 -{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1119 +{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1290 1290 ))) 1291 1291 1122 +(% class="wrapped" %) 1292 1292 |((( 1293 1293 (% class="western" %) 1294 1294 **Response** ... ... @@ -1315,6 +1315,7 @@ 1315 1315 (% class="western" %) 1316 1316 PUT method should be used to update an individual product given the product info. 1317 1317 1149 +(% class="wrapped" %) 1318 1318 |((( 1319 1319 (% class="western" %) 1320 1320 **Request** ... ... @@ -1342,9 +1342,10 @@ 1342 1342 **Example**: 1343 1343 1344 1344 (% class="western" %) 1345 -{"Title":"Test123","Description":Testss"," Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}1177 +{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17} 1346 1346 ))) 1347 1347 1180 +(% class="wrapped" %) 1348 1348 |((( 1349 1349 (% class="western" %) 1350 1350 **Response** ... ... @@ -1369,11 +1369,12 @@ 1369 1369 1370 1370 1371 1371 (% class="western" %) 1372 -**Terms** 1205 +**COMPONENT: Terms** 1373 1373 1374 1374 (% class="western" %) 1375 1375 This resource is for manipulating terms resource. A term can be created, updated or searched. 1376 1376 1210 +(% class="wrapped" %) 1377 1377 |((( 1378 1378 (% class="western" %) 1379 1379 **Method** ... ... @@ -1430,6 +1430,7 @@ 1430 1430 (% class="western" %) 1431 1431 **GET method should be used to lookup products.** 1432 1432 1267 +(% class="wrapped" %) 1433 1433 |((( 1434 1434 (% class="western" %) 1435 1435 **Request** ... ... @@ -1457,6 +1457,7 @@ 1457 1457 Name: Name of the term for lookup (String) 1458 1458 ))) 1459 1459 1295 +(% class="wrapped" %) 1460 1460 |((( 1461 1461 (% class="western" %) 1462 1462 **Response** ... ... @@ -1483,6 +1483,7 @@ 1483 1483 (% class="western" %) 1484 1484 **POST method should be used to create products.** 1485 1485 1322 +(% class="wrapped" %) 1486 1486 |((( 1487 1487 (% class="western" %) 1488 1488 **Request** ... ... @@ -1513,6 +1513,7 @@ 1513 1513 {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17} 1514 1514 ))) 1515 1515 1353 +(% class="wrapped" %) 1516 1516 |((( 1517 1517 (% class="western" %) 1518 1518 **Response** ... ... @@ -1539,6 +1539,7 @@ 1539 1539 (% class="western" %) 1540 1540 PUT method should be used to update an individual term given the term info. 1541 1541 1380 +(% class="wrapped" %) 1542 1542 |((( 1543 1543 (% class="western" %) 1544 1544 **Request** ... ... @@ -1569,6 +1569,7 @@ 1569 1569 {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17} 1570 1570 ))) 1571 1571 1411 +(% class="wrapped" %) 1572 1572 |((( 1573 1573 (% class="western" %) 1574 1574 **Response** ... ... @@ -1593,11 +1593,48 @@ 1593 1593 1594 1594 1595 1595 (% class="western" %) 1596 -**Resources** 1436 +**COMPONENT: Resources** 1597 1597 1598 1598 (% 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" %) 1599 1599 This resource is for manipulating resources resource. A resource can be created, updated or searched. 1600 1600 1477 +(% class="wrapped" %) 1601 1601 |((( 1602 1602 (% class="western" %) 1603 1603 **Method** ... ... @@ -1652,8 +1652,9 @@ 1652 1652 1653 1653 1654 1654 (% class="western" %) 1655 -**GET method should be used to lookup products.**1532 +**GET method should be used to lookup resources.** 1656 1656 1534 +(% class="wrapped" %) 1657 1657 |((( 1658 1658 (% class="western" %) 1659 1659 **Request** ... ... @@ -1681,6 +1681,7 @@ 1681 1681 Name: Name of the resource for lookup (String) 1682 1682 ))) 1683 1683 1562 +(% class="wrapped" %) 1684 1684 |((( 1685 1685 (% class="western" %) 1686 1686 **Response** ... ... @@ -1705,8 +1705,9 @@ 1705 1705 1706 1706 1707 1707 (% class="western" %) 1708 -**POST method should be used to create products.**1587 +**POST method should be used to create resources.** 1709 1709 1589 +(% class="wrapped" %) 1710 1710 |((( 1711 1711 (% class="western" %) 1712 1712 **Request** ... ... @@ -1728,7 +1728,7 @@ 1728 1728 resource details in json to be sent as post data. Id should not be set. 1729 1729 1730 1730 (% class="western" %) 1731 -**Possible Request Params**: Name, Description, Type, Value 1611 +**Possible Request Params**: Name, Description, Type, Value, FreePass 1732 1732 1733 1733 (% class="western" %) 1734 1734 **Example**: ... ... @@ -1735,8 +1735,18 @@ 1735 1735 1736 1736 (% class="western" %) 1737 1737 {"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} 1738 1738 ))) 1739 1739 1629 +(% class="wrapped" %) 1740 1740 |((( 1741 1741 (% class="western" %) 1742 1742 **Response** ... ... @@ -1763,6 +1763,7 @@ 1763 1763 (% class="western" %) 1764 1764 PUT method should be used to update an individual resource given the resource info. 1765 1765 1656 +(% class="wrapped" %) 1766 1766 |((( 1767 1767 (% class="western" %) 1768 1768 **Request** ... ... @@ -1781,18 +1781,28 @@ 1781 1781 Resource 1782 1782 )))|((( 1783 1783 (% class="western" %) 1784 -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. 1785 1785 1786 1786 (% class="western" %) 1787 1787 1788 1788 1789 1789 (% class="western" %) 1790 -Example: 1681 +Examples: 1791 1791 1792 1792 (% class="western" %) 1793 1793 {"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} 1794 1794 ))) 1795 1795 1696 +(% class="wrapped" %) 1796 1796 |((( 1797 1797 (% class="western" %) 1798 1798 **Response** ... ... @@ -1816,7 +1816,6 @@ 1816 1816 1817 1817 1818 1818 1819 -(% class="western" %) 1820 1820 1821 1821 1822 1822 (% class="western" %) ... ... @@ -1823,11 +1823,13 @@ 1823 1823 1824 1824 1825 1825 (% class="western" %) 1826 -**Sources** 1726 +**COMPONENT: Source Codes 1727 +** 1827 1827 1828 1828 (% class="western" %) 1829 -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. 1830 1830 1732 +(% class="wrapped" %) 1831 1831 |((( 1832 1832 (% class="western" %) 1833 1833 **Method** ... ... @@ -1884,6 +1884,7 @@ 1884 1884 (% class="western" %) 1885 1885 **Sources can be looked up given the code or Id. GET method should be used for lookup.** 1886 1886 1789 +(% class="wrapped" %) 1887 1887 |((( 1888 1888 (% class="western" %) 1889 1889 **Request** ... ... @@ -1911,6 +1911,7 @@ 1911 1911 Source: Source value (String) 1912 1912 ))) 1913 1913 1817 +(% class="wrapped" %) 1914 1914 |((( 1915 1915 (% class="western" %) 1916 1916 **Response** ... ... @@ -1940,6 +1940,7 @@ 1940 1940 (% class="western" %) 1941 1941 POST method should be used to create an individual source given the source parameters. 1942 1942 1847 +(% class="wrapped" %) 1943 1943 |((( 1944 1944 (% class="western" %) 1945 1945 **Request** ... ... @@ -1961,6 +1961,7 @@ 1961 1961 Defines the contents that makes up the source. Id parameters should not be set. 1962 1962 ))) 1963 1963 1869 +(% class="wrapped" %) 1964 1964 |((( 1965 1965 (% class="western" %) 1966 1966 **Response** ... ... @@ -1987,6 +1987,7 @@ 1987 1987 (% class="western" %) 1988 1988 **PUT method can be used to update an individual source given the id.** 1989 1989 1896 +(% class="wrapped" %) 1990 1990 |((( 1991 1991 (% class="western" %) 1992 1992 **Request** ... ... @@ -2008,6 +2008,7 @@ 2008 2008 Defines the contents that makes up the source. The id parameter needs to be set which will identify the id of the source to be updated. 2009 2009 ))) 2010 2010 1918 +(% class="wrapped" %) 2011 2011 |((( 2012 2012 (% class="western" %) 2013 2013 **Response** ... ... @@ -2035,11 +2035,12 @@ 2035 2035 2036 2036 2037 2037 (% class="western" %) 2038 -**Transactions** 1946 +**COMPONENT: Transactions** 2039 2039 2040 2040 (% class="western" %) 2041 2041 This resource is for manipulating transactions resource. A transaction can be created or searched. 2042 2042 1951 +(% class="wrapped" %) 2043 2043 |((( 2044 2044 (% class="western" %) 2045 2045 **Method** ... ... @@ -2089,6 +2089,7 @@ 2089 2089 (% class="western" %) 2090 2090 Transactions can be looked up using transactionId, date range, userid. Use GET method to do lookup. 2091 2091 2001 +(% class="wrapped" %) 2092 2092 |((( 2093 2093 (% class="western" %) 2094 2094 **Request** ... ... @@ -2126,6 +2126,7 @@ 2126 2126 2127 2127 2128 2128 2039 +(% class="wrapped" %) 2129 2129 |((( 2130 2130 (% class="western" %) 2131 2131 **Response** ... ... @@ -2152,6 +2152,7 @@ 2152 2152 (% class="western" %) 2153 2153 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. 2154 2154 2066 +(% class="wrapped" %) 2155 2155 |((( 2156 2156 (% class="western" %) 2157 2157 **Request** ... ... @@ -2173,6 +2173,7 @@ 2173 2173 Contains fields that define a transaction. Id field should not be set. 2174 2174 ))) 2175 2175 2088 +(% class="wrapped" %) 2176 2176 |((( 2177 2177 (% class="western" %) 2178 2178 **Response** ... ... @@ -2196,8 +2196,11 @@ 2196 2196 2197 2197 2198 2198 2112 + 2113 + 2199 2199 (% class="western" %) 2200 -**Stats** 2115 +**COMPONENT: Leads 2116 +** 2201 2201 2202 2202 (% class="western" %) 2203 2203 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. ... ... @@ -2218,12 +2218,14 @@ 2218 2218 2219 2219 2220 2220 (% class="western" %) 2221 -**Telemarketing** 2137 +**Telemarketing Leads 2138 +** 2222 2222 2223 2223 (% class="western" %) 2224 2224 2225 2225 This resource is for manipulating telemarketing stat resource. A telemarketing stat can be created or listed. 2226 2226 2144 +(% class="wrapped" %) 2227 2227 |((( 2228 2228 (% class="western" %) 2229 2229 **Method** ... ... @@ -2270,6 +2270,7 @@ 2270 2270 (% class="western" %) 2271 2271 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. 2272 2272 2191 +(% class="wrapped" %) 2273 2273 |((( 2274 2274 (% class="western" %) 2275 2275 **Request** ... ... @@ -2343,6 +2343,7 @@ 2343 2343 2344 2344 ))) 2345 2345 2265 +(% class="wrapped" %) 2346 2346 |((( 2347 2347 (% class="western" %) 2348 2348 **Response** ... ... @@ -2366,12 +2366,21 @@ 2366 2366 2367 2367 2368 2368 2289 + 2290 + 2291 + 2292 + 2293 + 2294 + 2295 + 2296 + 2369 2369 (% class="western" %) 2370 -**R eference**2298 +**API REFERENCE** 2371 2371 2372 2372 (% class="western" %) 2373 2373 **Type: Questions** 2374 2374 2303 +(% class="wrapped" %) 2375 2375 |((( 2376 2376 (% class="western" %) 2377 2377 **Property Name** ... ... @@ -2451,6 +2451,7 @@ 2451 2451 (% class="western" %) 2452 2452 **Type: Choices** 2453 2453 2383 +(% class="wrapped" %) 2454 2454 |((( 2455 2455 (% class="western" %) 2456 2456 **Property Name** ... ... @@ -2517,6 +2517,7 @@ 2517 2517 (% class="western" %) 2518 2518 **Type: Users** 2519 2519 2450 +(% class="wrapped" %) 2520 2520 |((( 2521 2521 (% class="western" %) 2522 2522 **Property Name** ... ... @@ -2573,6 +2573,7 @@ 2573 2573 (% class="western" %) 2574 2574 **Type: Demo** 2575 2575 2507 +(% class="wrapped" %) 2576 2576 |((( 2577 2577 (% class="western" %) 2578 2578 **Property Name** ... ... @@ -2619,6 +2619,7 @@ 2619 2619 (% class="western" %) 2620 2620 **Type: Transactions** 2621 2621 2554 +(% class="wrapped" %) 2622 2622 |((( 2623 2623 (% class="western" %) 2624 2624 **Property Name** ... ... @@ -2765,6 +2765,7 @@ 2765 2765 (% class="western" %) 2766 2766 **Type: Sources** 2767 2767 2701 +(% class="wrapped" %) 2768 2768 |((( 2769 2769 (% class="western" %) 2770 2770 **Property Name** ... ... @@ -2824,6 +2824,7 @@ 2824 2824 (% class="western" %) 2825 2825 **Type: Products** 2826 2826 2761 +(% class="wrapped" %) 2827 2827 |((( 2828 2828 (% class="western" %) 2829 2829 **Property Name** ... ... @@ -2880,6 +2880,7 @@ 2880 2880 (% class="western" %) 2881 2881 **Type: Terms** 2882 2882 2818 +(% class="wrapped" %) 2883 2883 |((( 2884 2884 (% class="western" %) 2885 2885 **Property Name** ... ... @@ -2966,6 +2966,7 @@ 2966 2966 (% class="western" %) 2967 2967 **Type: Resources** 2968 2968 2905 +(% class="wrapped" %) 2969 2969 |((( 2970 2970 (% class="western" %) 2971 2971 **Property Name** ... ... @@ -3037,14 +3037,30 @@ 3037 3037 )))|((( 3038 3038 (% class="western" %) 3039 3039 String 2977 + 2978 +(% class="western" %) 2979 +or 2980 + 2981 +(% class="western" %) 2982 +Array 3040 3040 )))|((( 3041 3041 (% class="western" %) 3042 -Value of Resource Type .2985 +Value of Resource Type: 3043 3043 3044 3044 (% class="western" %) 3045 - 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. 3046 3046 3047 3047 (% 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" %) 3048 3048 For Function type resource leave it blank. 3049 3049 ))) 3050 3050 |((( ... ... @@ -3055,8 +3055,18 @@ 3055 3055 Int 3056 3056 )))|((( 3057 3057 (% class="western" %) 3058 -Default limit is 25 but all the data needs to be pulled then pass limit=0. 3011 +Default limit is 25 but if all the data needs to be pulled then pass limit=0. 3059 3059 ))) 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 +))) 3060 3060 3061 3061 3062 3062 ... ... @@ -3063,6 +3063,7 @@ 3063 3063 (% class="western" %) 3064 3064 **Type: Telemarketing** 3065 3065 3029 +(% class="wrapped" %) 3066 3066 |((( 3067 3067 (% class="western" %) 3068 3068 **Property Name**
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -3 5389981 +23331811 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/3 538998/sonish-APIDocument-230317-1008-181 +https://info.onecount.net//wiki/spaces/OD/pages/23331811/ONEcount API Documentation