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)
-
Attachments (0 modified, 0 added, 4 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -O LD-ONEcountAPIDocumentation1 +OC-API-04032017 - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Admin1 +XWiki.sonish - Content
-
... ... @@ -1,8 +1,56 @@ 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 + 1 1 (% class="western" %) 2 2 **Introduction** 3 3 4 4 (% class="western" %) 5 -ONEcount REST API i sdesignedtolowyoutodirectlymanipulate theunderlyingdata within theONEcountpplication. This API can be used to lookup, create and update different ONEcountdata components which are listed below.53 +ONEcount REST API provides different functionality to accomplish many integration related tasks. This 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: ... ... @@ -9,12 +9,15 @@ 9 9 10 10 1. ((( 11 11 (% class="western" %) 12 -**GET** - Used for lookup of resourcesresources 13 -))) 60 +**GET** - Used for lookup of resources 61 + 62 +* ((( 14 14 1. ((( 15 15 (% class="western" %) 16 16 **PUT** - Used to update a resource 17 17 ))) 67 +))) 68 +))) 18 18 1. ((( 19 19 (% class="western" %) 20 20 **POST** - Used to create a new resource ... ... @@ -21,54 +21,178 @@ 21 21 ))) 22 22 23 23 (% class="western" %) 24 - Specifically, theONEcount API providesto thefollowing components:75 +ONEcount API provides following functionalities: 25 25 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 -\\\\\\ 77 +1. ((( 78 +(% class="western" %) 79 +**Lookup** 58 58 81 +* 82 + 59 59 (% class="western" %) 60 - **AccessingAPI**84 +User lookup 61 61 86 +* 87 + 62 62 (% class="western" %) 63 - **RESTAPI URL**: [[https:~~/~~/api.onecount.net/v2/>>url:https://api.onecount.net/v2/||shape="rect"]]89 +Transaction lookup 64 64 91 +* 92 + 65 65 (% class="western" %) 66 - **Appkey**:THIS WILL BE PROVIDED TO YOU94 +Question lookup 67 67 96 +* 97 + 68 68 (% class="western" %) 69 - **~**99 +Source code lookup 70 70 101 +* 102 + 71 71 (% 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" %) 72 72 Your HTTP requests to a REST API resource should contain the following information: 73 73 74 74 * ((( ... ... @@ -89,12 +89,9 @@ 89 89 ))) 90 90 91 91 (% class="western" %) 92 - \\267 +**Request** 93 93 94 94 (% class="western" %) 95 -**General API Usage** 96 - 97 -(% class="western" %) 98 98 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. 99 99 100 100 (% class="western" %) ... ... @@ -101,7 +101,7 @@ 101 101 For lookup, the parameter list will be part of the request url. 102 102 103 103 (% class="western" %) 104 - \\276 + 105 105 106 106 (% class="western" %) 107 107 **Response** ... ... @@ -164,7 +164,7 @@ 164 164 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. 165 165 166 166 (% class="western" %) 167 - \\339 + 168 168 169 169 (% class="western" %) 170 170 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. ... ... @@ -220,102 +220,136 @@ 220 220 ]}]}}}} 221 221 222 222 (% class="western" %) 223 - \\395 + 224 224 225 225 (% class="western" %) 226 -** ~**398 +**Resources** 227 227 228 -**COMPONENT: Users** 229 - 230 230 (% class="western" %) 231 - Usersmeansthecustomersof your system. Userscan be added, updated andsearchedforusing theusers resourcefromthe api.For lookup, Ifa returnparameter isspecifiedUsers objectwillhavethosefields. If nothingis specifiedby defaultnly UserIdisturned.401 +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. 232 232 403 +* ((( 233 233 (% class="western" %) 234 -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. 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 +))) 235 235 236 236 (% class="western" %) 237 - In this case the provided demographic information inusersobjectwill be used tocreate anew 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.433 +**Questions** 238 238 239 239 (% class="western" %) 240 - If username andpasswordis not one oftheparametersbeingpassed,thenarandomusername andpasswordwillbegeneratedfortheuserwhilecreatinghis useraccount inONEcount.436 +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. 241 241 242 242 (% class="western" %) 243 - Returnparameterwillhavecommaseparatedlist of questionIds thatis requestedback fromtheAPI.439 +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) 244 244 245 245 (% class="western" %) 246 - Returnisanoptional parameterinrequest. If return isnotrequested then by default, only UserId (which is ONEcount ID) will be returned in the Users object.442 +There can be 6 types of questions: 247 247 248 -\\ 249 - 250 250 (% class="wrapped" %) 251 251 |((( 252 -(% class="western" %) 253 -** Method**446 +(% class="western" align="center" %) 447 +**Type** 254 254 )))|((( 255 255 (% class="western" %) 256 -**Url** 450 +**Description** 451 +))) 452 +|((( 453 +(% class="western" align="center" %) 454 +1 257 257 )))|((( 258 258 (% class="western" %) 259 - **Action**457 +Textbox type questions or short response type question. The response length needs to be less than 255 characters. 260 260 ))) 261 261 |((( 262 -(% class="western" %) 263 - GET460 +(% class="western" align="center" %) 461 +2 264 264 )))|((( 265 265 (% class="western" %) 266 -/users 464 +Textarea type question or long response type question. 465 +))) 466 +|((( 467 +(% class="western" align="center" %) 468 +3 267 267 )))|((( 268 268 (% class="western" %) 269 - Get users datalimiting25.471 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 270 270 ))) 271 271 |((( 474 +(% class="western" align="center" %) 475 +4 476 +)))|((( 272 272 (% class="western" %) 273 -GET 478 +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. 479 +))) 480 +|((( 481 +(% class="western" align="center" %) 482 +5 274 274 )))|((( 275 275 (% class="western" %) 276 -/users/<ocid or ocid_hash> 485 +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. 486 +))) 487 +|((( 488 +(% class="western" align="center" %) 489 +6 277 277 )))|((( 278 278 (% class="western" %) 279 - Getdataforuserid1.The useridcan be anumericvalueorahash492 +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. 280 280 ))) 494 + 495 +(% class="wrapped" %) 281 281 |((( 282 282 (% class="western" %) 283 - GET498 +**Method** 284 284 )))|((( 285 285 (% class="western" %) 286 - /users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2501 +**Url** 287 287 )))|((( 288 288 (% class="western" %) 289 -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. 290 - 291 -(% class="western" %) 292 -Return parameter defines a csv of question id that are requested back in response. 504 +**Action** 293 293 ))) 294 294 |((( 295 295 (% class="western" %) 296 - POST508 +GET 297 297 )))|((( 298 298 (% class="western" %) 299 -/u sers511 +/questions 300 300 )))|((( 301 301 (% class="western" %) 302 -Create a new users 303 - 304 -(% class="western" %) 305 -Parameters required to create the user needs to be sent as post data in JSON format. 514 +List all questions 306 306 ))) 307 307 |((( 308 308 (% class="western" %) 309 - PUT518 +GET 310 310 )))|((( 311 311 (% class="western" %) 312 -/u sers/1521 +/questions/1 313 313 )))|((( 314 314 (% class="western" %) 315 -Update user id 1. The user id can be a numeric value or a hash 316 - 317 -(% class="western" %) 318 -Parameters required to update the user needs to be sent as post data in JSON format. 524 +Returns question id 1 319 319 ))) 320 320 |((( 321 321 (% class="western" %) ... ... @@ -322,10 +322,10 @@ 322 322 GET 323 323 )))|((( 324 324 (% class="western" %) 325 -/u sers/1/partners/2531 +/questions/lookup?Text=Email 326 326 )))|((( 327 327 (% class="western" %) 328 - Getserid 1 andpartnerid 2'sONEcount hash.Theuseridcanbe a numeric valueora hash.534 +Returns all questions with “Email" in question text 329 329 ))) 330 330 |((( 331 331 (% class="western" %) ... ... @@ -332,40 +332,32 @@ 332 332 POST 333 333 )))|((( 334 334 (% class="western" %) 335 -/u sers/login541 +/questions 336 336 )))|((( 337 337 (% class="western" %) 338 -C heckto seeuserexistwithusername/email and password.544 +Create a new question 339 339 340 340 (% class="western" %) 341 -Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param. 342 - 547 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 548 +))) 549 +|((( 343 343 (% class="western" %) 344 - Example:345 - 551 +PUT 552 +)))|((( 346 346 (% class="western" %) 347 - {"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"}348 - 554 +/questions 555 +)))|((( 349 349 (% class="western" %) 350 - OR557 +Update a question 351 351 352 352 (% class="western" %) 353 -{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 354 - 355 -(% class="western" %) 356 -OR 357 - 358 -(% class="western" %) 359 -{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 360 - 361 -(% class="western" %) 362 -**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found. 560 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 363 363 ))) 364 364 365 - \\563 + 366 366 367 367 (% class="western" %) 368 -**GET method shouldbe used to lookup users.**566 +**GET method can be used to lookup questions.** 369 369 370 370 (% class="wrapped" %) 371 371 |((( ... ... @@ -386,22 +386,18 @@ 386 386 String 387 387 )))|((( 388 388 (% class="western" %) 389 -URL encoded key value string parameters for the lookup. Returnpropertyhascsvof questionsid requestedbackinUsers object.587 +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"]]590 +Params: 393 393 394 394 (% class="western" %) 395 - return:csvofquestionidthatisrequested back. TheUsersobjectreturned will onlyhavethesepropertiesplus UserId(String)593 +Text: Word or phrase that should be present in the question text (String) 396 396 397 397 (% class="western" %) 398 - If returnis notprovided,allthedemographicswillbe returned.596 +Type: Look up the question type. 399 399 ))) 400 400 401 -\\ 402 - 403 -\\ 404 - 405 405 (% class="wrapped" %) 406 406 |((( 407 407 (% class="western" %) ... ... @@ -415,45 +415,19 @@ 415 415 ))) 416 416 |((( 417 417 (% class="western" %) 418 -Users 419 -)))|=((( 420 -(% class="western" align="left" %) 421 -Users 612 +Questions 422 422 )))|((( 423 423 (% class="western" %) 424 -Found users returned with the demo field requested in return parameter in json format 615 +Questions 616 +)))|((( 617 +(% class="western" %) 618 +Returns found question details. 425 425 ))) 426 426 427 - \\621 + 428 428 429 -**Sample response for /users/(% style="color: rgb(80,80,80);" %)<OCID or ocid_hash>(%%)** 430 - 431 -Along with the demo in json format, the active packages and products of the user referred to as products and resources respectively are also returned. 432 - 433 -(% class="relative-table wrapped" 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 -(% class="wrapped" %) 446 -|=((( 447 -(% class="content-wrapper" %) 448 -((( 449 -[[image:attach:Screen Shot 2020-02-26 at 11.22.13 AM.png||height="250"]] 450 -))) 451 -))) 452 - 453 -\\ 454 - 455 455 (% class="western" %) 456 -**POST method should be used to create users.** 624 +**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).** 457 457 458 458 (% class="wrapped" %) 459 459 |((( ... ... @@ -468,49 +468,46 @@ 468 468 ))) 469 469 |((( 470 470 (% class="western" %) 471 - Users639 +Questions 472 472 )))|((( 473 473 (% class="western" %) 474 - Users642 +Questions 475 475 )))|((( 476 476 (% class="western" %) 477 - Users object that containsinformationabout userto create.PartnerIdNeeds tocified.645 +This defines the question contents and possible responses. 478 478 ))) 647 + 648 +(% class="wrapped" %) 479 479 |((( 480 480 (% class="western" %) 481 - Transactions651 +**Response** 482 482 )))|((( 483 483 (% class="western" %) 484 -T ransactions654 +**Type** 485 485 )))|((( 486 486 (% class="western" %) 487 - (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.657 +**Description** 488 488 ))) 489 489 |((( 490 490 (% class="western" %) 491 - DedupeColumns661 +QuestionId 492 492 )))|((( 493 493 (% class="western" %) 494 - String664 +Int 495 495 )))|((( 496 496 (% class="western" %) 497 - CSVofquestion id'sthatshouldbeconsideredto findduplicate.667 +Returns ONEcount question id on successful creation of the question. 498 498 ))) 499 -|((( 669 + 670 + 671 + 500 500 (% class="western" %) 501 -Return 502 -)))|((( 503 -(% class="western" %) 504 -String 505 -)))|((( 506 -(% class="western" %) 507 -CSV of ONEcount QuestionId's requested back in Users object in response. 508 -))) 673 +PUT method should be used to update question. 509 509 510 510 (% class="wrapped" %) 511 511 |((( 512 512 (% class="western" %) 513 -**Re sponse**678 +**Request** 514 514 )))|((( 515 515 (% class="western" %) 516 516 **Type** ... ... @@ -520,24 +520,19 @@ 520 520 ))) 521 521 |((( 522 522 (% class="western" %) 523 -Users 524 -)))|=((( 525 -(% class="western" align="left" %) 526 -Users 688 +Questions 527 527 )))|((( 528 528 (% class="western" %) 529 -Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 691 +Questions 692 +)))|((( 693 +(% class="western" %) 694 +This defines the question contents and responses. 530 530 ))) 531 531 532 -\\ 533 - 534 -(% class="western" %) 535 -**PUT method should be used to update users.** 536 - 537 537 (% class="wrapped" %) 538 538 |((( 539 539 (% class="western" %) 540 -**Re quest**700 +**Response** 541 541 )))|((( 542 542 (% class="western" %) 543 543 **Type** ... ... @@ -547,172 +547,168 @@ 547 547 ))) 548 548 |((( 549 549 (% class="western" %) 550 - Users710 +QuestionId 551 551 )))|((( 552 552 (% class="western" %) 553 - Users713 +Int 554 554 )))|((( 555 555 (% class="western" %) 556 - Users object with update fields.Returnproperty has csvofquestionsidrequestedbackin Usersobject.716 +Returns ONEcount question id on successful update of the question. 557 557 ))) 558 - |(((718 + 559 559 (% class="western" %) 560 - Return561 - )))|(((720 + 721 + 562 562 (% class="western" %) 563 -String 564 -)))|((( 723 +Example: Get list of questions from api which has FirstName in text 724 + 725 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 726 + 565 565 (% class="western" %) 566 -CSV of ONEcount QuestionId's requested back in Users object in response 567 -))) 568 -|((( 728 +{ 729 + 569 569 (% class="western" %) 570 - RequestDate571 - )))|(((731 +"result": { 732 + 572 572 (% class="western" %) 573 - Date574 - )))|(((734 +"success": "1", 735 + 575 575 (% class="western" %) 576 -RequestDate to use for the demo update. If not provided current date will be used. 577 -))) 737 +"error": { 578 578 579 -(% class="wrapped" %) 580 -|((( 581 581 (% class="western" %) 582 - **Response**583 - )))|(((740 +"code": "0", 741 + 584 584 (% class="western" %) 585 - **Type**586 - )))|(((743 +"message": "" 744 + 587 587 (% class="western" %) 588 -**Description** 589 -))) 590 -|((( 746 +} 747 + 591 591 (% class="western" %) 592 -Users 593 -)))|=((( 594 -(% class="western" align="left" %) 595 -Users 596 -)))|((( 749 +}, 750 + 597 597 (% class="western" %) 598 -Updated user returned with the demo field requested in return parameter in json format. 599 -))) 752 +"Questions": [ 600 600 601 601 (% class="western" %) 602 - \\755 +{ 603 603 604 604 (% class="western" %) 605 - \\758 +"Id": "6", 606 606 607 607 (% class="western" %) 608 - Createnew users. Here inthis examplethe JSON for request is passed in userFile.json file.761 +"Text": "FirstName", 609 609 610 -{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}} 763 +(% class="western" %) 764 +"Type": "1", 611 611 612 612 (% class="western" %) 613 - **~**767 +"Alias": "FName" 614 614 615 615 (% class="western" %) 616 - **~ **770 +} 617 617 618 -\\ 772 +(% class="western" %) 773 +] 619 619 620 620 (% class="western" %) 621 - **COMPONENT: Questions**776 +} 622 622 623 623 (% class="western" %) 624 -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). 625 625 780 +**Users** 781 + 626 626 (% class="western" %) 627 - 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.783 +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. 628 628 629 629 (% class="western" %) 630 - Thedatathatissenthouldbe inJSON formatandof typequestionsasdescribedin Referencessection.Thetypepropertyof questionsobjectisdescribedbelow.Questionsobject willonlyneedachoicesblockifthequestionisamultiplechoicequestion(type=4or5or 6)786 +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. 631 631 632 632 (% class="western" %) 633 - There can be6types ofquestions:789 +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. 634 634 791 +(% class="western" %) 792 +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. 793 + 794 +(% class="western" %) 795 +Return parameter will have the comma separated list of question Ids that is requested back from the API. 796 + 797 +(% class="western" %) 798 +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. 799 + 800 +(% class="western" %) 801 + 802 + 635 635 (% class="wrapped" %) 636 636 |((( 637 -(% class="western" align="center" %) 638 -**Type** 639 -)))|((( 640 640 (% class="western" %) 641 -**Description** 642 -))) 643 -|((( 644 -(% class="western" align="center" %) 645 -1 806 +**Method** 646 646 )))|((( 647 647 (% class="western" %) 648 -Textbox type questions or short response type question. The response length needs to be less than 255 characters. 649 -))) 650 -|((( 651 -(% class="western" align="center" %) 652 -2 809 +**Url** 653 653 )))|((( 654 654 (% class="western" %) 655 - Textarea type questionor long response type question.812 +**Action** 656 656 ))) 657 657 |((( 658 -(% class="western" align="center"%)659 - 3815 +(% class="western" %) 816 +GET 660 660 )))|((( 661 661 (% class="western" %) 662 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *. 663 -))) 664 -|((( 665 -(% class="western" align="center" %) 666 -4 819 +/users 667 667 )))|((( 668 668 (% class="western" %) 669 - 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.822 +Get users data limiting 25. 670 670 ))) 671 671 |((( 672 -(% class="western" align="center"%)673 - 5825 +(% class="western" %) 826 +GET 674 674 )))|((( 675 675 (% class="western" %) 676 -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. 677 -))) 678 -|((( 679 -(% class="western" align="center" %) 680 -6 829 +/users/1 681 681 )))|((( 682 682 (% class="western" %) 683 - Checkboxtypequestion. This isamultiple choice,multi responsetype question.Whencreating this type of question thechoicesblockalsoneedstobepartof the questions objectthat will hold thepossiblechoicesof the checkbox question.832 +Get data for user id 1. The user id can be a numeric value or a hash 684 684 ))) 685 - 686 -(% class="wrapped" %) 687 687 |((( 688 688 (% class="western" %) 689 - **Method**836 +GET 690 690 )))|((( 691 691 (% class="western" %) 692 - **Url**839 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2 693 693 )))|((( 694 694 (% class="western" %) 695 -**Action** 842 +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. 843 + 844 +(% class="western" %) 845 +Return parameter defines a csv of question id that are requested back in response. 696 696 ))) 697 697 |((( 698 698 (% class="western" %) 699 - GET849 +POST 700 700 )))|((( 701 701 (% class="western" %) 702 -/ questions852 +/users 703 703 )))|((( 704 704 (% class="western" %) 705 -List all questions 855 +Create a new users 856 + 857 +(% class="western" %) 858 +Parameters required to create the user needs to be sent as post data in JSON format. 706 706 ))) 707 707 |((( 708 708 (% class="western" %) 709 - GET862 +PUT 710 710 )))|((( 711 711 (% class="western" %) 712 -/ questions/1865 +/users/1 713 713 )))|((( 714 714 (% class="western" %) 715 -Returns question id 1 868 +Update user id 1. The user id can be a numeric value or a hash 869 + 870 +(% class="western" %) 871 +Parameters required to update the user needs to be sent as post data in JSON format. 716 716 ))) 717 717 |((( 718 718 (% class="western" %) ... ... @@ -719,10 +719,10 @@ 719 719 GET 720 720 )))|((( 721 721 (% class="western" %) 722 -/ questions/lookup?Text=Email878 +/users/1/partners/2 723 723 )))|((( 724 724 (% class="western" %) 725 - Returns allquestionswith“Email"inquestiontext881 +Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash. 726 726 ))) 727 727 |((( 728 728 (% class="western" %) ... ... @@ -729,32 +729,40 @@ 729 729 POST 730 730 )))|((( 731 731 (% class="western" %) 732 -/ questions888 +/users/login 733 733 )))|((( 734 734 (% class="western" %) 735 -C reateanewquestion891 +Check to see user exist with username/email and password. 736 736 737 737 (% class="western" %) 738 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent. 739 -))) 740 -|((( 894 +Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param. 895 + 741 741 (% class="western" %) 742 - PUT743 - )))|(((897 +Example: 898 + 744 744 (% class="western" %) 745 - /questions746 - )))|(((900 +{"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"} 901 + 747 747 (% class="western" %) 748 - Update a question903 +OR 749 749 750 750 (% class="western" %) 751 -JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 906 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 907 + 908 +(% class="western" %) 909 +OR 910 + 911 +(% class="western" %) 912 +{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"} 913 + 914 +(% class="western" %) 915 +**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found. 752 752 ))) 753 753 754 - \\918 + 755 755 756 756 (% class="western" %) 757 -**GET method canbe used to lookupquestions.**921 +**GET method should be used to lookup users.** 758 758 759 759 (% class="wrapped" %) 760 760 |((( ... ... @@ -775,18 +775,19 @@ 775 775 String 776 776 )))|((( 777 777 (% class="western" %) 778 -URL encoded key value string parameters for the question thatauser isryingtosearch.942 +URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object. 779 779 780 780 (% class="western" %) 781 -Params: 945 +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 782 783 783 (% class="western" %) 784 -Text: Word or phrase that should be present in the question text (String) 785 - 786 -(% class="western" %) 787 -Type: Look up the question type. 948 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String) 788 788 ))) 789 789 951 + 952 + 953 + 954 + 790 790 (% class="wrapped" %) 791 791 |((( 792 792 (% class="western" %) ... ... @@ -800,19 +800,19 @@ 800 800 ))) 801 801 |((( 802 802 (% class="western" %) 803 -Questions 968 +Users 969 +)))|=((( 970 +(% class="western" align="left" %) 971 +Users 804 804 )))|((( 805 805 (% class="western" %) 806 -Questions 807 -)))|((( 808 -(% class="western" %) 809 -Returns found question details. 974 +Found users returned with the demo field requested in return parameter in json format. 810 810 ))) 811 811 812 - \\977 + 813 813 814 814 (% class="western" %) 815 -**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).**980 +**POST method should be used to create users.** 816 816 817 817 (% class="wrapped" %) 818 818 |((( ... ... @@ -827,46 +827,49 @@ 827 827 ))) 828 828 |((( 829 829 (% class="western" %) 830 - Questions995 +Users 831 831 )))|((( 832 832 (% class="western" %) 833 - Questions998 +Users 834 834 )))|((( 835 835 (% class="western" %) 836 - Thisdefinesthequestioncontentsandpossibleresponses.1001 +Users object that contains information about user to create. PartnerId Needs to be specified. 837 837 ))) 838 - 839 -(% class="wrapped" %) 840 840 |((( 841 841 (% class="western" %) 842 - **Response**1005 +Transactions 843 843 )))|((( 844 844 (% class="western" %) 845 - **Type**1008 +Transactions 846 846 )))|((( 847 847 (% class="western" %) 848 - **Description**1011 +(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. 849 849 ))) 850 850 |((( 851 851 (% class="western" %) 852 - QuestionId1015 +DedupeColumns 853 853 )))|((( 854 854 (% class="western" %) 855 - Int1018 +String 856 856 )))|((( 857 857 (% class="western" %) 858 - ReturnsONEcountquestion idonsuccessful creationofthe question.1021 +CSV of question id's that should be considered to find duplicate. 859 859 ))) 860 - 861 -\\ 862 - 1023 +|((( 863 863 (% class="western" %) 864 -PUT method should be used to update question. 1025 +Return 1026 +)))|((( 1027 +(% class="western" %) 1028 +String 1029 +)))|((( 1030 +(% class="western" %) 1031 +CSV of ONEcount QuestionId's requested back in Users object in response. 1032 +))) 865 865 866 866 (% class="wrapped" %) 867 867 |((( 868 868 (% class="western" %) 869 -**Re quest**1037 +**Response** 870 870 )))|((( 871 871 (% class="western" %) 872 872 **Type** ... ... @@ -876,19 +876,24 @@ 876 876 ))) 877 877 |((( 878 878 (% class="western" %) 879 -Questions 1047 +Users 1048 +)))|=((( 1049 +(% class="western" align="left" %) 1050 +Users 880 880 )))|((( 881 881 (% class="western" %) 882 -Questions 883 -)))|((( 884 -(% class="western" %) 885 -This defines the question contents and responses. 1053 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned. 886 886 ))) 887 887 1056 + 1057 + 1058 +(% class="western" %) 1059 +**PUT method should be used to update users.** 1060 + 888 888 (% class="wrapped" %) 889 889 |((( 890 890 (% class="western" %) 891 -**Re sponse**1064 +**Request** 892 892 )))|((( 893 893 (% class="western" %) 894 894 **Type** ... ... @@ -898,81 +898,72 @@ 898 898 ))) 899 899 |((( 900 900 (% class="western" %) 901 - QuestionId1074 +Users 902 902 )))|((( 903 903 (% class="western" %) 904 - Int1077 +Users 905 905 )))|((( 906 906 (% class="western" %) 907 -Returns ONEcountquestion idon successful updateofthequestion.1080 +Users object with update fields. Return property has csv of questions id requested back in Users object. 908 908 ))) 909 - 1082 +|((( 910 910 (% class="western" %) 911 - \\912 - 1084 +Return 1085 +)))|((( 913 913 (% class="western" %) 914 -Example: Get list of questions from api which has FirstName in text 915 - 916 -{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}} 917 - 1087 +String 1088 +)))|((( 918 918 (% class="western" %) 919 -{ 920 - 1090 +CSV of ONEcount QuestionId's requested back in Users object in response 1091 +))) 1092 +|((( 921 921 (% class="western" %) 922 - "result": {923 - 1094 +RequestDate 1095 +)))|((( 924 924 (% class="western" %) 925 - "success": "1",926 - 1097 +Date 1098 +)))|((( 927 927 (% class="western" %) 928 -"error": { 1100 +RequestDate to use for the demo update. If not provided current date will be used. 1101 +))) 929 929 1103 +(% class="wrapped" %) 1104 +|((( 930 930 (% class="western" %) 931 - "code": "0",932 - 1106 +**Response** 1107 +)))|((( 933 933 (% class="western" %) 934 - "message": ""935 - 1109 +**Type** 1110 +)))|((( 936 936 (% class="western" %) 937 -} 938 - 1112 +**Description** 1113 +))) 1114 +|((( 939 939 (% class="western" %) 940 -}, 941 - 1116 +Users 1117 +)))|=((( 1118 +(% class="western" align="left" %) 1119 +Users 1120 +)))|((( 942 942 (% class="western" %) 943 -"Questions": [ 1122 +Updated user returned with the demo field requested in return parameter in json format. 1123 +))) 944 944 945 945 (% class="western" %) 946 - {1126 + 947 947 948 948 (% class="western" %) 949 - "Id":"6",1129 + 950 950 951 951 (% class="western" %) 952 - "Text":"FirstName",1132 +Create new users. Here in this example the JSON for request is passed in userFile.json file. 953 953 954 -(% class="western" %) 955 -"Type": "1", 1134 +{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}} 956 956 957 957 (% class="western" %) 958 - "Alias": "FName"1137 +**Products** 959 959 960 960 (% class="western" %) 961 -} 962 - 963 -(% class="western" %) 964 -] 965 - 966 -(% class="western" %) 967 -} 968 - 969 -(% class="western" %) 970 -\\ 971 - 972 -(% class="western" %) 973 -**COMPONENT: Products** 974 - 975 -(% class="western" %) 976 976 This resource is for manipulating products resource. A product can be created, updated or searched. 977 977 978 978 (% class="wrapped" %) ... ... @@ -1056,7 +1056,7 @@ 1056 1056 {"ProductID":"65","ResourceID":”121"} 1057 1057 ))) 1058 1058 1059 - \\1223 + 1060 1060 1061 1061 (% class="western" %) 1062 1062 **GET method should be used to lookup products.** ... ... @@ -1111,7 +1111,7 @@ 1111 1111 Returns found product details. 1112 1112 ))) 1113 1113 1114 - \\1278 + 1115 1115 1116 1116 (% class="western" %) 1117 1117 **POST method should be used to create products.** ... ... @@ -1141,7 +1141,7 @@ 1141 1141 Example: 1142 1142 1143 1143 (% class="western" %) 1144 -{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}1308 +{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1145 1145 ))) 1146 1146 1147 1147 (% class="wrapped" %) ... ... @@ -1166,7 +1166,7 @@ 1166 1166 Product Id of the newly created product. 1167 1167 ))) 1168 1168 1169 - \\1333 + 1170 1170 1171 1171 (% class="western" %) 1172 1172 PUT method should be used to update an individual product given the product info. ... ... @@ -1199,7 +1199,7 @@ 1199 1199 **Example**: 1200 1200 1201 1201 (% class="western" %) 1202 -{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17}1366 +{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17} 1203 1203 ))) 1204 1204 1205 1205 (% class="wrapped" %) ... ... @@ -1224,10 +1224,10 @@ 1224 1224 Product id of the updated product. 1225 1225 ))) 1226 1226 1227 - \\1391 + 1228 1228 1229 1229 (% class="western" %) 1230 -** COMPONENT: Terms**1394 +**Terms** 1231 1231 1232 1232 (% class="western" %) 1233 1233 This resource is for manipulating terms resource. A term can be created, updated or searched. ... ... @@ -1284,7 +1284,7 @@ 1284 1284 JSON of the terms type object needs to be sent as post data. Id field is mandatory for update. 1285 1285 ))) 1286 1286 1287 - \\1451 + 1288 1288 1289 1289 (% class="western" %) 1290 1290 **GET method should be used to lookup products.** ... ... @@ -1339,7 +1339,7 @@ 1339 1339 Returns found term details. 1340 1340 ))) 1341 1341 1342 - \\1506 + 1343 1343 1344 1344 (% class="western" %) 1345 1345 **POST method should be used to create products.** ... ... @@ -1397,7 +1397,7 @@ 1397 1397 Term Id of the newly created term. 1398 1398 ))) 1399 1399 1400 - \\1564 + 1401 1401 1402 1402 (% class="western" %) 1403 1403 PUT method should be used to update an individual term given the term info. ... ... @@ -1424,7 +1424,7 @@ 1424 1424 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. 1425 1425 1426 1426 (% class="western" %) 1427 - \\1591 + 1428 1428 1429 1429 (% class="western" %) 1430 1430 **Example**: ... ... @@ -1455,47 +1455,12 @@ 1455 1455 term id of the updated term. 1456 1456 ))) 1457 1457 1458 - \\1622 + 1459 1459 1460 1460 (% class="western" %) 1461 -** COMPONENT:Resources**1625 +**Resources** 1462 1462 1463 1463 (% class="western" %) 1464 -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. 1465 - 1466 -* ((( 1467 -(% class="western" %) 1468 -questions 1469 -))) 1470 -* ((( 1471 -(% class="western" %) 1472 -users 1473 -))) 1474 -* ((( 1475 -(% class="western" %) 1476 -products 1477 -))) 1478 -* ((( 1479 -(% class="western" %) 1480 -terms 1481 -))) 1482 -* ((( 1483 -(% class="western" %) 1484 -resources 1485 -))) 1486 -* ((( 1487 -(% class="western" %) 1488 -sources 1489 -))) 1490 -* ((( 1491 -(% class="western" %) 1492 -transactions 1493 -))) 1494 - 1495 -(% class="western" %) 1496 -**~ ** 1497 - 1498 -(% class="western" %) 1499 1499 This resource is for manipulating resources resource. A resource can be created, updated or searched. 1500 1500 1501 1501 (% class="wrapped" %) ... ... @@ -1550,10 +1550,10 @@ 1550 1550 JSON of the resources type object needs to be sent as post data. Id field is mandatory for update. 1551 1551 ))) 1552 1552 1553 - \\1682 + 1554 1554 1555 1555 (% class="western" %) 1556 -**GET method should be used to lookup r esources.**1685 +**GET method should be used to lookup products.** 1557 1557 1558 1558 (% class="wrapped" %) 1559 1559 |((( ... ... @@ -1605,10 +1605,10 @@ 1605 1605 Returns found resource details. 1606 1606 ))) 1607 1607 1608 - \\1737 + 1609 1609 1610 1610 (% class="western" %) 1611 -**POST method should be used to create r esources.**1740 +**POST method should be used to create products.** 1612 1612 1613 1613 (% class="wrapped" %) 1614 1614 |((( ... ... @@ -1632,7 +1632,7 @@ 1632 1632 resource details in json to be sent as post data. Id should not be set. 1633 1633 1634 1634 (% class="western" %) 1635 -**Possible Request Params**: Name, Description, Type, Value , FreePass1764 +**Possible Request Params**: Name, Description, Type, Value 1636 1636 1637 1637 (% class="western" %) 1638 1638 **Example**: ... ... @@ -1639,15 +1639,6 @@ 1639 1639 1640 1640 (% class="western" %) 1641 1641 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1642 - 1643 -(% class="western" %) 1644 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1645 - 1646 -(% class="western" %) 1647 -{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1} 1648 - 1649 -(% class="western" %) 1650 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1651 1651 ))) 1652 1652 1653 1653 (% class="wrapped" %) ... ... @@ -1672,7 +1672,7 @@ 1672 1672 Resource Id of the newly created resource. 1673 1673 ))) 1674 1674 1675 - \\1795 + 1676 1676 1677 1677 (% class="western" %) 1678 1678 PUT method should be used to update an individual resource given the resource info. ... ... @@ -1696,25 +1696,16 @@ 1696 1696 Resource 1697 1697 )))|((( 1698 1698 (% class="western" %) 1699 -Resource details to be updated injsonformat to be sent withrequest. Id property needs to be set to identify the resource to be updated. 1819 +Resource details to be updated in json format to be sent with request. Id property needs to be set to identify the resource to be updated. 1700 1700 1701 1701 (% class="western" %) 1702 - \\1822 + 1703 1703 1704 1704 (% class="western" %) 1705 -Example s:1825 +Example: 1706 1706 1707 1707 (% class="western" %) 1708 1708 {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”} 1709 - 1710 -(% class="western" %) 1711 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]} 1712 - 1713 -(% class="western" %) 1714 -{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1} 1715 - 1716 -(% class="western" %) 1717 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1} 1718 1718 ))) 1719 1719 1720 1720 (% class="wrapped" %) ... ... @@ -1739,19 +1739,19 @@ 1739 1739 resource id of the updated resource. 1740 1740 ))) 1741 1741 1742 - \\1853 + 1743 1743 1744 -\\ 1855 +(% class="western" %) 1856 + 1745 1745 1746 1746 (% class="western" %) 1747 - \\1859 + 1748 1748 1749 1749 (% class="western" %) 1750 -**COMPONENT: Source Codes 1751 -** 1862 +**Sources** 1752 1752 1753 1753 (% class="western" %) 1754 -This resource is for manipulating source code fora resource. A source code can be created, updated or searched.1865 +This resource is for manipulating sources resource. A source can be created, updated or searched. 1755 1755 1756 1756 (% class="wrapped" %) 1757 1757 |((( ... ... @@ -1805,7 +1805,7 @@ 1805 1805 JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update. 1806 1806 ))) 1807 1807 1808 - \\1919 + 1809 1809 1810 1810 (% class="western" %) 1811 1811 **Sources can be looked up given the code or Id. GET method should be used for lookup.** ... ... @@ -1860,10 +1860,10 @@ 1860 1860 Returns found source details. 1861 1861 ))) 1862 1862 1863 - \\1974 + 1864 1864 1865 1865 (% class="western" %) 1866 - \\1977 + 1867 1867 1868 1868 (% class="western" %) 1869 1869 POST method should be used to create an individual source given the source parameters. ... ... @@ -1912,7 +1912,7 @@ 1912 1912 Returns created source code id. 1913 1913 ))) 1914 1914 1915 - \\2026 + 1916 1916 1917 1917 (% class="western" %) 1918 1918 **PUT method can be used to update an individual source given the id.** ... ... @@ -1961,13 +1961,13 @@ 1961 1961 Returns updated source id. 1962 1962 ))) 1963 1963 1964 - \\2075 + 1965 1965 1966 1966 (% class="western" %) 1967 - \\2078 + 1968 1968 1969 1969 (% class="western" %) 1970 -** COMPONENT: Transactions**2081 +**Transactions** 1971 1971 1972 1972 (% class="western" %) 1973 1973 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -2014,10 +2014,10 @@ 2014 2014 JSON of the Transactions type object needs to be sent as post data. Id field should not be sent. 2015 2015 ))) 2016 2016 2017 - \\2128 + 2018 2018 2019 2019 (% class="western" %) 2020 - \\2131 + 2021 2021 2022 2022 (% class="western" %) 2023 2023 Transactions can be looked up using transactionId, date range, userid. Use GET method to do lookup. ... ... @@ -2056,7 +2056,11 @@ 2056 2056 EndDate: When the search should end. Only valid when UserId is set. (Date) 2057 2057 ))) 2058 2058 2059 -(% class="wrapped" style="letter-spacing: 0.0px;" %) 2170 + 2171 + 2172 + 2173 + 2174 +(% class="wrapped" %) 2060 2060 |((( 2061 2061 (% class="western" %) 2062 2062 **Response** ... ... @@ -2075,23 +2075,11 @@ 2075 2075 Transactions 2076 2076 )))|((( 2077 2077 (% class="western" %) 2078 -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.2193 +Returns all transaction that satisfies the search criteria. 2079 2079 ))) 2080 2080 2081 - \\2196 + 2082 2082 2083 -**Sample response for /(% style="color: rgb(80,80,80);" %)transactions/lookup?UserId=25255105:(%%)** 2084 - 2085 -(% class="wrapped" %) 2086 -|=((( 2087 -(% class="content-wrapper" %) 2088 -((( 2089 -[[image:attach:Screen Shot 2020-02-26 at 11.14.29 AM.png||width="1407"]] 2090 -))) 2091 -))) 2092 - 2093 -\\ 2094 - 2095 2095 (% class="western" %) 2096 2096 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. 2097 2097 ... ... @@ -2139,35 +2139,31 @@ 2139 2139 Returns transactionId of the newly created transaction. 2140 2140 ))) 2141 2141 2142 - \\2245 + 2143 2143 2144 -\\ 2145 - 2146 2146 (% class="western" %) 2147 -**COMPONENT: Leads 2148 -** 2248 +**Stats** 2149 2149 2150 2150 (% class="western" %) 2151 2151 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. 2152 2152 2153 2153 (% class="western" %) 2154 - \\2254 + 2155 2155 2156 2156 (% class="western" %) 2157 - \\2257 + 2158 2158 2159 2159 (% class="western" %) 2160 - \\2260 + 2161 2161 2162 2162 (% class="western" %) 2163 - \\2263 + 2164 2164 2165 2165 (% class="western" %) 2166 - \\2266 + 2167 2167 2168 2168 (% class="western" %) 2169 -**Telemarketing Leads 2170 -** 2269 +**Telemarketing** 2171 2171 2172 2172 (% class="western" %) 2173 2173 ... ... @@ -2215,7 +2215,7 @@ 2215 2215 JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent. 2216 2216 ))) 2217 2217 2218 - \\2317 + 2219 2219 2220 2220 (% class="western" %) 2221 2221 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. ... ... @@ -2285,13 +2285,13 @@ 2285 2285 ))) 2286 2286 |((( 2287 2287 (% class="western" %) 2288 - \\2387 + 2289 2289 )))|((( 2290 2290 (% class="western" %) 2291 - \\2390 + 2292 2292 )))|((( 2293 2293 (% class="western" %) 2294 - \\2393 + 2295 2295 ))) 2296 2296 2297 2297 (% class="wrapped" %) ... ... @@ -2316,18 +2316,10 @@ 2316 2316 Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format. 2317 2317 ))) 2318 2318 2319 - \\2418 + 2320 2320 2321 -\\ 2322 - 2323 -\\ 2324 - 2325 -\\ 2326 - 2327 -\\ 2328 - 2329 2329 (% class="western" %) 2330 -** APIREFERENCE**2421 +**Reference** 2331 2331 2332 2332 (% class="western" %) 2333 2333 **Type: Questions** ... ... @@ -2373,12 +2373,12 @@ 2373 2373 (% class="western" %) 2374 2374 Determines which type of question it is. Textbox, checkbox, select, radio. 2375 2375 There can be 6 types of questions. 2376 -type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters. 2377 -type=2 means textarea type question or long response type question. 2378 -type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as * 2379 -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. 2380 -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. 2381 -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. 2467 + type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters. 2468 + type=2 means textarea type question or long response type question. 2469 + type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as * 2470 + 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. 2471 + 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. 2472 + 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. 2382 2382 ))) 2383 2383 |((( 2384 2384 (% class="western" %) ... ... @@ -2401,13 +2401,13 @@ 2401 2401 Alias for admin purpose. 2402 2402 ))) 2403 2403 2404 - \\2495 + 2405 2405 2406 2406 (% class="western" %) 2407 - \\2498 + 2408 2408 2409 2409 (% class="western" %) 2410 - \\2501 + 2411 2411 2412 2412 (% class="western" %) 2413 2413 **Type: Choices** ... ... @@ -2474,7 +2474,7 @@ 2474 2474 Tied to which question id. 2475 2475 ))) 2476 2476 2477 - \\2568 + 2478 2478 2479 2479 (% class="western" %) 2480 2480 **Type: Users** ... ... @@ -2531,7 +2531,7 @@ 2531 2531 Request date. 2532 2532 ))) 2533 2533 2534 - \\2625 + 2535 2535 2536 2536 (% class="western" %) 2537 2537 **Type: Demo** ... ... @@ -2578,7 +2578,7 @@ 2578 2578 ... 2579 2579 ))) 2580 2580 2581 - \\2672 + 2582 2582 2583 2583 (% class="western" %) 2584 2584 **Type: Transactions** ... ... @@ -2725,7 +2725,7 @@ 2725 2725 If there is amount (USD) included in transaction. 2726 2726 ))) 2727 2727 2728 - \\2819 + 2729 2729 2730 2730 (% class="western" %) 2731 2731 **Type: Sources** ... ... @@ -2782,10 +2782,10 @@ 2782 2782 If this is a child source then list the parent source id. 2783 2783 ))) 2784 2784 2785 - \\2876 + 2786 2786 2787 2787 (% class="western" %) 2788 - \\2879 + 2789 2789 2790 2790 (% class="western" %) 2791 2791 **Type: Products** ... ... @@ -2842,7 +2842,7 @@ 2842 2842 (Array of) Terms associated with the product. 2843 2843 ))) 2844 2844 2845 - \\2936 + 2846 2846 2847 2847 (% class="western" %) 2848 2848 **Type: Terms** ... ... @@ -2929,7 +2929,7 @@ 2929 2929 If there is price (USD) for the term. 2930 2930 ))) 2931 2931 2932 - \\3023 + 2933 2933 2934 2934 (% class="western" %) 2935 2935 **Type: Resources** ... ... @@ -3006,30 +3006,14 @@ 3006 3006 )))|((( 3007 3007 (% class="western" %) 3008 3008 String 3009 - 3010 -(% class="western" %) 3011 -or 3012 - 3013 -(% class="western" %) 3014 -Array 3015 3015 )))|((( 3016 3016 (% class="western" %) 3017 -Value of Resource Type :3102 +Value of Resource Type. 3018 3018 3019 3019 (% class="western" %) 3020 - When requesting a resource (GET), you should expectastring if thereis onlyonevalue.Ifthereare multiple values,youshould expectan array.3105 +Example : if the Type sent is 3 then Value would be **/digital/** 3021 3021 3022 3022 (% class="western" %) 3023 -For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests. 3024 - 3025 -(% class="western" %) 3026 -Example : 3027 - 3028 -(% class="western" %) 3029 -if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** ** 3030 -**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"] 3031 - 3032 -(% class="western" %) 3033 3033 For Function type resource leave it blank. 3034 3034 ))) 3035 3035 |((( ... ... @@ -3040,20 +3040,10 @@ 3040 3040 Int 3041 3041 )))|((( 3042 3042 (% class="western" %) 3043 -Default limit is 25 but ifall the data needs to be pulled then pass limit=0.3118 +Default limit is 25 but all the data needs to be pulled then pass limit=0. 3044 3044 ))) 3045 -|(% colspan="1" %)(% colspan="1" %) 3046 -((( 3047 -FreePass 3048 -)))|(% colspan="1" %)(% colspan="1" %) 3049 -((( 3050 -Int 3051 -)))|(% colspan="1" %)(% colspan="1" %) 3052 -((( 3053 -Default value is 0. This parameter is used to provide access to protected content. 3054 -))) 3055 3055 3056 - \\3121 + 3057 3057 3058 3058 (% class="western" %) 3059 3059 **Type: Telemarketing** ... ... @@ -3143,12 +3143,8 @@ 3143 3143 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. 3144 3144 3145 3145 (% class="western" %) 3146 - \\3211 + 3147 3147 3148 3148 (% class="western" %) 3149 3149 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. 3150 3150 ))) 3151 - 3152 -\\ 3153 - 3154 -\\
- OCDEV-OC-API-04032017-030417-1545-35.pdf
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -57.8 KB - Content
- Screen Shot 2020-02-26 at 11.14.29 AM.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -397.9 KB - Content
- Screen Shot 2020-02-26 at 11.15.52 AM.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -50.1 KB - Content
- Screen Shot 2020-02-26 at 11.22.13 AM.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -159.8 KB - Content
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -353 89951 +3539005 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/353 8995/OLD-ONEcountAPIDocumentation1 +https://info.onecount.net//wiki/spaces/OD/pages/3539005/OC-API-04032017