Changes for page OLD-ONEcount API Documentation
Last modified by Admin on 2025/06/27 12:14
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,7 +2,7 @@ 2 2 **Introduction** 3 3 4 4 (% class="western" %) 5 -ONEcount REST API is designed to allow you to directly manipulate the underlying data within the ONEcount application. This API can be used to lookup, create and updated different ONEcountdata components which are listed below.5 +ONEcount REST API is designed to allow you to directly manipulate the underlying data within the ONEcount application. his API can be used to lookup, create and updated different ONEcount resources which are listed below. 6 6 7 7 (% class="western" %) 8 8 REST takes advantage of the HTTP request methods to layer itself into the existing HTTP architecture. These operations consist of the following: ... ... @@ -28,10 +28,10 @@ 28 28 11. Lookup users 29 29 11. Create users 30 30 11. Update users 31 -1. Questions32 -11. Lookup questions33 -11. Listquestions34 - 11. Create questions31 +1. Transaction data 32 +11. Lookup transactions 33 +11. Create transactions 34 +\\ 35 35 1. Product data 36 36 11. Lookup products 37 37 11. Create products ... ... @@ -44,9 +44,10 @@ 44 44 11. Lookup resources 45 45 11. Create resources 46 46 11. Update resources 47 -1. Transaction data 48 -11. Lookup transactions 49 -11. Create transactions 47 +1. Questions 48 +11. Lookup questions 49 +11. List questions 50 +11. Create questions 50 50 1. Source Codes 51 51 11. Lookup source code 52 52 11. Create source codes ... ... @@ -227,96 +227,112 @@ 227 227 ** 228 228 ** 229 229 230 -**COMPONENT: Users** 231 +(% class="western" %) 232 +** 233 +** 231 231 232 232 (% class="western" %) 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. 236 +** 237 +** 234 234 239 + 240 + 235 235 (% class="western" %) 236 - Additionally (Array of) transaction object specifying parts of the transaction to be added to the new user can be specified.UserId,TransactionId and SubscriptionTypewill be ignored ifspecified forthis case. As this is new user and new transactionisbeing added.242 +**RESOURCE: Questions** 237 237 238 238 (% class="western" %) 239 - Inthis casethe provideddemographicformationin usersobject willbeusedtocreate anewuser in ONEcount and thena responsewillbegenerated.Beforecreatinga newuser,acheckforduplicatewillbeperformed basedonDedupecolumnsandiffound,anderrorcodewillbegenerated.245 +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). 240 240 241 241 (% class="western" %) 242 - If username andpasswordis not one oftheparametersbeingpassed,thenarandomusername andpasswordwillbegeneratedfortheuserwhilecreatinghis useraccount inONEcount.248 +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. 243 243 244 244 (% class="western" %) 245 - Returnparameterwillhavecommaseparatedlist of questionIds thatis requestedback fromtheAPI.251 +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) 246 246 247 247 (% class="western" %) 248 - Returnisanoptional parameterinrequest. If return isnotrequested then by default, only UserId (which is ONEcount ID) will be returned in the Users object.254 +There can be 6 types of questions: 249 249 250 - 251 - 256 +(% class="wrapped" %) 252 252 |((( 253 -(% class="western" %) 254 -** Method**258 +(% class="western" align="center" %) 259 +**Type** 255 255 )))|((( 256 256 (% class="western" %) 257 -**Url** 262 +**Description** 263 +))) 264 +|((( 265 +(% class="western" align="center" %) 266 +1 258 258 )))|((( 259 259 (% class="western" %) 260 - **Action**269 +Textbox type questions or short response type question. The response length needs to be less than 255 characters. 261 261 ))) 262 262 |((( 263 -(% class="western" %) 264 - GET272 +(% class="western" align="center" %) 273 +2 265 265 )))|((( 266 266 (% class="western" %) 267 -/users 276 +Textarea type question or long response type question. 277 +))) 278 +|((( 279 +(% class="western" align="center" %) 280 +3 268 268 )))|((( 269 269 (% class="western" %) 270 - Get users datalimiting25.283 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 271 271 ))) 272 272 |((( 286 +(% class="western" align="center" %) 287 +4 288 +)))|((( 273 273 (% class="western" %) 274 -GET 290 +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. 291 +))) 292 +|((( 293 +(% class="western" align="center" %) 294 +5 275 275 )))|((( 276 276 (% class="western" %) 277 -/users/1 297 +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. 298 +))) 299 +|((( 300 +(% class="western" align="center" %) 301 +6 278 278 )))|((( 279 279 (% class="western" %) 280 - Getdataforuserid1.The useridcan be anumericvalueorahash304 +Checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question. 281 281 ))) 306 + 307 +(% class="wrapped" %) 282 282 |((( 283 283 (% class="western" %) 284 - GET310 +**Method** 285 285 )))|((( 286 286 (% class="western" %) 287 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2313 +**Url** 288 288 )))|((( 289 289 (% class="western" %) 290 -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. 291 - 292 -(% class="western" %) 293 -Return parameter defines a csv of question id that are requested back in response. 316 +**Action** 294 294 ))) 295 295 |((( 296 296 (% class="western" %) 297 - POST320 +GET 298 298 )))|((( 299 299 (% class="western" %) 300 -/u sers323 +/questions 301 301 )))|((( 302 302 (% class="western" %) 303 -Create a new users 304 - 305 -(% class="western" %) 306 -Parameters required to create the user needs to be sent as post data in JSON format. 326 +List all questions 307 307 ))) 308 308 |((( 309 309 (% class="western" %) 310 - PUT330 +GET 311 311 )))|((( 312 312 (% class="western" %) 313 -/u sers/1333 +/questions/1 314 314 )))|((( 315 315 (% class="western" %) 316 -Update user id 1. The user id can be a numeric value or a hash 317 - 318 -(% class="western" %) 319 -Parameters required to update the user needs to be sent as post data in JSON format. 336 +Returns question id 1 320 320 ))) 321 321 |((( 322 322 (% class="western" %) ... ... @@ -323,10 +323,10 @@ 323 323 GET 324 324 )))|((( 325 325 (% class="western" %) 326 -/u sers/1/partners/2343 +/questions/lookup?Text=Email 327 327 )))|((( 328 328 (% class="western" %) 329 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.346 +Returns all questions with “Email" in question text 330 330 ))) 331 331 |((( 332 332 (% class="western" %) ... ... @@ -333,41 +333,34 @@ 333 333 POST 334 334 )))|((( 335 335 (% class="western" %) 336 -/u sers/login353 +/questions 337 337 )))|((( 338 338 (% class="western" %) 339 -C heckto seeuserexistwithusername/email and password.356 +Create a new question 340 340 341 341 (% class="western" %) 342 -Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param. 343 - 359 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 360 +))) 361 +|((( 344 344 (% class="western" %) 345 - Example:346 - 363 +PUT 364 +)))|((( 347 347 (% class="western" %) 348 - {"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"}349 - 366 +/questions 367 +)))|((( 350 350 (% class="western" %) 351 - OR369 +Update a question 352 352 353 353 (% class="western" %) 354 -{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 355 - 356 -(% class="western" %) 357 -OR 358 - 359 -(% class="western" %) 360 -{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 361 - 362 -(% class="western" %) 363 -**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found. 372 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 364 364 ))) 365 365 366 366 367 367 368 368 (% class="western" %) 369 -**GET method shouldbe used to lookup users.**378 +**GET method can be used to lookup questions.** 370 370 380 +(% class="wrapped" %) 371 371 |((( 372 372 (% class="western" %) 373 373 **Request** ... ... @@ -386,19 +386,19 @@ 386 386 String 387 387 )))|((( 388 388 (% class="western" %) 389 -URL encoded key value string parameters for the lookup. Returnpropertyhascsvof questionsid requestedbackinUsers object.399 +URL encoded key value string parameters for the question that a user is trying to search. 390 390 391 391 (% class="western" %) 392 -Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]402 +Params: 393 393 394 394 (% class="western" %) 395 -return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 405 +Text: Word or phrase that should be present in the question text (String) 406 + 407 +(% class="western" %) 408 +Type: Look up the question type. 396 396 ))) 397 397 398 - 399 - 400 - 401 - 411 +(% class="wrapped" %) 402 402 |((( 403 403 (% class="western" %) 404 404 **Response** ... ... @@ -411,20 +411,21 @@ 411 411 ))) 412 412 |((( 413 413 (% class="western" %) 414 -Users 415 -)))|=((( 416 -(% class="western" align="left" %) 417 -Users 424 +Questions 418 418 )))|((( 419 419 (% class="western" %) 420 -Found users returned with the demo field requested in return parameter in json format. 427 +Questions 428 +)))|((( 429 +(% class="western" %) 430 +Returns found question details. 421 421 ))) 422 422 423 423 424 424 425 425 (% class="western" %) 426 -**POST method should be used to create users.** 436 +**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).** 427 427 438 +(% class="wrapped" %) 428 428 |((( 429 429 (% class="western" %) 430 430 **Request** ... ... @@ -437,48 +437,46 @@ 437 437 ))) 438 438 |((( 439 439 (% class="western" %) 440 - Users451 +Questions 441 441 )))|((( 442 442 (% class="western" %) 443 - Users454 +Questions 444 444 )))|((( 445 445 (% class="western" %) 446 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.457 +This defines the question contents and possible responses. 447 447 ))) 459 + 460 +(% class="wrapped" %) 448 448 |((( 449 449 (% class="western" %) 450 - Transactions463 +**Response** 451 451 )))|((( 452 452 (% class="western" %) 453 -T ransactions466 +**Type** 454 454 )))|((( 455 455 (% class="western" %) 456 - (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.469 +**Description** 457 457 ))) 458 458 |((( 459 459 (% class="western" %) 460 - DedupeColumns473 +QuestionId 461 461 )))|((( 462 462 (% class="western" %) 463 - String476 +Int 464 464 )))|((( 465 465 (% class="western" %) 466 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.479 +Returns ONEcount question id on successful creation of the question. 467 467 ))) 468 -|((( 481 + 482 + 483 + 469 469 (% class="western" %) 470 -Return 471 -)))|((( 472 -(% class="western" %) 473 -String 474 -)))|((( 475 -(% class="western" %) 476 -CSV of ONEcount QuestionId's requested back in Users object in response. 477 -))) 485 +PUT method should be used to update question. 478 478 487 +(% class="wrapped" %) 479 479 |((( 480 480 (% class="western" %) 481 -**Re sponse**490 +**Request** 482 482 )))|((( 483 483 (% class="western" %) 484 484 **Type** ... ... @@ -488,23 +488,19 @@ 488 488 ))) 489 489 |((( 490 490 (% class="western" %) 491 -Users 492 -)))|=((( 493 -(% class="western" align="left" %) 494 -Users 500 +Questions 495 495 )))|((( 496 496 (% class="western" %) 497 -Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 503 +Questions 504 +)))|((( 505 +(% class="western" %) 506 +This defines the question contents and responses. 498 498 ))) 499 499 500 - 501 - 502 -(% class="western" %) 503 -**PUT method should be used to update users.** 504 - 509 +(% class="wrapped" %) 505 505 |((( 506 506 (% class="western" %) 507 -**Re quest**512 +**Response** 508 508 )))|((( 509 509 (% class="western" %) 510 510 **Type** ... ... @@ -514,173 +514,168 @@ 514 514 ))) 515 515 |((( 516 516 (% class="western" %) 517 - Users522 +QuestionId 518 518 )))|((( 519 519 (% class="western" %) 520 - Users525 +Int 521 521 )))|((( 522 522 (% class="western" %) 523 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.528 +Returns ONEcount question id on successful update of the question. 524 524 ))) 525 - |(((530 + 526 526 (% class="western" %) 527 - Return528 - )))|(((532 + 533 + 529 529 (% class="western" %) 530 -String 531 -)))|((( 535 +Example: Get list of questions from api which has FirstName in text 536 + 537 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 538 + 532 532 (% class="western" %) 533 -CSV of ONEcount QuestionId's requested back in Users object in response 534 -))) 535 -|((( 540 +{ 541 + 536 536 (% class="western" %) 537 - RequestDate538 - )))|(((543 +"result": { 544 + 539 539 (% class="western" %) 540 - Date541 - )))|(((546 +"success": "1", 547 + 542 542 (% class="western" %) 543 -RequestDate to use for the demo update. If not provided current date will be used. 544 -))) 549 +"error": { 545 545 546 -|((( 547 547 (% class="western" %) 548 - **Response**549 - )))|(((552 +"code": "0", 553 + 550 550 (% class="western" %) 551 - **Type**552 - )))|(((555 +"message": "" 556 + 553 553 (% class="western" %) 554 -**Description** 555 -))) 556 -|((( 558 +} 559 + 557 557 (% class="western" %) 558 -Users 559 -)))|=((( 560 -(% class="western" align="left" %) 561 -Users 562 -)))|((( 561 +}, 562 + 563 563 (% class="western" %) 564 -Updated user returned with the demo field requested in return parameter in json format. 565 -))) 564 +"Questions": [ 566 566 567 567 (% class="western" %) 568 - 567 +{ 569 569 570 570 (% class="western" %) 571 - 570 +"Id": "6", 572 572 573 573 (% class="western" %) 574 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.573 +"Text": "FirstName", 575 575 576 -{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}} 575 +(% class="western" %) 576 +"Type": "1", 577 577 578 578 (% class="western" %) 579 -** 580 -** 579 +"Alias": "FName" 581 581 582 582 (% class="western" %) 583 -** 584 -** 582 +} 585 585 586 - 584 +(% class="western" %) 585 +] 587 587 588 588 (% class="western" %) 589 - **COMPONENT: Questions**588 +} 590 590 591 591 (% class="western" %) 592 -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). 593 593 592 +**RESOURCE: Users** 593 + 594 594 (% class="western" %) 595 - Thisresource isformanipulatingquestions resource.Questionsin ONEcountans anyquestionthat is asked to the subscriber. Itcouldbeany questionsthat appearson customerformsprintformsthat getsanswered by a subscriber.Questionsapicallwillallowcreation,updateandsearch ofquestionin ONEcount.Toadd a newquestionstothesystemyou'llmakePOST api calltothequestions resource.595 +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. 596 596 597 597 (% class="western" %) 598 - Thedatathatissenthouldbe inJSON formatandof typequestionsasdescribedin Referencessection.Thetypepropertyof questionsobjectisdescribedbelow.Questionsobject willonlyneedachoicesblockifthequestionisamultiplechoicequestion(type=4or5or 6)598 +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. 599 599 600 600 (% class="western" %) 601 - There can be6types ofquestions:601 +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. 602 602 603 +(% class="western" %) 604 +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. 605 + 606 +(% class="western" %) 607 +Return parameter will have the comma separated list of question Ids that is requested back from the API. 608 + 609 +(% class="western" %) 610 +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. 611 + 612 +(% class="western" %) 613 + 614 + 603 603 (% class="wrapped" %) 604 604 |((( 605 -(% class="western" align="center" %) 606 -**Type** 607 -)))|((( 608 608 (% class="western" %) 609 -**Description** 610 -))) 611 -|((( 612 -(% class="western" align="center" %) 613 -1 618 +**Method** 614 614 )))|((( 615 615 (% class="western" %) 616 -Textbox type questions or short response type question. The response length needs to be less than 255 characters. 617 -))) 618 -|((( 619 -(% class="western" align="center" %) 620 -2 621 +**Url** 621 621 )))|((( 622 622 (% class="western" %) 623 - Textarea type questionor long response type question.624 +**Action** 624 624 ))) 625 625 |((( 626 -(% class="western" align="center"%)627 - 3627 +(% class="western" %) 628 +GET 628 628 )))|((( 629 629 (% class="western" %) 630 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 631 -))) 632 -|((( 633 -(% class="western" align="center" %) 634 -4 631 +/users 635 635 )))|((( 636 636 (% class="western" %) 637 - 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.634 +Get users data limiting 25. 638 638 ))) 639 639 |((( 640 -(% class="western" align="center"%)641 - 5637 +(% class="western" %) 638 +GET 642 642 )))|((( 643 643 (% class="western" %) 644 -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. 645 -))) 646 -|((( 647 -(% class="western" align="center" %) 648 -6 641 +/users/1 649 649 )))|((( 650 650 (% class="western" %) 651 - Checkboxtypequestion. This isamultiple choice,multi responsetype question.Whencreating this type of question thechoicesblockalsoneedstobepartof the questions objectthat will hold thepossiblechoicesof the checkbox question.644 +Get data for user id 1. The user id can be a numeric value or a hash 652 652 ))) 653 - 654 -(% class="wrapped" %) 655 655 |((( 656 656 (% class="western" %) 657 - **Method**648 +GET 658 658 )))|((( 659 659 (% class="western" %) 660 - **Url**651 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2 661 661 )))|((( 662 662 (% class="western" %) 663 -**Action** 654 +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. 655 + 656 +(% class="western" %) 657 +Return parameter defines a csv of question id that are requested back in response. 664 664 ))) 665 665 |((( 666 666 (% class="western" %) 667 - GET661 +POST 668 668 )))|((( 669 669 (% class="western" %) 670 -/ questions664 +/users 671 671 )))|((( 672 672 (% class="western" %) 673 -List all questions 667 +Create a new users 668 + 669 +(% class="western" %) 670 +Parameters required to create the user needs to be sent as post data in JSON format. 674 674 ))) 675 675 |((( 676 676 (% class="western" %) 677 - GET674 +PUT 678 678 )))|((( 679 679 (% class="western" %) 680 -/ questions/1677 +/users/1 681 681 )))|((( 682 682 (% class="western" %) 683 -Returns question id 1 680 +Update user id 1. The user id can be a numeric value or a hash 681 + 682 +(% class="western" %) 683 +Parameters required to update the user needs to be sent as post data in JSON format. 684 684 ))) 685 685 |((( 686 686 (% class="western" %) ... ... @@ -687,10 +687,10 @@ 687 687 GET 688 688 )))|((( 689 689 (% class="western" %) 690 -/ questions/lookup?Text=Email690 +/users/1/partners/2 691 691 )))|((( 692 692 (% class="western" %) 693 - Returns allquestionswith“Email"inquestiontext693 +Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash. 694 694 ))) 695 695 |((( 696 696 (% class="western" %) ... ... @@ -697,32 +697,40 @@ 697 697 POST 698 698 )))|((( 699 699 (% class="western" %) 700 -/ questions700 +/users/login 701 701 )))|((( 702 702 (% class="western" %) 703 -C reateanewquestion703 +Check to see user exist with username/email and password. 704 704 705 705 (% class="western" %) 706 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 707 -))) 708 -|((( 706 +Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param. 707 + 709 709 (% class="western" %) 710 - PUT711 - )))|(((709 +Example: 710 + 712 712 (% class="western" %) 713 - /questions714 - )))|(((712 +{"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"} 713 + 715 715 (% class="western" %) 716 - Update a question715 +OR 717 717 718 718 (% class="western" %) 719 -JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 718 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 719 + 720 +(% class="western" %) 721 +OR 722 + 723 +(% class="western" %) 724 +{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 725 + 726 +(% class="western" %) 727 +**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found. 720 720 ))) 721 721 722 722 723 723 724 724 (% class="western" %) 725 -**GET method canbe used to lookupquestions.**733 +**GET method should be used to lookup users.** 726 726 727 727 (% class="wrapped" %) 728 728 |((( ... ... @@ -743,18 +743,19 @@ 743 743 String 744 744 )))|((( 745 745 (% class="western" %) 746 -URL encoded key value string parameters for the question thatauser isryingtosearch.754 +URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object. 747 747 748 748 (% class="western" %) 749 -Params: 757 +Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]] 750 750 751 751 (% class="western" %) 752 -Text: Word or phrase that should be present in the question text (String) 753 - 754 -(% class="western" %) 755 -Type: Look up the question type. 760 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 756 756 ))) 757 757 763 + 764 + 765 + 766 + 758 758 (% class="wrapped" %) 759 759 |((( 760 760 (% class="western" %) ... ... @@ -768,19 +768,19 @@ 768 768 ))) 769 769 |((( 770 770 (% class="western" %) 771 -Questions 780 +Users 781 +)))|=((( 782 +(% class="western" align="left" %) 783 +Users 772 772 )))|((( 773 773 (% class="western" %) 774 -Questions 775 -)))|((( 776 -(% class="western" %) 777 -Returns found question details. 786 +Found users returned with the demo field requested in return parameter in json format. 778 778 ))) 779 779 780 780 781 781 782 782 (% class="western" %) 783 -**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).**792 +**POST method should be used to create users.** 784 784 785 785 (% class="wrapped" %) 786 786 |((( ... ... @@ -795,46 +795,49 @@ 795 795 ))) 796 796 |((( 797 797 (% class="western" %) 798 - Questions807 +Users 799 799 )))|((( 800 800 (% class="western" %) 801 - Questions810 +Users 802 802 )))|((( 803 803 (% class="western" %) 804 - Thisdefinesthequestioncontentsandpossibleresponses.813 +Users object that contains information about user to create. PartnerId Needs to be specified. 805 805 ))) 806 - 807 -(% class="wrapped" %) 808 808 |((( 809 809 (% class="western" %) 810 - **Response**817 +Transactions 811 811 )))|((( 812 812 (% class="western" %) 813 - **Type**820 +Transactions 814 814 )))|((( 815 815 (% class="western" %) 816 - **Description**823 +(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. 817 817 ))) 818 818 |((( 819 819 (% class="western" %) 820 - QuestionId827 +DedupeColumns 821 821 )))|((( 822 822 (% class="western" %) 823 - Int830 +String 824 824 )))|((( 825 825 (% class="western" %) 826 - ReturnsONEcountquestion idonsuccessful creationofthe question.833 +CSV of question id's that should be considered to find duplicate. 827 827 ))) 828 - 829 - 830 - 835 +|((( 831 831 (% class="western" %) 832 -PUT method should be used to update question. 837 +Return 838 +)))|((( 839 +(% class="western" %) 840 +String 841 +)))|((( 842 +(% class="western" %) 843 +CSV of ONEcount QuestionId's requested back in Users object in response. 844 +))) 833 833 834 834 (% class="wrapped" %) 835 835 |((( 836 836 (% class="western" %) 837 -**Re quest**849 +**Response** 838 838 )))|((( 839 839 (% class="western" %) 840 840 **Type** ... ... @@ -844,19 +844,24 @@ 844 844 ))) 845 845 |((( 846 846 (% class="western" %) 847 -Questions 859 +Users 860 +)))|=((( 861 +(% class="western" align="left" %) 862 +Users 848 848 )))|((( 849 849 (% class="western" %) 850 -Questions 851 -)))|((( 852 -(% class="western" %) 853 -This defines the question contents and responses. 865 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 854 854 ))) 855 855 868 + 869 + 870 +(% class="western" %) 871 +**PUT method should be used to update users.** 872 + 856 856 (% class="wrapped" %) 857 857 |((( 858 858 (% class="western" %) 859 -**Re sponse**876 +**Request** 860 860 )))|((( 861 861 (% class="western" %) 862 862 **Type** ... ... @@ -866,81 +866,72 @@ 866 866 ))) 867 867 |((( 868 868 (% class="western" %) 869 - QuestionId886 +Users 870 870 )))|((( 871 871 (% class="western" %) 872 - Int889 +Users 873 873 )))|((( 874 874 (% class="western" %) 875 -Returns ONEcountquestion idon successful updateofthequestion.892 +Users object with update fields. Return property has csv of questions id requested back in Users object. 876 876 ))) 877 - 894 +|((( 878 878 (% class="western" %) 879 - 880 - 896 +Return 897 +)))|((( 881 881 (% class="western" %) 882 -Example: Get list of questions from api which has FirstName in text 883 - 884 -{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 885 - 899 +String 900 +)))|((( 886 886 (% class="western" %) 887 -{ 888 - 902 +CSV of ONEcount QuestionId's requested back in Users object in response 903 +))) 904 +|((( 889 889 (% class="western" %) 890 - "result": {891 - 906 +RequestDate 907 +)))|((( 892 892 (% class="western" %) 893 - "success": "1",894 - 909 +Date 910 +)))|((( 895 895 (% class="western" %) 896 -"error": { 912 +RequestDate to use for the demo update. If not provided current date will be used. 913 +))) 897 897 915 +(% class="wrapped" %) 916 +|((( 898 898 (% class="western" %) 899 - "code": "0",900 - 918 +**Response** 919 +)))|((( 901 901 (% class="western" %) 902 - "message": ""903 - 921 +**Type** 922 +)))|((( 904 904 (% class="western" %) 905 -} 906 - 924 +**Description** 925 +))) 926 +|((( 907 907 (% class="western" %) 908 -}, 909 - 928 +Users 929 +)))|=((( 930 +(% class="western" align="left" %) 931 +Users 932 +)))|((( 910 910 (% class="western" %) 911 -"Questions": [ 934 +Updated user returned with the demo field requested in return parameter in json format. 935 +))) 912 912 913 913 (% class="western" %) 914 - {938 + 915 915 916 916 (% class="western" %) 917 - "Id":"6",941 + 918 918 919 919 (% class="western" %) 920 - "Text":"FirstName",944 +Create new users. Here in this example the JSON for request is passed in userFile.json file. 921 921 922 -(% class="western" %) 923 -"Type": "1", 946 +{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}} 924 924 925 925 (% class="western" %) 926 - "Alias": "FName"949 +**Products** 927 927 928 928 (% class="western" %) 929 -} 930 - 931 -(% class="western" %) 932 -] 933 - 934 -(% class="western" %) 935 -} 936 - 937 -(% class="western" %) 938 -\\ 939 - 940 -(% class="western" %) 941 -**COMPONENT: Products** 942 - 943 -(% class="western" %) 944 944 This resource is for manipulating products resource. A product can be created, updated or searched. 945 945 946 946 (% class="wrapped" %) ... ... @@ -1195,7 +1195,7 @@ 1195 1195 1196 1196 1197 1197 (% class="western" %) 1198 -** COMPONENT: Terms**1206 +**Terms** 1199 1199 1200 1200 (% class="western" %) 1201 1201 This resource is for manipulating terms resource. A term can be created, updated or searched. ... ... @@ -1426,45 +1426,9 @@ 1426 1426 1427 1427 1428 1428 (% class="western" %) 1429 -** COMPONENT:Resources**1437 +**Resources** 1430 1430 1431 1431 (% class="western" %) 1432 -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. 1433 - 1434 -* ((( 1435 -(% class="western" %) 1436 -questions 1437 -))) 1438 -* ((( 1439 -(% class="western" %) 1440 -users 1441 -))) 1442 -* ((( 1443 -(% class="western" %) 1444 -products 1445 -))) 1446 -* ((( 1447 -(% class="western" %) 1448 -terms 1449 -))) 1450 -* ((( 1451 -(% class="western" %) 1452 -resources 1453 -))) 1454 -* ((( 1455 -(% class="western" %) 1456 -sources 1457 -))) 1458 -* ((( 1459 -(% class="western" %) 1460 -transactions 1461 -))) 1462 - 1463 -(% class="western" %) 1464 -** 1465 -** 1466 - 1467 -(% class="western" %) 1468 1468 This resource is for manipulating resources resource. A resource can be created, updated or searched. 1469 1469 1470 1470 (% class="wrapped" %) ... ... @@ -1522,7 +1522,7 @@ 1522 1522 1523 1523 1524 1524 (% class="western" %) 1525 -**GET method should be used to lookup r esources.**1497 +**GET method should be used to lookup products.** 1526 1526 1527 1527 (% class="wrapped" %) 1528 1528 |((( ... ... @@ -1577,7 +1577,7 @@ 1577 1577 1578 1578 1579 1579 (% class="western" %) 1580 -**POST method should be used to create r esources.**1552 +**POST method should be used to create products.** 1581 1581 1582 1582 (% class="wrapped" %) 1583 1583 |((( ... ... @@ -1692,17 +1692,49 @@ 1692 1692 1693 1693 1694 1694 1695 - 1667 +(% class="western" %) 1668 +**Resources** 1696 1696 1697 1697 (% class="western" %) 1671 +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. 1672 + 1673 +* ((( 1674 +(% class="western" %) 1675 +questions 1676 +))) 1677 +* ((( 1678 +(% class="western" %) 1679 +users 1680 +))) 1681 +* ((( 1682 +(% class="western" %) 1683 +products 1684 +))) 1685 +* ((( 1686 +(% class="western" %) 1687 +terms 1688 +))) 1689 +* ((( 1690 +(% class="western" %) 1691 +resources 1692 +))) 1693 +* ((( 1694 +(% class="western" %) 1695 +sources 1696 +))) 1697 +* ((( 1698 +(% class="western" %) 1699 +transactions 1700 +))) 1701 + 1702 +(% class="western" %) 1698 1698 1699 1699 1700 1700 (% class="western" %) 1701 -**COMPONENT: Source Codes 1702 -** 1706 +**Sources** 1703 1703 1704 1704 (% class="western" %) 1705 -This resource is for manipulating source code fora resource. A source code can be created, updated or searched.1709 +This resource is for manipulating sources resource. A source can be created, updated or searched. 1706 1706 1707 1707 (% class="wrapped" %) 1708 1708 |((( ... ... @@ -1918,7 +1918,7 @@ 1918 1918 1919 1919 1920 1920 (% class="western" %) 1921 -** COMPONENT: Transactions**1925 +**Transactions** 1922 1922 1923 1923 (% class="western" %) 1924 1924 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -2086,9 +2086,14 @@ 2086 2086 2087 2087 2088 2088 2093 + 2094 + 2095 + 2096 + 2097 + 2098 + 2089 2089 (% class="western" %) 2090 -**COMPONENT: Leads 2091 -** 2100 +**Stats** 2092 2092 2093 2093 (% class="western" %) 2094 2094 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. ... ... @@ -2109,8 +2109,7 @@ 2109 2109 2110 2110 2111 2111 (% class="western" %) 2112 -**Telemarketing Leads 2113 -** 2121 +**Telemarketing** 2114 2114 2115 2115 (% class="western" %) 2116 2116 ... ... @@ -2270,7 +2270,7 @@ 2270 2270 2271 2271 2272 2272 (% class="western" %) 2273 -** APIREFERENCE**2281 +**Reference** 2274 2274 2275 2275 (% class="western" %) 2276 2276 **Type: Questions**
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -35390 101 +3539009 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/35390 10/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/3539009/ONEcount API Documentation