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.son ish1 +XWiki.shravya@one-count_com - 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" %) ... ... @@ -273,7 +273,7 @@ 273 273 For lookup, the parameter list will be part of the request url. 274 274 275 275 (% class="western" %) 276 - 105 +\\ 277 277 278 278 (% class="western" %) 279 279 **Response** ... ... @@ -336,7 +336,7 @@ 336 336 The result of the api request will be determined by the value of the success property of result object. Here the value of success will either be 1 (true) or 0 (false) depending on whether the requested action succeed. 337 337 338 338 (% class="western" %) 339 - 168 +\\ 340 340 341 341 (% class="western" %) 342 342 If value of success is 0 then an error will be generated inside the result object. Code property will have an error code. message property will have the details about the error. This value might be used to display the error in the client application. The response will always have a result object in it plus the individual response listed for each method. ... ... @@ -392,134 +392,103 @@ 392 392 ]}]}}}} 393 393 394 394 (% class="western" %) 395 - 224 +\\ 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 - 367 +\\ 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,23 @@ 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:Wordorphrase that should bepresent inthequestiontext(String)397 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 591 591 592 592 (% class="western" %) 593 - Type:Lookup thequestiontype.400 +If return is not provided, all the demographics will be returned. 594 594 ))) 595 595 403 +\\ 404 + 405 +\\ 406 + 407 +(% class="wrapped" %) 596 596 |((( 597 597 (% class="western" %) 598 598 **Response** ... ... @@ -605,20 +605,44 @@ 605 605 ))) 606 606 |((( 607 607 (% class="western" %) 608 -Questions 420 +Users 421 +)))|=((( 422 +(% class="western" align="left" %) 423 +Users 609 609 )))|((( 610 610 (% class="western" %) 611 -Questions 612 -)))|((( 613 -(% class="western" %) 614 -Returns found question details. 426 +Found users returned with the demo field requested in return parameter in json format. 615 615 ))) 616 616 617 - 429 +\\ 618 618 431 +**Sample response for /users/(% style="color: rgb(80,80,80);" %)25255449(%%)** 432 + 433 +(% class="relative-table" style="width: 100.0%;" %) 434 +|=((( 435 +(% class="content-wrapper" %) 436 +((( 437 +[[image:attach:Screen Shot 2020-02-26 at 11.15.52 AM.png||width="1407"]] 438 +))) 439 +))) 440 + 441 +\\ 442 + 443 +**Sample response for /users/lookup?(% style="color: rgb(80,80,80);" %)11=santosh@[[one-count.com>>url:http://one-count.com||shape="rect"]]&return=2,3(%%)** 444 + 445 +|=((( 446 +(% class="content-wrapper" %) 447 +((( 448 +[[image:attach:Screen Shot 2020-02-26 at 11.22.13 AM.png||height="250"]] 449 +))) 450 +))) 451 + 452 +\\ 453 + 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).**455 +**POST method should be used to create users.** 621 621 457 +(% class="wrapped" %) 622 622 |((( 623 623 (% class="western" %) 624 624 **Request** ... ... @@ -631,44 +631,49 @@ 631 631 ))) 632 632 |((( 633 633 (% class="western" %) 634 - Questions470 +Users 635 635 )))|((( 636 636 (% class="western" %) 637 - Questions473 +Users 638 638 )))|((( 639 639 (% class="western" %) 640 - Thisdefinesthequestioncontentsandpossibleresponses.476 +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**480 +Transactions 646 646 )))|((( 647 647 (% class="western" %) 648 - **Type**483 +Transactions 649 649 )))|((( 650 650 (% class="western" %) 651 - **Description**486 +(Array of) transaction object specifying parts of the transaction to be added to the new user. UserId and TransactionId, SubscriptionType will be ignored if specified. As this is new user and new transaction is being added. 652 652 ))) 653 653 |((( 654 654 (% class="western" %) 655 - QuestionId490 +DedupeColumns 656 656 )))|((( 657 657 (% class="western" %) 658 - Int493 +String 659 659 )))|((( 660 660 (% class="western" %) 661 - ReturnsONEcountquestion idonsuccessful creationofthe question.496 +CSV of question id's that should be considered to find duplicate. 662 662 ))) 663 - 664 - 665 - 498 +|((( 666 666 (% class="western" %) 667 -PUT method should be used to update question. 500 +Return 501 +)))|((( 502 +(% class="western" %) 503 +String 504 +)))|((( 505 +(% class="western" %) 506 +CSV of ONEcount QuestionId's requested back in Users object in response. 507 +))) 668 668 509 +(% class="wrapped" %) 669 669 |((( 670 670 (% class="western" %) 671 -**Re quest**512 +**Response** 672 672 )))|((( 673 673 (% class="western" %) 674 674 **Type** ... ... @@ -678,18 +678,24 @@ 678 678 ))) 679 679 |((( 680 680 (% class="western" %) 681 -Questions 522 +Users 523 +)))|=((( 524 +(% class="western" align="left" %) 525 +Users 682 682 )))|((( 683 683 (% class="western" %) 684 -Questions 685 -)))|((( 686 -(% class="western" %) 687 -This defines the question contents and responses. 528 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 688 688 ))) 689 689 531 +\\ 532 + 533 +(% class="western" %) 534 +**PUT method should be used to update users.** 535 + 536 +(% class="wrapped" %) 690 690 |((( 691 691 (% class="western" %) 692 -**Re sponse**539 +**Request** 693 693 )))|((( 694 694 (% class="western" %) 695 695 **Type** ... ... @@ -699,167 +699,174 @@ 699 699 ))) 700 700 |((( 701 701 (% class="western" %) 702 - QuestionId549 +Users 703 703 )))|((( 704 704 (% class="western" %) 705 - Int552 +Users 706 706 )))|((( 707 707 (% class="western" %) 708 -Returns ONEcountquestion idon successful updateofthequestion.555 +Users object with update fields. Return property has csv of questions id requested back in Users object. 709 709 ))) 710 - 557 +|((( 711 711 (% class="western" %) 712 - 713 - 559 +Return 560 +)))|((( 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 - 562 +String 563 +)))|((( 719 719 (% class="western" %) 720 -{ 721 - 565 +CSV of ONEcount QuestionId's requested back in Users object in response 566 +))) 567 +|((( 722 722 (% class="western" %) 723 - "result": {724 - 569 +RequestDate 570 +)))|((( 725 725 (% class="western" %) 726 - "success": "1",727 - 572 +Date 573 +)))|((( 728 728 (% class="western" %) 729 -"error": { 575 +RequestDate to use for the demo update. If not provided current date will be used. 576 +))) 730 730 578 +(% class="wrapped" %) 579 +|((( 731 731 (% class="western" %) 732 - "code": "0",733 - 581 +**Response** 582 +)))|((( 734 734 (% class="western" %) 735 - "message": ""736 - 584 +**Type** 585 +)))|((( 737 737 (% class="western" %) 738 -} 739 - 587 +**Description** 588 +))) 589 +|((( 740 740 (% class="western" %) 741 -}, 742 - 591 +Users 592 +)))|=((( 593 +(% class="western" align="left" %) 594 +Users 595 +)))|((( 743 743 (% class="western" %) 744 -"Questions": [ 597 +Updated user returned with the demo field requested in return parameter in json format. 598 +))) 745 745 746 746 (% class="western" %) 747 - {601 +\\ 748 748 749 749 (% class="western" %) 750 - "Id": "6",604 +\\ 751 751 752 752 (% class="western" %) 753 - "Text":"FirstName",607 +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", 609 +{{{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" 612 +** 613 +** 760 760 761 761 (% class="western" %) 762 -} 616 +** 617 +** 763 763 764 -(% class="western" %) 765 -] 619 +\\ 766 766 767 767 (% class="western" %) 768 - }622 +**COMPONENT: Questions** 769 769 770 770 (% class="western" %) 625 +All data fields in ONEcount are made up of questions. Questions are configurable on a per-client basis, and no two customer installations will have the same question (ie., field) layout. Therefore, before querying or updating any ONEcount installation, you'll need to get an understanding of the question layout of the installation. This API segment will allow you to query ONEcount to determine the question layout for the installation. It will also allow you to create new questions within the system. This resource does not allow you to update the data for a specific user (see User section). 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.628 +This resource is for manipulating questions resource. Questions in ONEcount means any question that is asked to the subscriber. It could be any questions that appears on customer forms or print forms that gets answered by a subscriber. Questions api call will allow creation, update and search of question in ONEcount. To add a new questions to the system you'll make a POST api call to the questions resource. 776 776 777 777 (% class="western" %) 778 - Additionally(Array of)transactionobject specifyingpartsof thetransactiontobeaddedtothenewusercan be specified.UserId,TransactionIdand SubscriptionTypewillbeignoredifspecifiedforthiscase.Ashisisnewuserand newtransactionisbeingadded.631 +The data that is sent should be in JSON format and of type questions as described in References section. The type property of questions object is described below. Questions object will only need a choices block if the question is a multiple choice question(type=4 or 5 or 6) 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.634 +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 - 636 +(% class="wrapped" %) 795 795 |((( 796 -(% class="western" %) 797 -** Method**638 +(% class="western" align="center" %) 639 +**Type** 798 798 )))|((( 799 799 (% class="western" %) 800 -**Url** 642 +**Description** 643 +))) 644 +|((( 645 +(% class="western" align="center" %) 646 +1 801 801 )))|((( 802 802 (% class="western" %) 803 - **Action**649 +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 - GET652 +(% class="western" align="center" %) 653 +2 808 808 )))|((( 809 809 (% class="western" %) 810 -/users 656 +Textarea type question or long response type question. 657 +))) 658 +|((( 659 +(% class="western" align="center" %) 660 +3 811 811 )))|((( 812 812 (% class="western" %) 813 - Get users datalimiting25.663 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 814 814 ))) 815 815 |((( 666 +(% class="western" align="center" %) 667 +4 668 +)))|((( 816 816 (% class="western" %) 817 -GET 670 +Select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question. 671 +))) 672 +|((( 673 +(% class="western" align="center" %) 674 +5 818 818 )))|((( 819 819 (% class="western" %) 820 -/users/1 677 +Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question. 678 +))) 679 +|((( 680 +(% class="western" align="center" %) 681 +6 821 821 )))|((( 822 822 (% class="western" %) 823 - Getdataforuserid1.The useridcan be anumericvalueorahash684 +Checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question. 824 824 ))) 686 + 687 +(% class="wrapped" %) 825 825 |((( 826 826 (% class="western" %) 827 - GET690 +**Method** 828 828 )))|((( 829 829 (% class="western" %) 830 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2693 +**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. 696 +**Action** 837 837 ))) 838 838 |((( 839 839 (% class="western" %) 840 - POST700 +GET 841 841 )))|((( 842 842 (% class="western" %) 843 -/u sers703 +/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. 706 +List all questions 850 850 ))) 851 851 |((( 852 852 (% class="western" %) 853 - PUT710 +GET 854 854 )))|((( 855 855 (% class="western" %) 856 -/u sers/1713 +/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. 716 +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/2723 +/questions/lookup?Text=Email 870 870 )))|((( 871 871 (% class="western" %) 872 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.726 +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/login733 +/questions 880 880 )))|((( 881 881 (% class="western" %) 882 -C heckto seeuserexistwithusername/email and password.736 +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 - 739 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 740 +))) 741 +|((( 887 887 (% class="western" %) 888 - Example:889 - 743 +PUT 744 +)))|((( 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 - 746 +/questions 747 +)))|((( 893 893 (% class="western" %) 894 - OR749 +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. 752 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 907 907 ))) 908 908 909 - 755 +\\ 910 910 911 911 (% class="western" %) 912 -**GET method shouldbe used to lookup users.**758 +**GET method can be used to lookup questions.** 913 913 760 +(% 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.779 +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"]]782 +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) 785 +Text: Word or phrase that should be present in the question text (String) 786 + 787 +(% class="western" %) 788 +Type: Look up the question type. 939 939 ))) 940 940 941 - 942 - 943 - 944 - 791 +(% 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 804 +Questions 961 961 )))|((( 962 962 (% class="western" %) 963 -Found users returned with the demo field requested in return parameter in json format. 807 +Questions 808 +)))|((( 809 +(% class="western" %) 810 +Returns found question details. 964 964 ))) 965 965 966 - 813 +\\ 967 967 968 968 (% class="western" %) 969 -**POST method should be used to create users.** 816 +**POST method should be used to create questions. The data that is sent should be in JSON format and of type questions as described in references section. Questions object will only need a choices block if the question is a multiple choice question (type=4 or 5 or 6).** 970 970 818 +(% class="wrapped" %) 971 971 |((( 972 972 (% class="western" %) 973 973 **Request** ... ... @@ -980,48 +980,46 @@ 980 980 ))) 981 981 |((( 982 982 (% class="western" %) 983 - Users831 +Questions 984 984 )))|((( 985 985 (% class="western" %) 986 - Users834 +Questions 987 987 )))|((( 988 988 (% class="western" %) 989 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.837 +This defines the question contents and possible responses. 990 990 ))) 839 + 840 +(% class="wrapped" %) 991 991 |((( 992 992 (% class="western" %) 993 - Transactions843 +**Response** 994 994 )))|((( 995 995 (% class="western" %) 996 -T ransactions846 +**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.849 +**Description** 1000 1000 ))) 1001 1001 |((( 1002 1002 (% class="western" %) 1003 - DedupeColumns853 +QuestionId 1004 1004 )))|((( 1005 1005 (% class="western" %) 1006 - String856 +Int 1007 1007 )))|((( 1008 1008 (% class="western" %) 1009 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.859 +Returns ONEcount question id on successful creation of the question. 1010 1010 ))) 1011 -|((( 861 + 862 +\\ 863 + 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 -))) 865 +PUT method should be used to update question. 1021 1021 867 +(% class="wrapped" %) 1022 1022 |((( 1023 1023 (% class="western" %) 1024 -**Re sponse**870 +**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 880 +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. 883 +Questions 884 +)))|((( 885 +(% class="western" %) 886 +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 - 889 +(% class="wrapped" %) 1048 1048 |((( 1049 1049 (% class="western" %) 1050 -**Re quest**892 +**Response** 1051 1051 )))|((( 1052 1052 (% class="western" %) 1053 1053 **Type** ... ... @@ -1057,73 +1057,84 @@ 1057 1057 ))) 1058 1058 |((( 1059 1059 (% class="western" %) 1060 - Users902 +QuestionId 1061 1061 )))|((( 1062 1062 (% class="western" %) 1063 - Users905 +Int 1064 1064 )))|((( 1065 1065 (% class="western" %) 1066 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.908 +Returns ONEcount question id on successful update of the question. 1067 1067 ))) 1068 - |(((910 + 1069 1069 (% class="western" %) 1070 - Return1071 - )))|(((912 +\\ 913 + 1072 1072 (% class="western" %) 1073 -String 1074 -)))|((( 915 +Example: Get list of questions from api which has FirstName in text 916 + 917 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 918 + 1075 1075 (% class="western" %) 1076 -CSV of ONEcount QuestionId's requested back in Users object in response 1077 -))) 1078 -|((( 920 +{ 921 + 1079 1079 (% class="western" %) 1080 - RequestDate1081 - )))|(((923 +"result": { 924 + 1082 1082 (% class="western" %) 1083 - Date1084 - )))|(((926 +"success": "1", 927 + 1085 1085 (% class="western" %) 1086 -RequestDate to use for the demo update. If not provided current date will be used. 1087 -))) 929 +"error": { 1088 1088 1089 -|((( 1090 1090 (% class="western" %) 1091 - **Response**1092 - )))|(((932 +"code": "0", 933 + 1093 1093 (% class="western" %) 1094 - **Type**1095 - )))|(((935 +"message": "" 936 + 1096 1096 (% class="western" %) 1097 -**Description** 1098 -))) 1099 -|((( 938 +} 939 + 1100 1100 (% class="western" %) 1101 -Users 1102 -)))|=((( 1103 -(% class="western" align="left" %) 1104 -Users 1105 -)))|((( 941 +}, 942 + 1106 1106 (% class="western" %) 1107 -Updated user returned with the demo field requested in return parameter in json format. 1108 -))) 944 +"Questions": [ 1109 1109 1110 1110 (% class="western" %) 1111 - 947 +{ 1112 1112 1113 1113 (% class="western" %) 1114 - 950 +"Id": "6", 1115 1115 1116 1116 (% class="western" %) 1117 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.953 +"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}}} 955 +(% class="western" %) 956 +"Type": "1", 1120 1120 1121 1121 (% class="western" %) 1122 - **Products**959 +"Alias": "FName" 1123 1123 1124 1124 (% class="western" %) 962 +} 963 + 964 +(% class="western" %) 965 +] 966 + 967 +(% class="western" %) 968 +} 969 + 970 +(% class="western" %) 971 +\\ 972 + 973 +(% class="western" %) 974 +**COMPONENT: Products** 975 + 976 +(% class="western" %) 1125 1125 This resource is for manipulating products resource. A product can be created, updated or searched. 1126 1126 979 +(% class="wrapped" %) 1127 1127 |((( 1128 1128 (% class="western" %) 1129 1129 **Method** ... ... @@ -1204,11 +1204,12 @@ 1204 1204 {"ProductID":"65","ResourceID":”121"} 1205 1205 ))) 1206 1206 1207 - 1060 +\\ 1208 1208 1209 1209 (% class="western" %) 1210 1210 **GET method should be used to lookup products.** 1211 1211 1065 +(% 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 1093 +(% class="wrapped" %) 1239 1239 |((( 1240 1240 (% class="western" %) 1241 1241 **Response** ... ... @@ -1257,11 +1257,12 @@ 1257 1257 Returns found product details. 1258 1258 ))) 1259 1259 1260 - 1115 +\\ 1261 1261 1262 1262 (% class="western" %) 1263 1263 **POST method should be used to create products.** 1264 1264 1120 +(% 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} 1145 +{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1290 1290 ))) 1291 1291 1148 +(% class="wrapped" %) 1292 1292 |((( 1293 1293 (% class="western" %) 1294 1294 **Response** ... ... @@ -1310,11 +1310,12 @@ 1310 1310 Product Id of the newly created product. 1311 1311 ))) 1312 1312 1313 - 1170 +\\ 1314 1314 1315 1315 (% class="western" %) 1316 1316 PUT method should be used to update an individual product given the product info. 1317 1317 1175 +(% 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}1203 +{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17} 1346 1346 ))) 1347 1347 1206 +(% class="wrapped" %) 1348 1348 |((( 1349 1349 (% class="western" %) 1350 1350 **Response** ... ... @@ -1366,14 +1366,15 @@ 1366 1366 Product id of the updated product. 1367 1367 ))) 1368 1368 1369 - 1228 +\\ 1370 1370 1371 1371 (% class="western" %) 1372 -**Terms** 1231 +**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 1236 +(% class="wrapped" %) 1377 1377 |((( 1378 1378 (% class="western" %) 1379 1379 **Method** ... ... @@ -1425,11 +1425,12 @@ 1425 1425 JSON of the terms type object needs to be sent as post data. Id field is mandatory for update. 1426 1426 ))) 1427 1427 1428 - 1288 +\\ 1429 1429 1430 1430 (% class="western" %) 1431 1431 **GET method should be used to lookup products.** 1432 1432 1293 +(% 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 1321 +(% class="wrapped" %) 1460 1460 |((( 1461 1461 (% class="western" %) 1462 1462 **Response** ... ... @@ -1478,11 +1478,12 @@ 1478 1478 Returns found term details. 1479 1479 ))) 1480 1480 1481 - 1343 +\\ 1482 1482 1483 1483 (% class="western" %) 1484 1484 **POST method should be used to create products.** 1485 1485 1348 +(% 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 1379 +(% class="wrapped" %) 1516 1516 |((( 1517 1517 (% class="western" %) 1518 1518 **Response** ... ... @@ -1534,11 +1534,12 @@ 1534 1534 Term Id of the newly created term. 1535 1535 ))) 1536 1536 1537 - 1401 +\\ 1538 1538 1539 1539 (% class="western" %) 1540 1540 PUT method should be used to update an individual term given the term info. 1541 1541 1406 +(% class="wrapped" %) 1542 1542 |((( 1543 1543 (% class="western" %) 1544 1544 **Request** ... ... @@ -1560,7 +1560,7 @@ 1560 1560 Term details to be updated in json format to be sent with request. Id property needs to be set to identify the term to be updated. 1561 1561 1562 1562 (% class="western" %) 1563 - 1428 +\\ 1564 1564 1565 1565 (% class="western" %) 1566 1566 **Example**: ... ... @@ -1569,6 +1569,7 @@ 1569 1569 {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17} 1570 1570 ))) 1571 1571 1437 +(% class="wrapped" %) 1572 1572 |((( 1573 1573 (% class="western" %) 1574 1574 **Response** ... ... @@ -1590,14 +1590,51 @@ 1590 1590 term id of the updated term. 1591 1591 ))) 1592 1592 1593 - 1459 +\\ 1594 1594 1595 1595 (% class="western" %) 1596 -**Resources** 1462 +**COMPONENT: Resources** 1597 1597 1598 1598 (% class="western" %) 1465 +Resources are the available entities that can be accessed/modified via API. Each resource can be created, updated or requested by using the corresponding http method described above. 1466 + 1467 +* ((( 1468 +(% class="western" %) 1469 +questions 1470 +))) 1471 +* ((( 1472 +(% class="western" %) 1473 +users 1474 +))) 1475 +* ((( 1476 +(% class="western" %) 1477 +products 1478 +))) 1479 +* ((( 1480 +(% class="western" %) 1481 +terms 1482 +))) 1483 +* ((( 1484 +(% class="western" %) 1485 +resources 1486 +))) 1487 +* ((( 1488 +(% class="western" %) 1489 +sources 1490 +))) 1491 +* ((( 1492 +(% class="western" %) 1493 +transactions 1494 +))) 1495 + 1496 +(% class="western" %) 1497 +** 1498 +** 1499 + 1500 +(% class="western" %) 1599 1599 This resource is for manipulating resources resource. A resource can be created, updated or searched. 1600 1600 1503 +(% class="wrapped" %) 1601 1601 |((( 1602 1602 (% class="western" %) 1603 1603 **Method** ... ... @@ -1649,11 +1649,12 @@ 1649 1649 JSON of the resources type object needs to be sent as post data. Id field is mandatory for update. 1650 1650 ))) 1651 1651 1652 - 1555 +\\ 1653 1653 1654 1654 (% class="western" %) 1655 -**GET method should be used to lookup products.**1558 +**GET method should be used to lookup resources.** 1656 1656 1560 +(% 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 1588 +(% class="wrapped" %) 1684 1684 |((( 1685 1685 (% class="western" %) 1686 1686 **Response** ... ... @@ -1702,11 +1702,12 @@ 1702 1702 Returns found resource details. 1703 1703 ))) 1704 1704 1705 - 1610 +\\ 1706 1706 1707 1707 (% class="western" %) 1708 -**POST method should be used to create products.**1613 +**POST method should be used to create resources.** 1709 1709 1615 +(% 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 1637 +**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/”} 1644 + 1645 +(% class="western" %) 1646 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1647 + 1648 +(% class="western" %) 1649 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1} 1650 + 1651 +(% class="western" %) 1652 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1738 1738 ))) 1739 1739 1655 +(% class="wrapped" %) 1740 1740 |((( 1741 1741 (% class="western" %) 1742 1742 **Response** ... ... @@ -1758,11 +1758,12 @@ 1758 1758 Resource Id of the newly created resource. 1759 1759 ))) 1760 1760 1761 - 1677 +\\ 1762 1762 1763 1763 (% class="western" %) 1764 1764 PUT method should be used to update an individual resource given the resource info. 1765 1765 1682 +(% 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 1701 +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 - 1704 +\\ 1788 1788 1789 1789 (% class="western" %) 1790 -Example: 1707 +Examples: 1791 1791 1792 1792 (% class="western" %) 1793 1793 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1711 + 1712 +(% class="western" %) 1713 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1714 + 1715 +(% class="western" %) 1716 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1} 1717 + 1718 +(% class="western" %) 1719 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1794 1794 ))) 1795 1795 1722 +(% class="wrapped" %) 1796 1796 |((( 1797 1797 (% class="western" %) 1798 1798 **Response** ... ... @@ -1814,20 +1814,21 @@ 1814 1814 resource id of the updated resource. 1815 1815 ))) 1816 1816 1817 - 1744 +\\ 1818 1818 1819 -(% class="western" %) 1820 - 1746 +\\ 1821 1821 1822 1822 (% class="western" %) 1823 - 1749 +\\ 1824 1824 1825 1825 (% class="western" %) 1826 -**Sources** 1752 +**COMPONENT: Source Codes 1753 +** 1827 1827 1828 1828 (% class="western" %) 1829 -This resource is for manipulating source sresource. A source can be created, updated or searched.1756 +This resource is for manipulating source code for a resource. A source code can be created, updated or searched. 1830 1830 1758 +(% class="wrapped" %) 1831 1831 |((( 1832 1832 (% class="western" %) 1833 1833 **Method** ... ... @@ -1879,11 +1879,12 @@ 1879 1879 JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update. 1880 1880 ))) 1881 1881 1882 - 1810 +\\ 1883 1883 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 1815 +(% 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 1843 +(% class="wrapped" %) 1914 1914 |((( 1915 1915 (% class="western" %) 1916 1916 **Response** ... ... @@ -1932,14 +1932,15 @@ 1932 1932 Returns found source details. 1933 1933 ))) 1934 1934 1935 - 1865 +\\ 1936 1936 1937 1937 (% class="western" %) 1938 - 1868 +\\ 1939 1939 1940 1940 (% class="western" %) 1941 1941 POST method should be used to create an individual source given the source parameters. 1942 1942 1873 +(% 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 1895 +(% class="wrapped" %) 1964 1964 |((( 1965 1965 (% class="western" %) 1966 1966 **Response** ... ... @@ -1982,11 +1982,12 @@ 1982 1982 Returns created source code id. 1983 1983 ))) 1984 1984 1985 - 1917 +\\ 1986 1986 1987 1987 (% class="western" %) 1988 1988 **PUT method can be used to update an individual source given the id.** 1989 1989 1922 +(% 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 1944 +(% class="wrapped" %) 2011 2011 |((( 2012 2012 (% class="western" %) 2013 2013 **Response** ... ... @@ -2029,17 +2029,18 @@ 2029 2029 Returns updated source id. 2030 2030 ))) 2031 2031 2032 - 1966 +\\ 2033 2033 2034 2034 (% class="western" %) 2035 - 1969 +\\ 2036 2036 2037 2037 (% class="western" %) 2038 -**Transactions** 1972 +**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 1977 +(% class="wrapped" %) 2043 2043 |((( 2044 2044 (% class="western" %) 2045 2045 **Method** ... ... @@ -2081,14 +2081,15 @@ 2081 2081 JSON of the Transactions type object needs to be sent as post data. Id field should not be sent. 2082 2082 ))) 2083 2083 2084 - 2019 +\\ 2085 2085 2086 2086 (% class="western" %) 2087 - 2022 +\\ 2088 2088 2089 2089 (% class="western" %) 2090 2090 Transactions can be looked up using transactionId, date range, userid. Use GET method to do lookup. 2091 2091 2027 +(% class="wrapped" %) 2092 2092 |((( 2093 2093 (% class="western" %) 2094 2094 **Request** ... ... @@ -2122,10 +2122,7 @@ 2122 2122 EndDate: When the search should end. Only valid when UserId is set. (Date) 2123 2123 ))) 2124 2124 2125 - 2126 - 2127 - 2128 - 2061 +(% class="wrapped" style="letter-spacing: 0.0px;" %) 2129 2129 |((( 2130 2130 (% class="western" %) 2131 2131 **Response** ... ... @@ -2144,14 +2144,26 @@ 2144 2144 Transactions 2145 2145 )))|((( 2146 2146 (% class="western" %) 2147 -Returns all transaction that satisfies the search criteria. 2080 +Returns all transaction that satisfies the search criteria. Returns all the package and product transactions of the user. Package Transactions are the one with TermId and ProductId. Product Transactions are the one with ResourceId. 2148 2148 ))) 2149 2149 2150 - 2083 +\\ 2151 2151 2085 +**Sample response for /(% style="color: rgb(80,80,80);" %)transactions/lookup?UserId=25255105:(%%)** 2086 + 2087 +|=((( 2088 +(% class="content-wrapper" %) 2089 +((( 2090 +[[image:attach:Screen Shot 2020-02-26 at 11.14.29 AM.png||width="1407"]] 2091 +))) 2092 +))) 2093 + 2094 +\\ 2095 + 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 2099 +(% 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 2121 +(% class="wrapped" %) 2176 2176 |((( 2177 2177 (% class="western" %) 2178 2178 **Response** ... ... @@ -2194,36 +2194,41 @@ 2194 2194 Returns transactionId of the newly created transaction. 2195 2195 ))) 2196 2196 2197 - 2143 +\\ 2198 2198 2145 +\\ 2146 + 2199 2199 (% class="western" %) 2200 -**Stats** 2148 +**COMPONENT: Leads 2149 +** 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. 2204 2204 2205 2205 (% class="western" %) 2206 - 2155 +\\ 2207 2207 2208 2208 (% class="western" %) 2209 - 2158 +\\ 2210 2210 2211 2211 (% class="western" %) 2212 - 2161 +\\ 2213 2213 2214 2214 (% class="western" %) 2215 - 2164 +\\ 2216 2216 2217 2217 (% class="western" %) 2218 - 2167 +\\ 2219 2219 2220 2220 (% class="western" %) 2221 -**Telemarketing** 2170 +**Telemarketing Leads 2171 +** 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 2177 +(% class="wrapped" %) 2227 2227 |((( 2228 2228 (% class="western" %) 2229 2229 **Method** ... ... @@ -2265,11 +2265,12 @@ 2265 2265 JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent. 2266 2266 ))) 2267 2267 2268 - 2219 +\\ 2269 2269 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 2224 +(% class="wrapped" %) 2273 2273 |((( 2274 2274 (% class="western" %) 2275 2275 **Request** ... ... @@ -2334,15 +2334,16 @@ 2334 2334 ))) 2335 2335 |((( 2336 2336 (% class="western" %) 2337 - 2289 +\\ 2338 2338 )))|((( 2339 2339 (% class="western" %) 2340 - 2292 +\\ 2341 2341 )))|((( 2342 2342 (% class="western" %) 2343 - 2295 +\\ 2344 2344 ))) 2345 2345 2298 +(% class="wrapped" %) 2346 2346 |((( 2347 2347 (% class="western" %) 2348 2348 **Response** ... ... @@ -2364,14 +2364,23 @@ 2364 2364 Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format. 2365 2365 ))) 2366 2366 2367 - 2320 +\\ 2368 2368 2322 +\\ 2323 + 2324 +\\ 2325 + 2326 +\\ 2327 + 2328 +\\ 2329 + 2369 2369 (% class="western" %) 2370 -**R eference**2331 +**API REFERENCE** 2371 2371 2372 2372 (% class="western" %) 2373 2373 **Type: Questions** 2374 2374 2336 +(% class="wrapped" %) 2375 2375 |((( 2376 2376 (% class="western" %) 2377 2377 **Property Name** ... ... @@ -2412,12 +2412,12 @@ 2412 2412 (% class="western" %) 2413 2413 Determines which type of question it is. Textbox, checkbox, select, radio. 2414 2414 There can be 6 types of questions. 2415 - 2416 - 2417 - 2418 - 2419 - 2420 - 2377 +type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters. 2378 +type=2 means textarea type question or long response type question. 2379 +type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as * 2380 +type = 4 means select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question. 2381 +type=5 means radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question. 2382 +type=6 means checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question. 2421 2421 ))) 2422 2422 |((( 2423 2423 (% class="western" %) ... ... @@ -2440,17 +2440,18 @@ 2440 2440 Alias for admin purpose. 2441 2441 ))) 2442 2442 2443 - 2405 +\\ 2444 2444 2445 2445 (% class="western" %) 2446 - 2408 +\\ 2447 2447 2448 2448 (% class="western" %) 2449 - 2411 +\\ 2450 2450 2451 2451 (% class="western" %) 2452 2452 **Type: Choices** 2453 2453 2416 +(% class="wrapped" %) 2454 2454 |((( 2455 2455 (% class="western" %) 2456 2456 **Property Name** ... ... @@ -2512,11 +2512,12 @@ 2512 2512 Tied to which question id. 2513 2513 ))) 2514 2514 2515 - 2478 +\\ 2516 2516 2517 2517 (% class="western" %) 2518 2518 **Type: Users** 2519 2519 2483 +(% class="wrapped" %) 2520 2520 |((( 2521 2521 (% class="western" %) 2522 2522 **Property Name** ... ... @@ -2568,11 +2568,12 @@ 2568 2568 Request date. 2569 2569 ))) 2570 2570 2571 - 2535 +\\ 2572 2572 2573 2573 (% class="western" %) 2574 2574 **Type: Demo** 2575 2575 2540 +(% class="wrapped" %) 2576 2576 |((( 2577 2577 (% class="western" %) 2578 2578 **Property Name** ... ... @@ -2614,11 +2614,12 @@ 2614 2614 ... 2615 2615 ))) 2616 2616 2617 - 2582 +\\ 2618 2618 2619 2619 (% class="western" %) 2620 2620 **Type: Transactions** 2621 2621 2587 +(% class="wrapped" %) 2622 2622 |((( 2623 2623 (% class="western" %) 2624 2624 **Property Name** ... ... @@ -2760,11 +2760,12 @@ 2760 2760 If there is amount (USD) included in transaction. 2761 2761 ))) 2762 2762 2763 - 2729 +\\ 2764 2764 2765 2765 (% class="western" %) 2766 2766 **Type: Sources** 2767 2767 2734 +(% class="wrapped" %) 2768 2768 |((( 2769 2769 (% class="western" %) 2770 2770 **Property Name** ... ... @@ -2816,14 +2816,15 @@ 2816 2816 If this is a child source then list the parent source id. 2817 2817 ))) 2818 2818 2819 - 2786 +\\ 2820 2820 2821 2821 (% class="western" %) 2822 - 2789 +\\ 2823 2823 2824 2824 (% class="western" %) 2825 2825 **Type: Products** 2826 2826 2794 +(% class="wrapped" %) 2827 2827 |((( 2828 2828 (% class="western" %) 2829 2829 **Property Name** ... ... @@ -2875,11 +2875,12 @@ 2875 2875 (Array of) Terms associated with the product. 2876 2876 ))) 2877 2877 2878 - 2846 +\\ 2879 2879 2880 2880 (% class="western" %) 2881 2881 **Type: Terms** 2882 2882 2851 +(% class="wrapped" %) 2883 2883 |((( 2884 2884 (% class="western" %) 2885 2885 **Property Name** ... ... @@ -2961,11 +2961,12 @@ 2961 2961 If there is price (USD) for the term. 2962 2962 ))) 2963 2963 2964 - 2933 +\\ 2965 2965 2966 2966 (% class="western" %) 2967 2967 **Type: Resources** 2968 2968 2938 +(% 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 3010 + 3011 +(% class="western" %) 3012 +or 3013 + 3014 +(% class="western" %) 3015 +Array 3040 3040 )))|((( 3041 3041 (% class="western" %) 3042 -Value of Resource Type .3018 +Value of Resource Type: 3043 3043 3044 3044 (% class="western" %) 3045 - Example:ifthe Type sent is3thenValuewouldbe**/digital/**3021 +When requesting a resource (GET), you should expect a string if there is only one value. If there are multiple values, you should expect an array. 3046 3046 3047 3047 (% class="western" %) 3024 +For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests. 3025 + 3026 +(% class="western" %) 3027 +Example : 3028 + 3029 +(% class="western" %) 3030 +if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** ** 3031 +**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"] 3032 + 3033 +(% class="western" %) 3048 3048 For Function type resource leave it blank. 3049 3049 ))) 3050 3050 |((( ... ... @@ -3055,14 +3055,25 @@ 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. 3044 +Default limit is 25 but if all the data needs to be pulled then pass limit=0. 3059 3059 ))) 3046 +|(% colspan="1" %)(% colspan="1" %) 3047 +((( 3048 +FreePass 3049 +)))|(% colspan="1" %)(% colspan="1" %) 3050 +((( 3051 +Int 3052 +)))|(% colspan="1" %)(% colspan="1" %) 3053 +((( 3054 +Default value is 0. This parameter is used to provide access to protected content. 3055 +))) 3060 3060 3061 - 3057 +\\ 3062 3062 3063 3063 (% class="western" %) 3064 3064 **Type: Telemarketing** 3065 3065 3062 +(% class="wrapped" %) 3066 3066 |((( 3067 3067 (% class="western" %) 3068 3068 **Property Name** ... ... @@ -3147,8 +3147,12 @@ 3147 3147 Page title that belongs to the page url that is being sent. If not provided it try to pull the title from the page but if unsuccessful then it will set it as blank. 3148 3148 3149 3149 (% class="western" %) 3150 - 3147 +\\ 3151 3151 3152 3152 (% class="western" %) 3153 3153 If the page url already exists and it doesn't match with the one that is being sent then it will throw conflict error with the title in our system. 3154 3154 ))) 3152 + 3153 +\\ 3154 + 3155 +\\
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -3 5389981 +23331813 - 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/23331813/ONEcount API Documentation