Changes for page OLD-ONEcount API Documentation
Last modified by Admin on 2025/06/27 12:14
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Admin1 +XWiki.ayush - Content
-
... ... @@ -2,7 +2,7 @@ 2 2 **Introduction** 3 3 4 4 (% class="western" %) 5 -ONEcount REST API is designed to allow you to directly manipulate the underlying data within the ONEcount application. his API can be used to lookup, create and update ddifferent ONEcountresources which are listed below.5 +ONEcount REST API is designed to allow you to directly manipulate the underlying data within the ONEcount application. This API can be used to lookup, create and update different ONEcount data components which are listed below. 6 6 7 7 (% class="western" %) 8 8 REST takes advantage of the HTTP request methods to layer itself into the existing HTTP architecture. These operations consist of the following: ... ... @@ -9,7 +9,7 @@ 9 9 10 10 1. ((( 11 11 (% class="western" %) 12 -**GET** - Used for lookup of resources 12 +**GET** - Used for lookup of resourcesresources 13 13 ))) 14 14 1. ((( 15 15 (% class="western" %) ... ... @@ -28,10 +28,10 @@ 28 28 11. Lookup users 29 29 11. Create users 30 30 11. Update users 31 -1. Transactiondata32 -11. Lookup transactions33 -11. Createtransactions34 - \\31 +1. Questions 32 +11. Lookup questions 33 +11. List questions 34 +11. Create questions 35 35 1. Product data 36 36 11. Lookup products 37 37 11. Create products ... ... @@ -44,10 +44,9 @@ 44 44 11. Lookup resources 45 45 11. Create resources 46 46 11. Update resources 47 -1. Questions 48 -11. Lookup questions 49 -11. List questions 50 -11. Create questions 47 +1. Transaction data 48 +11. Lookup transactions 49 +11. Create transactions 51 51 1. Source Codes 52 52 11. Lookup source code 53 53 11. Create source codes ... ... @@ -228,112 +228,97 @@ 228 228 ** 229 229 ** 230 230 231 -(% class="western" %) 232 -** 233 -** 230 +**COMPONENT: Users** 234 234 235 235 (% class="western" %) 236 -** 237 -** 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. 238 238 239 - 240 - 241 241 (% class="western" %) 242 - **RESOURCE:Questions**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. 243 243 244 244 (% class="western" %) 245 - Alldata fieldsin ONEcountaremadeupf questions. Questionsareconfigurable on aper-client basis, andnotwo customerinstallationswillhavethesamequestion(ie., field)layout.Therefore,before queryingor updatinganyONEcountinstallation, you'll need to get an understanding of thequestionlayoutof theinstallation. ThisAPI segmentwillallow you to queryONEcount to determinehequestion layoutfortheinstallation.Itwillalsoallowyouto createnewquestionswithin thesystem. Thisresourceoesnotallowyoutoupdatethedataforaspecificuser(seeUsersection).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. 246 246 247 247 (% class="western" %) 248 - 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. 249 249 250 250 (% class="western" %) 251 - 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. 252 252 253 253 (% class="western" %) 254 - 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. 255 255 250 + 251 + 256 256 (% class="wrapped" %) 257 257 |((( 258 -(% class="western" align="center" %) 259 -**Type** 260 -)))|((( 261 261 (% class="western" %) 262 -**Description** 263 -))) 264 -|((( 265 -(% class="western" align="center" %) 266 -1 255 +**Method** 267 267 )))|((( 268 268 (% class="western" %) 269 -Textbox type questions or short response type question. The response length needs to be less than 255 characters. 270 -))) 271 -|((( 272 -(% class="western" align="center" %) 273 -2 258 +**Url** 274 274 )))|((( 275 275 (% class="western" %) 276 - Textarea type questionor long response type question.261 +**Action** 277 277 ))) 278 278 |((( 279 -(% class="western" align="center"%)280 - 3264 +(% class="western" %) 265 +GET 281 281 )))|((( 282 282 (% class="western" %) 283 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 284 -))) 285 -|((( 286 -(% class="western" align="center" %) 287 -4 268 +/users 288 288 )))|((( 289 289 (% class="western" %) 290 - 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. 291 291 ))) 292 292 |((( 293 -(% class="western" align="center"%)294 - 5274 +(% class="western" %) 275 +GET 295 295 )))|((( 296 296 (% class="western" %) 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 +/users/1 302 302 )))|((( 303 303 (% class="western" %) 304 - 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 305 305 ))) 306 - 307 -(% class="wrapped" %) 308 308 |((( 309 309 (% class="western" %) 310 - **Method**285 +GET 311 311 )))|((( 312 312 (% class="western" %) 313 - **Url**288 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2 314 314 )))|((( 315 315 (% class="western" %) 316 -**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. 317 317 ))) 318 318 |((( 319 319 (% class="western" %) 320 - GET298 +POST 321 321 )))|((( 322 322 (% class="western" %) 323 -/ questions301 +/users 324 324 )))|((( 325 325 (% class="western" %) 326 -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. 327 327 ))) 328 328 |((( 329 329 (% class="western" %) 330 - GET311 +PUT 331 331 )))|((( 332 332 (% class="western" %) 333 -/ questions/1314 +/users/1 334 334 )))|((( 335 335 (% class="western" %) 336 -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. 337 337 ))) 338 338 |((( 339 339 (% class="western" %) ... ... @@ -340,10 +340,10 @@ 340 340 GET 341 341 )))|((( 342 342 (% class="western" %) 343 -/ questions/lookup?Text=Email327 +/users/1/partners/2 344 344 )))|((( 345 345 (% class="western" %) 346 - 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. 347 347 ))) 348 348 |((( 349 349 (% class="western" %) ... ... @@ -350,32 +350,40 @@ 350 350 POST 351 351 )))|((( 352 352 (% class="western" %) 353 -/ questions337 +/users/login 354 354 )))|((( 355 355 (% class="western" %) 356 -C reateanewquestion340 +Check to see user exist with username/email and password. 357 357 358 358 (% class="western" %) 359 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 360 -))) 361 -|((( 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 + 362 362 (% class="western" %) 363 - PUT364 - )))|(((346 +Example: 347 + 365 365 (% class="western" %) 366 - /questions367 - )))|(((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 + 368 368 (% class="western" %) 369 - Update a question352 +OR 370 370 371 371 (% class="western" %) 372 -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. 373 373 ))) 374 374 375 375 376 376 377 377 (% class="western" %) 378 -**GET method canbe used to lookupquestions.**370 +**GET method should be used to lookup users.** 379 379 380 380 (% class="wrapped" %) 381 381 |((( ... ... @@ -396,18 +396,19 @@ 396 396 String 397 397 )))|((( 398 398 (% class="western" %) 399 -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. 400 400 401 401 (% class="western" %) 402 -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"]] 403 403 404 404 (% class="western" %) 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. 397 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 409 409 ))) 410 410 400 + 401 + 402 + 403 + 411 411 (% class="wrapped" %) 412 412 |((( 413 413 (% class="western" %) ... ... @@ -421,19 +421,19 @@ 421 421 ))) 422 422 |((( 423 423 (% class="western" %) 424 -Questions 417 +Users 418 +)))|=((( 419 +(% class="western" align="left" %) 420 +Users 425 425 )))|((( 426 426 (% class="western" %) 427 -Questions 428 -)))|((( 429 -(% class="western" %) 430 -Returns found question details. 423 +Found users returned with the demo field requested in return parameter in json format. 431 431 ))) 432 432 433 433 434 434 435 435 (% class="western" %) 436 -**POST method should be used to create questions. Thedata that is sent should be in JSON format and of type questions as described in references section.Questions object will only need a choices block if the question is a multiple choice question (type=4 or 5 or 6).**429 +**POST method should be used to create users.** 437 437 438 438 (% class="wrapped" %) 439 439 |((( ... ... @@ -448,46 +448,49 @@ 448 448 ))) 449 449 |((( 450 450 (% class="western" %) 451 - Questions444 +Users 452 452 )))|((( 453 453 (% class="western" %) 454 - Questions447 +Users 455 455 )))|((( 456 456 (% class="western" %) 457 - Thisdefinesthequestioncontentsandpossibleresponses.450 +Users object that contains information about user to create. PartnerId Needs to be specified. 458 458 ))) 459 - 460 -(% class="wrapped" %) 461 461 |((( 462 462 (% class="western" %) 463 - **Response**454 +Transactions 464 464 )))|((( 465 465 (% class="western" %) 466 - **Type**457 +Transactions 467 467 )))|((( 468 468 (% class="western" %) 469 - **Description**460 +(Array of) transaction object specifying parts of the transaction to be added to the new user. UserId and TransactionId, SubscriptionType will be ignored if specified. As this is new user and new transaction is being added. 470 470 ))) 471 471 |((( 472 472 (% class="western" %) 473 - QuestionId464 +DedupeColumns 474 474 )))|((( 475 475 (% class="western" %) 476 - Int467 +String 477 477 )))|((( 478 478 (% class="western" %) 479 - ReturnsONEcountquestion idonsuccessful creationofthe question.470 +CSV of question id's that should be considered to find duplicate. 480 480 ))) 481 - 482 - 483 - 472 +|((( 484 484 (% class="western" %) 485 -PUT method should be used to update question. 474 +Return 475 +)))|((( 476 +(% class="western" %) 477 +String 478 +)))|((( 479 +(% class="western" %) 480 +CSV of ONEcount QuestionId's requested back in Users object in response. 481 +))) 486 486 487 487 (% class="wrapped" %) 488 488 |((( 489 489 (% class="western" %) 490 -**Re quest**486 +**Response** 491 491 )))|((( 492 492 (% class="western" %) 493 493 **Type** ... ... @@ -497,19 +497,24 @@ 497 497 ))) 498 498 |((( 499 499 (% class="western" %) 500 -Questions 496 +Users 497 +)))|=((( 498 +(% class="western" align="left" %) 499 +Users 501 501 )))|((( 502 502 (% class="western" %) 503 -Questions 504 -)))|((( 505 -(% class="western" %) 506 -This defines the question contents and responses. 502 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 507 507 ))) 508 508 505 + 506 + 507 +(% class="western" %) 508 +**PUT method should be used to update users.** 509 + 509 509 (% class="wrapped" %) 510 510 |((( 511 511 (% class="western" %) 512 -**Re sponse**513 +**Request** 513 513 )))|((( 514 514 (% class="western" %) 515 515 **Type** ... ... @@ -519,168 +519,174 @@ 519 519 ))) 520 520 |((( 521 521 (% class="western" %) 522 - QuestionId523 +Users 523 523 )))|((( 524 524 (% class="western" %) 525 - Int526 +Users 526 526 )))|((( 527 527 (% class="western" %) 528 -Returns ONEcountquestion idon successful updateofthequestion.529 +Users object with update fields. Return property has csv of questions id requested back in Users object. 529 529 ))) 530 - 531 +|((( 531 531 (% class="western" %) 532 - 533 - 533 +Return 534 +)))|((( 534 534 (% class="western" %) 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 - 536 +String 537 +)))|((( 539 539 (% class="western" %) 540 -{ 541 - 539 +CSV of ONEcount QuestionId's requested back in Users object in response 540 +))) 541 +|((( 542 542 (% class="western" %) 543 - "result": {544 - 543 +RequestDate 544 +)))|((( 545 545 (% class="western" %) 546 - "success": "1",547 - 546 +Date 547 +)))|((( 548 548 (% class="western" %) 549 -"error": { 549 +RequestDate to use for the demo update. If not provided current date will be used. 550 +))) 550 550 552 +(% class="wrapped" %) 553 +|((( 551 551 (% class="western" %) 552 - "code": "0",553 - 555 +**Response** 556 +)))|((( 554 554 (% class="western" %) 555 - "message": ""556 - 558 +**Type** 559 +)))|((( 557 557 (% class="western" %) 558 -} 559 - 561 +**Description** 562 +))) 563 +|((( 560 560 (% class="western" %) 561 -}, 562 - 565 +Users 566 +)))|=((( 567 +(% class="western" align="left" %) 568 +Users 569 +)))|((( 563 563 (% class="western" %) 564 -"Questions": [ 571 +Updated user returned with the demo field requested in return parameter in json format. 572 +))) 565 565 566 566 (% class="western" %) 567 - {575 + 568 568 569 569 (% class="western" %) 570 - "Id":"6",578 + 571 571 572 572 (% class="western" %) 573 - "Text":"FirstName",581 +Create new users. Here in this example the JSON for request is passed in userFile.json file. 574 574 575 -(% class="western" %) 576 -"Type": "1", 583 +{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}} 577 577 578 578 (% class="western" %) 579 -"Alias": "FName" 586 +** 587 +** 580 580 581 581 (% class="western" %) 582 -} 590 +** 591 +** 583 583 584 -(% class="western" %) 585 -] 593 + 586 586 587 587 (% class="western" %) 588 - }596 +**COMPONENT: Questions** 589 589 590 590 (% class="western" %) 599 +All data fields in ONEcount are made up of questions. Questions are configurable on a per-client basis, and no two customer installations will have the same question (ie., field) layout. Therefore, before querying or updating any ONEcount installation, you'll need to get an understanding of the question layout of the installation. This API segment will allow you to query ONEcount to determine the question layout for the installation. It will also allow you to create new questions within the system. This resource does not allow you to update the data for a specific user (see User section). 591 591 592 -**RESOURCE: Users** 593 - 594 594 (% class="western" %) 595 - Users meansthecustomers of yoursystem.Users canbe added,updatedand searchedforusingthe usersresourcefrom the api.Forlookup,Ifa return parameterisspecifiedUsersbjectwillhavethosefields. IfnothingispecifiedbydefaultonlyUserIdis returned.602 +This resource is for manipulating questions resource. Questions in ONEcount means any question that is asked to the subscriber. It could be any questions that appears on customer forms or print forms that gets answered by a subscriber. Questions api call will allow creation, update and search of question in ONEcount. To add a new questions to the system you'll make a POST api call to the questions resource. 596 596 597 597 (% class="western" %) 598 - Additionally(Array of)transactionobject specifyingpartsof thetransactiontobeaddedtothenewusercan be specified.UserId,TransactionIdand SubscriptionTypewillbeignoredifspecifiedforthiscase.Ashisisnewuserand newtransactionisbeingadded.605 +The data that is sent should be in JSON format and of type questions as described in References section. The type property of questions object is described below. Questions object will only need a choices block if the question is a multiple choice question(type=4 or 5 or 6) 599 599 600 600 (% class="western" %) 601 - In this casethe provideddemographicinformationin users objectwillbe usedto create a new user in ONEcount and then a responsewill be generated. Before creating a new user,a check for duplicate will be performedbased on Dedupecolumnsandif found, and error code will be generated.608 +There can be 6 types of questions: 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 - 615 615 (% class="wrapped" %) 616 616 |((( 617 -(% class="western" %) 618 -** Method**612 +(% class="western" align="center" %) 613 +**Type** 619 619 )))|((( 620 620 (% class="western" %) 621 -**Url** 616 +**Description** 617 +))) 618 +|((( 619 +(% class="western" align="center" %) 620 +1 622 622 )))|((( 623 623 (% class="western" %) 624 - **Action**623 +Textbox type questions or short response type question. The response length needs to be less than 255 characters. 625 625 ))) 626 626 |((( 627 -(% class="western" %) 628 - GET626 +(% class="western" align="center" %) 627 +2 629 629 )))|((( 630 630 (% class="western" %) 631 -/users 630 +Textarea type question or long response type question. 631 +))) 632 +|((( 633 +(% class="western" align="center" %) 634 +3 632 632 )))|((( 633 633 (% class="western" %) 634 - Get users datalimiting25.637 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 635 635 ))) 636 636 |((( 640 +(% class="western" align="center" %) 641 +4 642 +)))|((( 637 637 (% class="western" %) 638 -GET 644 +Select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question. 645 +))) 646 +|((( 647 +(% class="western" align="center" %) 648 +5 639 639 )))|((( 640 640 (% class="western" %) 641 -/users/1 651 +Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question. 652 +))) 653 +|((( 654 +(% class="western" align="center" %) 655 +6 642 642 )))|((( 643 643 (% class="western" %) 644 - Getdataforuserid1.The useridcan be anumericvalueorahash658 +Checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question. 645 645 ))) 660 + 661 +(% class="wrapped" %) 646 646 |((( 647 647 (% class="western" %) 648 - GET664 +**Method** 649 649 )))|((( 650 650 (% class="western" %) 651 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2667 +**Url** 652 652 )))|((( 653 653 (% class="western" %) 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. 670 +**Action** 658 658 ))) 659 659 |((( 660 660 (% class="western" %) 661 - POST674 +GET 662 662 )))|((( 663 663 (% class="western" %) 664 -/u sers677 +/questions 665 665 )))|((( 666 666 (% class="western" %) 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. 680 +List all questions 671 671 ))) 672 672 |((( 673 673 (% class="western" %) 674 - PUT684 +GET 675 675 )))|((( 676 676 (% class="western" %) 677 -/u sers/1687 +/questions/1 678 678 )))|((( 679 679 (% class="western" %) 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. 690 +Returns question id 1 684 684 ))) 685 685 |((( 686 686 (% class="western" %) ... ... @@ -687,10 +687,10 @@ 687 687 GET 688 688 )))|((( 689 689 (% class="western" %) 690 -/u sers/1/partners/2697 +/questions/lookup?Text=Email 691 691 )))|((( 692 692 (% class="western" %) 693 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.700 +Returns all questions with “Email" in question text 694 694 ))) 695 695 |((( 696 696 (% class="western" %) ... ... @@ -697,40 +697,32 @@ 697 697 POST 698 698 )))|((( 699 699 (% class="western" %) 700 -/u sers/login707 +/questions 701 701 )))|((( 702 702 (% class="western" %) 703 -C heckto seeuserexistwithusername/email and password.710 +Create a new question 704 704 705 705 (% class="western" %) 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 - 713 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 714 +))) 715 +|((( 708 708 (% class="western" %) 709 - Example:710 - 717 +PUT 718 +)))|((( 711 711 (% class="western" %) 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 - 720 +/questions 721 +)))|((( 714 714 (% class="western" %) 715 - OR723 +Update a question 716 716 717 717 (% class="western" %) 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. 726 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 728 728 ))) 729 729 730 730 731 731 732 732 (% class="western" %) 733 -**GET method shouldbe used to lookup users.**732 +**GET method can be used to lookup questions.** 734 734 735 735 (% class="wrapped" %) 736 736 |((( ... ... @@ -751,19 +751,18 @@ 751 751 String 752 752 )))|((( 753 753 (% class="western" %) 754 -URL encoded key value string parameters for the lookup. Returnpropertyhascsvof questionsid requestedbackinUsers object.753 +URL encoded key value string parameters for the question that a user is trying to search. 755 755 756 756 (% class="western" %) 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"]]756 +Params: 758 758 759 759 (% class="western" %) 760 -return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 759 +Text: Word or phrase that should be present in the question text (String) 760 + 761 +(% class="western" %) 762 +Type: Look up the question type. 761 761 ))) 762 762 763 - 764 - 765 - 766 - 767 767 (% class="wrapped" %) 768 768 |((( 769 769 (% class="western" %) ... ... @@ -777,19 +777,19 @@ 777 777 ))) 778 778 |((( 779 779 (% class="western" %) 780 -Users 781 -)))|=((( 782 -(% class="western" align="left" %) 783 -Users 778 +Questions 784 784 )))|((( 785 785 (% class="western" %) 786 -Found users returned with the demo field requested in return parameter in json format. 781 +Questions 782 +)))|((( 783 +(% class="western" %) 784 +Returns found question details. 787 787 ))) 788 788 789 789 790 790 791 791 (% class="western" %) 792 -**POST method should be used to create users.** 790 +**POST method should be used to create questions. The data that is sent should be in JSON format and of type questions as described in references section. Questions object will only need a choices block if the question is a multiple choice question (type=4 or 5 or 6).** 793 793 794 794 (% class="wrapped" %) 795 795 |((( ... ... @@ -804,49 +804,46 @@ 804 804 ))) 805 805 |((( 806 806 (% class="western" %) 807 - Users805 +Questions 808 808 )))|((( 809 809 (% class="western" %) 810 - Users808 +Questions 811 811 )))|((( 812 812 (% class="western" %) 813 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.811 +This defines the question contents and possible responses. 814 814 ))) 813 + 814 +(% class="wrapped" %) 815 815 |((( 816 816 (% class="western" %) 817 - Transactions817 +**Response** 818 818 )))|((( 819 819 (% class="western" %) 820 -T ransactions820 +**Type** 821 821 )))|((( 822 822 (% class="western" %) 823 - (Array of) transaction objectspecifying parts of the transaction to be added to the new user. UserId and TransactionId, SubscriptionType will be ignored if specified. As this is new user and new transaction is being added.823 +**Description** 824 824 ))) 825 825 |((( 826 826 (% class="western" %) 827 - DedupeColumns827 +QuestionId 828 828 )))|((( 829 829 (% class="western" %) 830 - String830 +Int 831 831 )))|((( 832 832 (% class="western" %) 833 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.833 +Returns ONEcount question id on successful creation of the question. 834 834 ))) 835 -|((( 835 + 836 + 837 + 836 836 (% class="western" %) 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 -))) 839 +PUT method should be used to update question. 845 845 846 846 (% class="wrapped" %) 847 847 |((( 848 848 (% class="western" %) 849 -**Re sponse**844 +**Request** 850 850 )))|((( 851 851 (% class="western" %) 852 852 **Type** ... ... @@ -856,24 +856,19 @@ 856 856 ))) 857 857 |((( 858 858 (% class="western" %) 859 -Users 860 -)))|=((( 861 -(% class="western" align="left" %) 862 -Users 854 +Questions 863 863 )))|((( 864 864 (% class="western" %) 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. 857 +Questions 858 +)))|((( 859 +(% class="western" %) 860 +This defines the question contents and responses. 866 866 ))) 867 867 868 - 869 - 870 -(% class="western" %) 871 -**PUT method should be used to update users.** 872 - 873 873 (% class="wrapped" %) 874 874 |((( 875 875 (% class="western" %) 876 -**Re quest**866 +**Response** 877 877 )))|((( 878 878 (% class="western" %) 879 879 **Type** ... ... @@ -883,72 +883,81 @@ 883 883 ))) 884 884 |((( 885 885 (% class="western" %) 886 - Users876 +QuestionId 887 887 )))|((( 888 888 (% class="western" %) 889 - Users879 +Int 890 890 )))|((( 891 891 (% class="western" %) 892 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.882 +Returns ONEcount question id on successful update of the question. 893 893 ))) 894 - |(((884 + 895 895 (% class="western" %) 896 - Return897 - )))|(((886 + 887 + 898 898 (% class="western" %) 899 -String 900 -)))|((( 889 +Example: Get list of questions from api which has FirstName in text 890 + 891 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 892 + 901 901 (% class="western" %) 902 -CSV of ONEcount QuestionId's requested back in Users object in response 903 -))) 904 -|((( 894 +{ 895 + 905 905 (% class="western" %) 906 - RequestDate907 - )))|(((897 +"result": { 898 + 908 908 (% class="western" %) 909 - Date910 - )))|(((900 +"success": "1", 901 + 911 911 (% class="western" %) 912 -RequestDate to use for the demo update. If not provided current date will be used. 913 -))) 903 +"error": { 914 914 915 -(% class="wrapped" %) 916 -|((( 917 917 (% class="western" %) 918 - **Response**919 - )))|(((906 +"code": "0", 907 + 920 920 (% class="western" %) 921 - **Type**922 - )))|(((909 +"message": "" 910 + 923 923 (% class="western" %) 924 -**Description** 925 -))) 926 -|((( 912 +} 913 + 927 927 (% class="western" %) 928 -Users 929 -)))|=((( 930 -(% class="western" align="left" %) 931 -Users 932 -)))|((( 915 +}, 916 + 933 933 (% class="western" %) 934 -Updated user returned with the demo field requested in return parameter in json format. 935 -))) 918 +"Questions": [ 936 936 937 937 (% class="western" %) 938 - 921 +{ 939 939 940 940 (% class="western" %) 941 - 924 +"Id": "6", 942 942 943 943 (% class="western" %) 944 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.927 +"Text": "FirstName", 945 945 946 -{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}} 929 +(% class="western" %) 930 +"Type": "1", 947 947 948 948 (% class="western" %) 949 - **Products**933 +"Alias": "FName" 950 950 951 951 (% class="western" %) 936 +} 937 + 938 +(% class="western" %) 939 +] 940 + 941 +(% class="western" %) 942 +} 943 + 944 +(% class="western" %) 945 + 946 + 947 +(% class="western" %) 948 +**COMPONENT: Products** 949 + 950 +(% class="western" %) 952 952 This resource is for manipulating products resource. A product can be created, updated or searched. 953 953 954 954 (% class="wrapped" %) ... ... @@ -1117,7 +1117,7 @@ 1117 1117 Example: 1118 1118 1119 1119 (% class="western" %) 1120 -{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1119 +{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1121 1121 ))) 1122 1122 1123 1123 (% class="wrapped" %) ... ... @@ -1175,7 +1175,7 @@ 1175 1175 **Example**: 1176 1176 1177 1177 (% class="western" %) 1178 -{"Title":"Test123","Description":Testss"," Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}1177 +{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17} 1179 1179 ))) 1180 1180 1181 1181 (% class="wrapped" %) ... ... @@ -1203,7 +1203,7 @@ 1203 1203 1204 1204 1205 1205 (% class="western" %) 1206 -**Terms** 1205 +**COMPONENT: Terms** 1207 1207 1208 1208 (% class="western" %) 1209 1209 This resource is for manipulating terms resource. A term can be created, updated or searched. ... ... @@ -1434,9 +1434,45 @@ 1434 1434 1435 1435 1436 1436 (% class="western" %) 1437 -**Resources** 1436 +**COMPONENT: Resources** 1438 1438 1439 1439 (% class="western" %) 1439 +Resources are the available entities that can be accessed/modified via API. Each resource can be created, updated or requested by using the corresponding http method described above. 1440 + 1441 +* ((( 1442 +(% class="western" %) 1443 +questions 1444 +))) 1445 +* ((( 1446 +(% class="western" %) 1447 +users 1448 +))) 1449 +* ((( 1450 +(% class="western" %) 1451 +products 1452 +))) 1453 +* ((( 1454 +(% class="western" %) 1455 +terms 1456 +))) 1457 +* ((( 1458 +(% class="western" %) 1459 +resources 1460 +))) 1461 +* ((( 1462 +(% class="western" %) 1463 +sources 1464 +))) 1465 +* ((( 1466 +(% class="western" %) 1467 +transactions 1468 +))) 1469 + 1470 +(% class="western" %) 1471 +** 1472 +** 1473 + 1474 +(% class="western" %) 1440 1440 This resource is for manipulating resources resource. A resource can be created, updated or searched. 1441 1441 1442 1442 (% class="wrapped" %) ... ... @@ -1494,7 +1494,7 @@ 1494 1494 1495 1495 1496 1496 (% class="western" %) 1497 -**GET method should be used to lookup products.**1532 +**GET method should be used to lookup resources.** 1498 1498 1499 1499 (% class="wrapped" %) 1500 1500 |((( ... ... @@ -1549,7 +1549,7 @@ 1549 1549 1550 1550 1551 1551 (% class="western" %) 1552 -**POST method should be used to create products.**1587 +**POST method should be used to create resources.** 1553 1553 1554 1554 (% class="wrapped" %) 1555 1555 |((( ... ... @@ -1573,7 +1573,7 @@ 1573 1573 resource details in json to be sent as post data. Id should not be set. 1574 1574 1575 1575 (% class="western" %) 1576 -**Possible Request Params**: Name, Description, Type, Value 1611 +**Possible Request Params**: Name, Description, Type, Value, FreePass 1577 1577 1578 1578 (% class="western" %) 1579 1579 **Example**: ... ... @@ -1580,6 +1580,15 @@ 1580 1580 1581 1581 (% class="western" %) 1582 1582 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1618 + 1619 +(% class="western" %) 1620 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1621 + 1622 +(% class="western" %) 1623 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1} 1624 + 1625 +(% class="western" %) 1626 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1583 1583 ))) 1584 1584 1585 1585 (% class="wrapped" %) ... ... @@ -1628,16 +1628,25 @@ 1628 1628 Resource 1629 1629 )))|((( 1630 1630 (% class="western" %) 1631 -Resource details to be updated in 1675 +Resource details to be updated injsonformat to be sent withrequest. Id property needs to be set to identify the resource to be updated. 1632 1632 1633 1633 (% class="western" %) 1634 1634 1635 1635 1636 1636 (% class="western" %) 1637 -Example: 1681 +Examples: 1638 1638 1639 1639 (% class="western" %) 1640 1640 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1685 + 1686 +(% class="western" %) 1687 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1688 + 1689 +(% class="western" %) 1690 +{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1} 1691 + 1692 +(% class="western" %) 1693 +{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1641 1641 ))) 1642 1642 1643 1643 (% class="wrapped" %) ... ... @@ -1664,49 +1664,17 @@ 1664 1664 1665 1665 1666 1666 1667 -(% class="western" %) 1668 -**Resources** 1720 + 1669 1669 1670 1670 (% 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" %) 1703 1703 1704 1704 1705 1705 (% class="western" %) 1706 -**Sources** 1726 +**COMPONENT: Source Codes 1727 +** 1707 1707 1708 1708 (% class="western" %) 1709 -This resource is for manipulating source sresource. A source can be created, updated or searched.1730 +This resource is for manipulating source code for a resource. A source code can be created, updated or searched. 1710 1710 1711 1711 (% class="wrapped" %) 1712 1712 |((( ... ... @@ -1922,7 +1922,7 @@ 1922 1922 1923 1923 1924 1924 (% class="western" %) 1925 -**Transactions** 1946 +**COMPONENT: Transactions** 1926 1926 1927 1927 (% class="western" %) 1928 1928 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -2090,14 +2090,9 @@ 2090 2090 2091 2091 2092 2092 2093 - 2094 - 2095 - 2096 - 2097 - 2098 - 2099 2099 (% class="western" %) 2100 -**Stats** 2115 +**COMPONENT: Leads 2116 +** 2101 2101 2102 2102 (% class="western" %) 2103 2103 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. ... ... @@ -2118,7 +2118,8 @@ 2118 2118 2119 2119 2120 2120 (% class="western" %) 2121 -**Telemarketing** 2137 +**Telemarketing Leads 2138 +** 2122 2122 2123 2123 (% class="western" %) 2124 2124 ... ... @@ -2278,7 +2278,7 @@ 2278 2278 2279 2279 2280 2280 (% class="western" %) 2281 -**R eference**2298 +**API REFERENCE** 2282 2282 2283 2283 (% class="western" %) 2284 2284 **Type: Questions** ... ... @@ -2957,14 +2957,30 @@ 2957 2957 )))|((( 2958 2958 (% class="western" %) 2959 2959 String 2977 + 2978 +(% class="western" %) 2979 +or 2980 + 2981 +(% class="western" %) 2982 +Array 2960 2960 )))|((( 2961 2961 (% class="western" %) 2962 -Value of Resource Type .2985 +Value of Resource Type: 2963 2963 2964 2964 (% class="western" %) 2965 - Example:ifthe Type sent is3thenValuewouldbe**/digital/**2988 +When requesting a resource (GET), you should expect a string if there is only one value. If there are multiple values, you should expect an array. 2966 2966 2967 2967 (% class="western" %) 2991 +For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests. 2992 + 2993 +(% class="western" %) 2994 +Example : 2995 + 2996 +(% class="western" %) 2997 +if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** ** 2998 +**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"] 2999 + 3000 +(% class="western" %) 2968 2968 For Function type resource leave it blank. 2969 2969 ))) 2970 2970 |((( ... ... @@ -2977,6 +2977,16 @@ 2977 2977 (% class="western" %) 2978 2978 Default limit is 25 but all the data needs to be pulled then pass limit=0. 2979 2979 ))) 3013 +|(% colspan="1" %)(% colspan="1" %) 3014 +((( 3015 +FreePass 3016 +)))|(% colspan="1" %)(% colspan="1" %) 3017 +((( 3018 +Int 3019 +)))|(% colspan="1" %)(% colspan="1" %) 3020 +((( 3021 +Default value is 0. This parameter is used to provide access to protected content. 3022 +))) 2980 2980 2981 2981 2982 2982
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 - 35390091 +4882495 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/ 3539009/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/4882495/ONEcount API Documentation