Last modified by Admin on 2025/06/27 12:14

From version 18.1
edited by santosh
on 2022/04/25 17:32
Change comment: There is no comment for this version
To version 3.1
edited by sonish
on 2017/04/03 16:44
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -ONEcount API Documentation
1 +sonish-APIDocument-230317-1008-18
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.santosh
1 +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 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.
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,55 +21,178 @@
21 21  )))
22 22  
23 23  (% class="western" %)
24 -Specifically, the ONEcount API provides to the following 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 -**Accessing API**
84 +User lookup
61 61  
86 +*
87 +
62 62  (% class="western" %)
63 -**REST API 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 YOU
94 +Question lookup
67 67  
96 +*
97 +
68 68  (% class="western" %)
69 -**
70 -**
99 +Source code lookup
71 71  
101 +*
102 +
72 72  (% 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" %)
73 73  Your HTTP requests to a REST API resource should contain the following information:
74 74  
75 75  * (((
... ... @@ -90,12 +90,9 @@
90 90  )))
91 91  
92 92  (% class="western" %)
93 -\\
267 +**Request**
94 94  
95 95  (% class="western" %)
96 -**General API Usage**
97 -
98 -(% class="western" %)
99 99  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.
100 100  
101 101  (% class="western" %)
... ... @@ -102,7 +102,7 @@
102 102  For lookup, the parameter list will be part of the request url.
103 103  
104 104  (% class="western" %)
105 -\\
276 +
106 106  
107 107  (% class="western" %)
108 108  **Response**
... ... @@ -165,7 +165,7 @@
165 165  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.
166 166  
167 167  (% class="western" %)
168 -\\
339 +
169 169  
170 170  (% class="western" %)
171 171  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.
... ... @@ -221,103 +221,134 @@
221 221   ]}]}}}}
222 222  
223 223  (% class="western" %)
224 -\\
395 +
225 225  
226 226  (% class="western" %)
227 -**
228 -**
398 +**Resources**
229 229  
230 -**COMPONENT: Users**
231 -
232 232  (% class="western" %)
233 -Users means the customers of your system. Users can be added, updated and searched for using the users resource from the api. For lookup, If a return parameter is specified Users object will have those fields. If nothing is specified by default only UserId is returned.
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.
234 234  
403 +* (((
235 235  (% class="western" %)
236 -Additionally (Array of) transaction object specifying parts of the transaction to be added to the new user can be specified. UserId, TransactionId and 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 +)))
237 237  
238 238  (% class="western" %)
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.
433 +**Questions**
240 240  
241 241  (% class="western" %)
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.
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.
243 243  
244 244  (% class="western" %)
245 -Return parameter will have the comma separated list of question Ids that is requested back from the API.
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)
246 246  
247 247  (% class="western" %)
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.
442 +There can be 6 types of questions:
249 249  
250 -\\
251 -
252 -(% class="wrapped" %)
253 253  |(((
254 -(% class="western" %)
255 -**Method**
445 +(% class="western" align="center" %)
446 +**Type**
256 256  )))|(((
257 257  (% class="western" %)
258 -**Url**
449 +**Description**
450 +)))
451 +|(((
452 +(% class="western" align="center" %)
453 +1
259 259  )))|(((
260 260  (% class="western" %)
261 -**Action**
456 +Textbox type questions or short response type question. The response length needs to be less than 255 characters.
262 262  )))
263 263  |(((
264 -(% class="western" %)
265 -GET
459 +(% class="western" align="center" %)
460 +2
266 266  )))|(((
267 267  (% class="western" %)
268 -/users
463 +Textarea type question or long response type question.
464 +)))
465 +|(((
466 +(% class="western" align="center" %)
467 +3
269 269  )))|(((
270 270  (% class="western" %)
271 -Get users data limiting 25.
470 +Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.
272 272  )))
273 273  |(((
473 +(% class="western" align="center" %)
474 +4
475 +)))|(((
274 274  (% class="western" %)
275 -GET
477 +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.
478 +)))
479 +|(((
480 +(% class="western" align="center" %)
481 +5
276 276  )))|(((
277 277  (% class="western" %)
278 -/users/<ocid or ocid_hash>
484 +Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.
485 +)))
486 +|(((
487 +(% class="western" align="center" %)
488 +6
279 279  )))|(((
280 280  (% class="western" %)
281 -Get data for user id 1. The user id can be a numeric value or a hash
491 +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.
282 282  )))
493 +
283 283  |(((
284 284  (% class="western" %)
285 -GET
496 +**Method**
286 286  )))|(((
287 287  (% class="western" %)
288 -/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2
499 +**Url**
289 289  )))|(((
290 290  (% class="western" %)
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.
502 +**Action**
295 295  )))
296 296  |(((
297 297  (% class="western" %)
298 -POST
506 +GET
299 299  )))|(((
300 300  (% class="western" %)
301 -/users
509 +/questions
302 302  )))|(((
303 303  (% class="western" %)
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.
512 +List all questions
308 308  )))
309 309  |(((
310 310  (% class="western" %)
311 -PUT
516 +GET
312 312  )))|(((
313 313  (% class="western" %)
314 -/users/1
519 +/questions/1
315 315  )))|(((
316 316  (% class="western" %)
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.
522 +Returns question id 1
321 321  )))
322 322  |(((
323 323  (% class="western" %)
... ... @@ -324,10 +324,10 @@
324 324  GET
325 325  )))|(((
326 326  (% class="western" %)
327 -/users/1/partners/2
529 +/questions/lookup?Text=Email
328 328  )))|(((
329 329  (% class="western" %)
330 -Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.
532 +Returns all questions with “Email" in question text
331 331  )))
332 332  |(((
333 333  (% class="western" %)
... ... @@ -334,42 +334,33 @@
334 334  POST
335 335  )))|(((
336 336  (% class="western" %)
337 -/users/login
539 +/questions
338 338  )))|(((
339 339  (% class="western" %)
340 -Check to see user exist with username/email and password.
542 +Create a new question
341 341  
342 342  (% class="western" %)
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 -
545 +JSON of the Questions type object needs to be sent as post data. Id field should not be sent.
546 +)))
547 +|(((
345 345  (% class="western" %)
346 -Example:
347 -
549 +PUT
550 +)))|(((
348 348  (% class="western" %)
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 -
552 +/questions
553 +)))|(((
351 351  (% class="western" %)
352 -OR
555 +Update a question
353 353  
354 354  (% class="western" %)
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.
558 +JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
365 365  )))
366 366  
367 -\\
561 +
368 368  
369 369  (% class="western" %)
370 -**GET method should be used to lookup users.**
564 +**GET method can be used to lookup questions.**
371 371  
372 -(% class="wrapped" %)
373 373  |(((
374 374  (% class="western" %)
375 375  **Request**
... ... @@ -388,23 +388,18 @@
388 388  String
389 389  )))|(((
390 390  (% class="western" %)
391 -URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object.
584 +URL encoded key value string parameters for the question that a user is trying to search.
392 392  
393 393  (% class="western" %)
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"]]
587 +Params:
395 395  
396 396  (% class="western" %)
397 -return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
590 +Text: Word or phrase that should be present in the question text (String)
398 398  
399 399  (% class="western" %)
400 -If return is not provided, all the demographics will be returned.
593 +Type: Look up the question type.
401 401  )))
402 402  
403 -\\
404 -
405 -\\
406 -
407 -(% class="wrapped" %)
408 408  |(((
409 409  (% class="western" %)
410 410  **Response**
... ... @@ -417,47 +417,20 @@
417 417  )))
418 418  |(((
419 419  (% class="western" %)
420 -Users
421 -)))|=(((
422 -(% class="western" align="left" %)
423 -Users
608 +Questions
424 424  )))|(((
425 425  (% class="western" %)
426 -Found users returned with the demo field requested in return parameter in json format
611 +Questions
612 +)))|(((
613 +(% class="western" %)
614 +Returns found question details.
427 427  )))
428 428  
429 -\\
617 +
430 430  
431 -**Sample response for /users/(% style="color: rgb(80,80,80);" %)<OCID or ocid_hash>(%%)**
432 -
433 -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.
434 -
435 -(% class="relative-table wrapped" style="width: 100.0%;" %)
436 -|=(((
437 -(% class="content-wrapper" %)
438 -(((
439 -[[image:attach:Screen Shot 2020-02-26 at 11.15.52 AM.png||width="1407"]]
440 -)))
441 -)))
442 -
443 -\\
444 -
445 -**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(%%)**
446 -
447 -(% class="wrapped" %)
448 -|=(((
449 -(% class="content-wrapper" %)
450 -(((
451 -[[image:attach:Screen Shot 2020-02-26 at 11.22.13 AM.png||height="250"]]
452 -)))
453 -)))
454 -
455 -\\
456 -
457 457  (% class="western" %)
458 -**POST method should be used to create users.**
620 +**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).**
459 459  
460 -(% class="wrapped" %)
461 461  |(((
462 462  (% class="western" %)
463 463  **Request**
... ... @@ -470,49 +470,44 @@
470 470  )))
471 471  |(((
472 472  (% class="western" %)
473 -Users
634 +Questions
474 474  )))|(((
475 475  (% class="western" %)
476 -Users
637 +Questions
477 477  )))|(((
478 478  (% class="western" %)
479 -Users object that contains information about user to create. PartnerId Needs to be specified.
640 +This defines the question contents and possible responses.
480 480  )))
642 +
481 481  |(((
482 482  (% class="western" %)
483 -Transactions
645 +**Response**
484 484  )))|(((
485 485  (% class="western" %)
486 -Transactions
648 +**Type**
487 487  )))|(((
488 488  (% class="western" %)
489 -(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.
651 +**Description**
490 490  )))
491 491  |(((
492 492  (% class="western" %)
493 -DedupeColumns
655 +QuestionId
494 494  )))|(((
495 495  (% class="western" %)
496 -String
658 +Int
497 497  )))|(((
498 498  (% class="western" %)
499 -CSV of question id's that should be considered to find duplicate.
661 +Returns ONEcount question id on successful creation of the question.
500 500  )))
501 -|(((
663 +
664 +
665 +
502 502  (% class="western" %)
503 -Return
504 -)))|(((
505 -(% class="western" %)
506 -String
507 -)))|(((
508 -(% class="western" %)
509 -CSV of ONEcount QuestionId's requested back in Users object in response.
510 -)))
667 +PUT method should be used to update question.
511 511  
512 -(% class="wrapped" %)
513 513  |(((
514 514  (% class="western" %)
515 -**Response**
671 +**Request**
516 516  )))|(((
517 517  (% class="western" %)
518 518  **Type**
... ... @@ -522,24 +522,18 @@
522 522  )))
523 523  |(((
524 524  (% class="western" %)
525 -Users
526 -)))|=(((
527 -(% class="western" align="left" %)
528 -Users
681 +Questions
529 529  )))|(((
530 530  (% class="western" %)
531 -Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned.
684 +Questions
685 +)))|(((
686 +(% class="western" %)
687 +This defines the question contents and responses.
532 532  )))
533 533  
534 -\\
535 -
536 -(% class="western" %)
537 -**PUT method should be used to update users.**
538 -
539 -(% class="wrapped" %)
540 540  |(((
541 541  (% class="western" %)
542 -**Request**
692 +**Response**
543 543  )))|(((
544 544  (% class="western" %)
545 545  **Type**
... ... @@ -549,174 +549,167 @@
549 549  )))
550 550  |(((
551 551  (% class="western" %)
552 -Users
702 +QuestionId
553 553  )))|(((
554 554  (% class="western" %)
555 -Users
705 +Int
556 556  )))|(((
557 557  (% class="western" %)
558 -Users object with update fields. Return property has csv of questions id requested back in Users object.
708 +Returns ONEcount question id on successful update of the question.
559 559  )))
560 -|(((
710 +
561 561  (% class="western" %)
562 -Return
563 -)))|(((
712 +
713 +
564 564  (% class="western" %)
565 -String
566 -)))|(((
715 +Example: Get list of questions from api which has FirstName in text
716 +
717 +{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}}
718 +
567 567  (% class="western" %)
568 -CSV of ONEcount QuestionId's requested back in Users object in response
569 -)))
570 -|(((
720 +{
721 +
571 571  (% class="western" %)
572 -RequestDate
573 -)))|(((
723 +"result": {
724 +
574 574  (% class="western" %)
575 -Date
576 -)))|(((
726 +"success": "1",
727 +
577 577  (% class="western" %)
578 -RequestDate to use for the demo update. If not provided current date will be used.
579 -)))
729 +"error": {
580 580  
581 -(% class="wrapped" %)
582 -|(((
583 583  (% class="western" %)
584 -**Response**
585 -)))|(((
732 +"code": "0",
733 +
586 586  (% class="western" %)
587 -**Type**
588 -)))|(((
735 +"message": ""
736 +
589 589  (% class="western" %)
590 -**Description**
591 -)))
592 -|(((
738 +}
739 +
593 593  (% class="western" %)
594 -Users
595 -)))|=(((
596 -(% class="western" align="left" %)
597 -Users
598 -)))|(((
741 +},
742 +
599 599  (% class="western" %)
600 -Updated user returned with the demo field requested in return parameter in json format.
601 -)))
744 +"Questions": [
602 602  
603 603  (% class="western" %)
604 -\\
747 +{
605 605  
606 606  (% class="western" %)
607 -\\
750 +"Id": "6",
608 608  
609 609  (% class="western" %)
610 -Create new users. Here in this example the JSON for request is passed in userFile.json file.
753 +"Text": "FirstName",
611 611  
612 -{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
755 +(% class="western" %)
756 +"Type": "1",
613 613  
614 614  (% class="western" %)
615 -**
616 -**
759 +"Alias": "FName"
617 617  
618 618  (% class="western" %)
619 -**
620 -**
762 +}
621 621  
622 -\\
764 +(% class="western" %)
765 +]
623 623  
624 624  (% class="western" %)
625 -**COMPONENT: Questions**
768 +}
626 626  
627 627  (% class="western" %)
628 -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).
629 629  
772 +**Users**
773 +
630 630  (% class="western" %)
631 -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.
775 +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.
632 632  
633 633  (% class="western" %)
634 -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)
778 +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.
635 635  
636 636  (% class="western" %)
637 -There can be 6 types of questions:
781 +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.
638 638  
639 -(% class="wrapped" %)
640 -|(((
641 -(% class="western" align="center" %)
642 -**Type**
643 -)))|(((
644 644  (% class="western" %)
645 -**Description**
646 -)))
784 +If username and password is not one of the parameters being passed, then a random username and password will be generated for the user while creating his user account in ONEcount.
785 +
786 +(% class="western" %)
787 +Return parameter will have the comma separated list of question Ids that is requested back from the API.
788 +
789 +(% class="western" %)
790 +Return is an optional parameter in request. If return is not requested then by default, only UserId (which is ONEcount ID) will be returned in the Users object.
791 +
792 +(% class="western" %)
793 +
794 +
647 647  |(((
648 -(% class="western" align="center" %)
649 -1
796 +(% class="western" %)
797 +**Method**
650 650  )))|(((
651 651  (% class="western" %)
652 -Textbox type questions or short response type question. The response length needs to be less than 255 characters.
653 -)))
654 -|(((
655 -(% class="western" align="center" %)
656 -2
800 +**Url**
657 657  )))|(((
658 658  (% class="western" %)
659 -Textarea type question or long response type question.
803 +**Action**
660 660  )))
661 661  |(((
662 -(% class="western" align="center" %)
663 -3
806 +(% class="western" %)
807 +GET
664 664  )))|(((
665 665  (% class="western" %)
666 -Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.
667 -)))
668 -|(((
669 -(% class="western" align="center" %)
670 -4
810 +/users
671 671  )))|(((
672 672  (% class="western" %)
673 -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.
813 +Get users data limiting 25.
674 674  )))
675 675  |(((
676 -(% class="western" align="center" %)
677 -5
816 +(% class="western" %)
817 +GET
678 678  )))|(((
679 679  (% class="western" %)
680 -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.
681 -)))
682 -|(((
683 -(% class="western" align="center" %)
684 -6
820 +/users/1
685 685  )))|(((
686 686  (% class="western" %)
687 -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.
823 +Get data for user id 1. The user id can be a numeric value or a hash
688 688  )))
689 -
690 -(% class="wrapped" %)
691 691  |(((
692 692  (% class="western" %)
693 -**Method**
827 +GET
694 694  )))|(((
695 695  (% class="western" %)
696 -**Url**
830 +/users/lookup?1=user1@[[email.com>>url:http://email.com||shape="rect"]]&return=1,2
697 697  )))|(((
698 698  (% class="western" %)
699 -**Action**
833 +Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name.
834 +
835 +(% class="western" %)
836 +Return parameter defines a csv of question id that are requested back in response.
700 700  )))
701 701  |(((
702 702  (% class="western" %)
703 -GET
840 +POST
704 704  )))|(((
705 705  (% class="western" %)
706 -/questions
843 +/users
707 707  )))|(((
708 708  (% class="western" %)
709 -List all questions
846 +Create a new users
847 +
848 +(% class="western" %)
849 +Parameters required to create the user needs to be sent as post data in JSON format.
710 710  )))
711 711  |(((
712 712  (% class="western" %)
713 -GET
853 +PUT
714 714  )))|(((
715 715  (% class="western" %)
716 -/questions/1
856 +/users/1
717 717  )))|(((
718 718  (% class="western" %)
719 -Returns question id 1
859 +Update user id 1. The user id can be a numeric value or a hash
860 +
861 +(% class="western" %)
862 +Parameters required to update the user needs to be sent as post data in JSON format.
720 720  )))
721 721  |(((
722 722  (% class="western" %)
... ... @@ -723,10 +723,10 @@
723 723  GET
724 724  )))|(((
725 725  (% class="western" %)
726 -/questions/lookup?Text=Email
869 +/users/1/partners/2
727 727  )))|(((
728 728  (% class="western" %)
729 -Returns all questions with “Email" in question text
872 +Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.
730 730  )))
731 731  |(((
732 732  (% class="western" %)
... ... @@ -733,34 +733,41 @@
733 733  POST
734 734  )))|(((
735 735  (% class="western" %)
736 -/questions
879 +/users/login
737 737  )))|(((
738 738  (% class="western" %)
739 -Create a new question
882 +Check to see user exist with username/email and password.
740 740  
741 741  (% class="western" %)
742 -JSON of the Questions type object needs to be sent as post data. Id field should not be sent.
743 -)))
744 -|(((
885 +Parameters required to create JSON object with **u** as username, **e** as email and **p** as password and sent is as POST param.
886 +
745 745  (% class="western" %)
746 -PUT
747 -)))|(((
888 +Example:
889 +
748 748  (% class="western" %)
749 -/questions
750 -)))|(((
891 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","e":"abc@[[one-count.com>>url:http://one-count.com||shape="rect"]]","p":"1234"}
892 +
751 751  (% class="western" %)
752 -Update a question
894 +OR
753 753  
754 754  (% class="western" %)
755 -JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
897 +{"u":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
898 +
899 +(% class="western" %)
900 +OR
901 +
902 +(% class="western" %)
903 +{"e":"[[abc@one-count.com>>mailto:abc@one-count.com||shape="rect" class="western"]]","p":"1234"}
904 +
905 +(% class="western" %)
906 +**OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found.
756 756  )))
757 757  
758 -\\
909 +
759 759  
760 760  (% class="western" %)
761 -**GET method can be used to lookup questions.**
912 +**GET method should be used to lookup users.**
762 762  
763 -(% class="wrapped" %)
764 764  |(((
765 765  (% class="western" %)
766 766  **Request**
... ... @@ -779,19 +779,19 @@
779 779  String
780 780  )))|(((
781 781  (% class="western" %)
782 -URL encoded key value string parameters for the question that a user is trying to search.
932 +URL encoded key value string parameters for the lookup. Return property has csv of questions id requested back in Users object.
783 783  
784 784  (% class="western" %)
785 -Params:
935 +Params: Value of question Ids: Key value for Lookup question ids for e.g. 1=user1@[[email.com>>url:http://email.com||shape="rect"]]
786 786  
787 787  (% class="western" %)
788 -Text: Word or phrase that should be present in the question text (String)
789 -
790 -(% class="western" %)
791 -Type: Look up the question type.
938 +return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
792 792  )))
793 793  
794 -(% class="wrapped" %)
941 +
942 +
943 +
944 +
795 795  |(((
796 796  (% class="western" %)
797 797  **Response**
... ... @@ -804,21 +804,20 @@
804 804  )))
805 805  |(((
806 806  (% class="western" %)
807 -Questions
957 +Users
958 +)))|=(((
959 +(% class="western" align="left" %)
960 +Users
808 808  )))|(((
809 809  (% class="western" %)
810 -Questions
811 -)))|(((
812 -(% class="western" %)
813 -Returns found question details.
963 +Found users returned with the demo field requested in return parameter in json format.
814 814  )))
815 815  
816 -\\
966 +
817 817  
818 818  (% class="western" %)
819 -**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).**
969 +**POST method should be used to create users.**
820 820  
821 -(% class="wrapped" %)
822 822  |(((
823 823  (% class="western" %)
824 824  **Request**
... ... @@ -831,46 +831,48 @@
831 831  )))
832 832  |(((
833 833  (% class="western" %)
834 -Questions
983 +Users
835 835  )))|(((
836 836  (% class="western" %)
837 -Questions
986 +Users
838 838  )))|(((
839 839  (% class="western" %)
840 -This defines the question contents and possible responses.
989 +Users object that contains information about user to create. PartnerId Needs to be specified.
841 841  )))
842 -
843 -(% class="wrapped" %)
844 844  |(((
845 845  (% class="western" %)
846 -**Response**
993 +Transactions
847 847  )))|(((
848 848  (% class="western" %)
849 -**Type**
996 +Transactions
850 850  )))|(((
851 851  (% class="western" %)
852 -**Description**
999 +(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.
853 853  )))
854 854  |(((
855 855  (% class="western" %)
856 -QuestionId
1003 +DedupeColumns
857 857  )))|(((
858 858  (% class="western" %)
859 -Int
1006 +String
860 860  )))|(((
861 861  (% class="western" %)
862 -Returns ONEcount question id on successful creation of the question.
1009 +CSV of question id's that should be considered to find duplicate.
863 863  )))
864 -
865 -\\
866 -
1011 +|(((
867 867  (% class="western" %)
868 -PUT method should be used to update question.
1013 +Return
1014 +)))|(((
1015 +(% class="western" %)
1016 +String
1017 +)))|(((
1018 +(% class="western" %)
1019 +CSV of ONEcount QuestionId's requested back in Users object in response.
1020 +)))
869 869  
870 -(% class="wrapped" %)
871 871  |(((
872 872  (% class="western" %)
873 -**Request**
1024 +**Response**
874 874  )))|(((
875 875  (% class="western" %)
876 876  **Type**
... ... @@ -880,19 +880,23 @@
880 880  )))
881 881  |(((
882 882  (% class="western" %)
883 -Questions
1034 +Users
1035 +)))|=(((
1036 +(% class="western" align="left" %)
1037 +Users
884 884  )))|(((
885 885  (% class="western" %)
886 -Questions
887 -)))|(((
888 -(% class="western" %)
889 -This defines the question contents and responses.
1040 +Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned.
890 890  )))
891 891  
892 -(% class="wrapped" %)
1043 +
1044 +
1045 +(% class="western" %)
1046 +**PUT method should be used to update users.**
1047 +
893 893  |(((
894 894  (% class="western" %)
895 -**Response**
1050 +**Request**
896 896  )))|(((
897 897  (% class="western" %)
898 898  **Type**
... ... @@ -902,84 +902,73 @@
902 902  )))
903 903  |(((
904 904  (% class="western" %)
905 -QuestionId
1060 +Users
906 906  )))|(((
907 907  (% class="western" %)
908 -Int
1063 +Users
909 909  )))|(((
910 910  (% class="western" %)
911 -Returns ONEcount question id on successful update of the question.
1066 +Users object with update fields. Return property has csv of questions id requested back in Users object.
912 912  )))
913 -
1068 +|(((
914 914  (% class="western" %)
915 -\\
916 -
1070 +Return
1071 +)))|(((
917 917  (% class="western" %)
918 -Example: Get list of questions from api which has FirstName in text
919 -
920 -{{{curl -X GET -H “Appkey: xxx” https://api.onecount.net/v2/questions/lookup?Text=FirstName}}}
921 -
1073 +String
1074 +)))|(((
922 922  (% class="western" %)
923 -{
924 -
1076 +CSV of ONEcount QuestionId's requested back in Users object in response
1077 +)))
1078 +|(((
925 925  (% class="western" %)
926 -"result": {
927 -
1080 +RequestDate
1081 +)))|(((
928 928  (% class="western" %)
929 -"success": "1",
930 -
1083 +Date
1084 +)))|(((
931 931  (% class="western" %)
932 -"error": {
1086 +RequestDate to use for the demo update. If not provided current date will be used.
1087 +)))
933 933  
1089 +|(((
934 934  (% class="western" %)
935 -"code": "0",
936 -
1091 +**Response**
1092 +)))|(((
937 937  (% class="western" %)
938 -"message": ""
939 -
1094 +**Type**
1095 +)))|(((
940 940  (% class="western" %)
941 -}
942 -
1097 +**Description**
1098 +)))
1099 +|(((
943 943  (% class="western" %)
944 -},
945 -
1101 +Users
1102 +)))|=(((
1103 +(% class="western" align="left" %)
1104 +Users
1105 +)))|(((
946 946  (% class="western" %)
947 -"Questions": [
1107 +Updated user returned with the demo field requested in return parameter in json format.
1108 +)))
948 948  
949 949  (% class="western" %)
950 -{
1111 +
951 951  
952 952  (% class="western" %)
953 -"Id": "6",
1114 +
954 954  
955 955  (% class="western" %)
956 -"Text": "FirstName",
1117 +Create new users. Here in this example the JSON for request is passed in userFile.json file.
957 957  
958 -(% class="western" %)
959 -"Type": "1",
1119 +{{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
960 960  
961 961  (% class="western" %)
962 -"Alias": "FName"
1122 +**Products**
963 963  
964 964  (% class="western" %)
965 -}
966 -
967 -(% class="western" %)
968 -]
969 -
970 -(% class="western" %)
971 -}
972 -
973 -(% class="western" %)
974 -\\
975 -
976 -(% class="western" %)
977 -**COMPONENT: Products**
978 -
979 -(% class="western" %)
980 980  This resource is for manipulating products resource. A product can be created, updated or searched.
981 981  
982 -(% class="wrapped" %)
983 983  |(((
984 984  (% class="western" %)
985 985  **Method**
... ... @@ -1060,12 +1060,11 @@
1060 1060  {"ProductID":"65","ResourceID":”121"}
1061 1061  )))
1062 1062  
1063 -\\
1207 +
1064 1064  
1065 1065  (% class="western" %)
1066 1066  **GET method should be used to lookup products.**
1067 1067  
1068 -(% class="wrapped" %)
1069 1069  |(((
1070 1070  (% class="western" %)
1071 1071  **Request**
... ... @@ -1093,7 +1093,6 @@
1093 1093  Name: Name of the Product for lookup (String)
1094 1094  )))
1095 1095  
1096 -(% class="wrapped" %)
1097 1097  |(((
1098 1098  (% class="western" %)
1099 1099  **Response**
... ... @@ -1115,12 +1115,11 @@
1115 1115  Returns found product details.
1116 1116  )))
1117 1117  
1118 -\\
1260 +
1119 1119  
1120 1120  (% class="western" %)
1121 1121  **POST method should be used to create products.**
1122 1122  
1123 -(% class="wrapped" %)
1124 1124  |(((
1125 1125  (% class="western" %)
1126 1126  **Request**
... ... @@ -1145,10 +1145,9 @@
1145 1145  Example:
1146 1146  
1147 1147  (% class="western" %)
1148 -{"Title":"Test123","Description": "Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1289 +{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1149 1149  )))
1150 1150  
1151 -(% class="wrapped" %)
1152 1152  |(((
1153 1153  (% class="western" %)
1154 1154  **Response**
... ... @@ -1170,12 +1170,11 @@
1170 1170  Product Id of the newly created product.
1171 1171  )))
1172 1172  
1173 -\\
1313 +
1174 1174  
1175 1175  (% class="western" %)
1176 1176  PUT method should be used to update an individual product given the product info.
1177 1177  
1178 -(% class="wrapped" %)
1179 1179  |(((
1180 1180  (% class="western" %)
1181 1181  **Request**
... ... @@ -1203,10 +1203,9 @@
1203 1203  **Example**:
1204 1204  
1205 1205  (% class="western" %)
1206 -{"Title":"Test123","Description": "Testss","PrimaryFormId":10,"ResourceID":17}
1345 +{"Title":"Test123","Description":Testss","Terms":{"Name":"Product123"},"PrimaryFormId":10,"ResourceID":17}
1207 1207  )))
1208 1208  
1209 -(% class="wrapped" %)
1210 1210  |(((
1211 1211  (% class="western" %)
1212 1212  **Response**
... ... @@ -1228,15 +1228,14 @@
1228 1228  Product id of the updated product.
1229 1229  )))
1230 1230  
1231 -\\
1369 +
1232 1232  
1233 1233  (% class="western" %)
1234 -**COMPONENT: Terms**
1372 +**Terms**
1235 1235  
1236 1236  (% class="western" %)
1237 1237  This resource is for manipulating terms resource. A term can be created, updated or searched.
1238 1238  
1239 -(% class="wrapped" %)
1240 1240  |(((
1241 1241  (% class="western" %)
1242 1242  **Method**
... ... @@ -1288,12 +1288,11 @@
1288 1288  JSON of the terms type object needs to be sent as post data. Id field is mandatory for update.
1289 1289  )))
1290 1290  
1291 -\\
1428 +
1292 1292  
1293 1293  (% class="western" %)
1294 1294  **GET method should be used to lookup products.**
1295 1295  
1296 -(% class="wrapped" %)
1297 1297  |(((
1298 1298  (% class="western" %)
1299 1299  **Request**
... ... @@ -1321,7 +1321,6 @@
1321 1321  Name: Name of the term for lookup (String)
1322 1322  )))
1323 1323  
1324 -(% class="wrapped" %)
1325 1325  |(((
1326 1326  (% class="western" %)
1327 1327  **Response**
... ... @@ -1343,12 +1343,11 @@
1343 1343  Returns found term details.
1344 1344  )))
1345 1345  
1346 -\\
1481 +
1347 1347  
1348 1348  (% class="western" %)
1349 1349  **POST method should be used to create products.**
1350 1350  
1351 -(% class="wrapped" %)
1352 1352  |(((
1353 1353  (% class="western" %)
1354 1354  **Request**
... ... @@ -1379,7 +1379,6 @@
1379 1379  {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17}
1380 1380  )))
1381 1381  
1382 -(% class="wrapped" %)
1383 1383  |(((
1384 1384  (% class="western" %)
1385 1385  **Response**
... ... @@ -1401,12 +1401,11 @@
1401 1401  Term Id of the newly created term.
1402 1402  )))
1403 1403  
1404 -\\
1537 +
1405 1405  
1406 1406  (% class="western" %)
1407 1407  PUT method should be used to update an individual term given the term info.
1408 1408  
1409 -(% class="wrapped" %)
1410 1410  |(((
1411 1411  (% class="western" %)
1412 1412  **Request**
... ... @@ -1428,7 +1428,7 @@
1428 1428  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.
1429 1429  
1430 1430  (% class="western" %)
1431 -\\
1563 +
1432 1432  
1433 1433  (% class="western" %)
1434 1434  **Example**:
... ... @@ -1437,7 +1437,6 @@
1437 1437  {"Name":"Test123","Description":Testss","Duration":10,"ProductId":17}
1438 1438  )))
1439 1439  
1440 -(% class="wrapped" %)
1441 1441  |(((
1442 1442  (% class="western" %)
1443 1443  **Response**
... ... @@ -1459,51 +1459,14 @@
1459 1459  term id of the updated term.
1460 1460  )))
1461 1461  
1462 -\\
1593 +
1463 1463  
1464 1464  (% class="western" %)
1465 -**COMPONENT: Resources**
1596 +**Resources**
1466 1466  
1467 1467  (% class="western" %)
1468 -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.
1469 -
1470 -* (((
1471 -(% class="western" %)
1472 -questions
1473 -)))
1474 -* (((
1475 -(% class="western" %)
1476 -users
1477 -)))
1478 -* (((
1479 -(% class="western" %)
1480 -products
1481 -)))
1482 -* (((
1483 -(% class="western" %)
1484 -terms
1485 -)))
1486 -* (((
1487 -(% class="western" %)
1488 -resources
1489 -)))
1490 -* (((
1491 -(% class="western" %)
1492 -sources
1493 -)))
1494 -* (((
1495 -(% class="western" %)
1496 -transactions
1497 -)))
1498 -
1499 -(% class="western" %)
1500 -**
1501 -**
1502 -
1503 -(% class="western" %)
1504 1504  This resource is for manipulating resources resource. A resource can be created, updated or searched.
1505 1505  
1506 -(% class="wrapped" %)
1507 1507  |(((
1508 1508  (% class="western" %)
1509 1509  **Method**
... ... @@ -1555,12 +1555,11 @@
1555 1555  JSON of the resources type object needs to be sent as post data. Id field is mandatory for update.
1556 1556  )))
1557 1557  
1558 -\\
1652 +
1559 1559  
1560 1560  (% class="western" %)
1561 -**GET method should be used to lookup resources.**
1655 +**GET method should be used to lookup products.**
1562 1562  
1563 -(% class="wrapped" %)
1564 1564  |(((
1565 1565  (% class="western" %)
1566 1566  **Request**
... ... @@ -1588,7 +1588,6 @@
1588 1588  Name: Name of the resource for lookup (String)
1589 1589  )))
1590 1590  
1591 -(% class="wrapped" %)
1592 1592  |(((
1593 1593  (% class="western" %)
1594 1594  **Response**
... ... @@ -1610,12 +1610,11 @@
1610 1610  Returns found resource details.
1611 1611  )))
1612 1612  
1613 -\\
1705 +
1614 1614  
1615 1615  (% class="western" %)
1616 -**POST method should be used to create resources.**
1708 +**POST method should be used to create products.**
1617 1617  
1618 -(% class="wrapped" %)
1619 1619  |(((
1620 1620  (% class="western" %)
1621 1621  **Request**
... ... @@ -1637,7 +1637,7 @@
1637 1637  resource details in json to be sent as post data. Id should not be set.
1638 1638  
1639 1639  (% class="western" %)
1640 -**Possible Request Params**: Name, Description, Type, Value, FreePass
1731 +**Possible Request Params**: Name, Description, Type, Value
1641 1641  
1642 1642  (% class="western" %)
1643 1643  **Example**:
... ... @@ -1644,18 +1644,8 @@
1644 1644  
1645 1645  (% class="western" %)
1646 1646  {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”}
1647 -
1648 -(% class="western" %)
1649 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]}
1650 -
1651 -(% class="western" %)
1652 -{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”, "FreePass":1}
1653 -
1654 -(% class="western" %)
1655 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1}
1656 1656  )))
1657 1657  
1658 -(% class="wrapped" %)
1659 1659  |(((
1660 1660  (% class="western" %)
1661 1661  **Response**
... ... @@ -1677,12 +1677,11 @@
1677 1677  Resource Id of the newly created resource.
1678 1678  )))
1679 1679  
1680 -\\
1761 +
1681 1681  
1682 1682  (% class="western" %)
1683 1683  PUT method should be used to update an individual resource given the resource info.
1684 1684  
1685 -(% class="wrapped" %)
1686 1686  |(((
1687 1687  (% class="western" %)
1688 1688  **Request**
... ... @@ -1701,28 +1701,18 @@
1701 1701  Resource
1702 1702  )))|(((
1703 1703  (% class="western" %)
1704 -Resource details to be updated injsonformat to be sent withrequest. Id property needs to be set to identify the resource to be updated.
1784 +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.
1705 1705  
1706 1706  (% class="western" %)
1707 -\\
1787 +
1708 1708  
1709 1709  (% class="western" %)
1710 -Examples:
1790 +Example:
1711 1711  
1712 1712  (% class="western" %)
1713 1713  {"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”}
1714 -
1715 -(% class="western" %)
1716 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"]}
1717 -
1718 -(% class="western" %)
1719 -{"Name":"Test123","Description":Testss","Type":3,"Value":”/digital/”,"FreePass":1}
1720 -
1721 -(% class="western" %)
1722 -{"Name":"Test123","Description":Testss","Type":3,"Value":[”/digital/”, "/article/"],"FreePass":1}
1723 1723  )))
1724 1724  
1725 -(% class="wrapped" %)
1726 1726  |(((
1727 1727  (% class="western" %)
1728 1728  **Response**
... ... @@ -1744,21 +1744,20 @@
1744 1744  resource id of the updated resource.
1745 1745  )))
1746 1746  
1747 -\\
1817 +
1748 1748  
1749 -\\
1819 +(% class="western" %)
1820 +
1750 1750  
1751 1751  (% class="western" %)
1752 -\\
1823 +
1753 1753  
1754 1754  (% class="western" %)
1755 -**COMPONENT: Source Codes
1756 -**
1826 +**Sources**
1757 1757  
1758 1758  (% class="western" %)
1759 -This resource is for manipulating source code for a resource. A source code can be created, updated or searched.
1829 +This resource is for manipulating sources resource. A source can be created, updated or searched.
1760 1760  
1761 -(% class="wrapped" %)
1762 1762  |(((
1763 1763  (% class="western" %)
1764 1764  **Method**
... ... @@ -1810,12 +1810,11 @@
1810 1810  JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update.
1811 1811  )))
1812 1812  
1813 -\\
1882 +
1814 1814  
1815 1815  (% class="western" %)
1816 1816  **Sources can be looked up given the code or Id. GET method should be used for lookup.**
1817 1817  
1818 -(% class="wrapped" %)
1819 1819  |(((
1820 1820  (% class="western" %)
1821 1821  **Request**
... ... @@ -1843,7 +1843,6 @@
1843 1843  Source: Source value (String)
1844 1844  )))
1845 1845  
1846 -(% class="wrapped" %)
1847 1847  |(((
1848 1848  (% class="western" %)
1849 1849  **Response**
... ... @@ -1865,15 +1865,14 @@
1865 1865  Returns found source details.
1866 1866  )))
1867 1867  
1868 -\\
1935 +
1869 1869  
1870 1870  (% class="western" %)
1871 -\\
1938 +
1872 1872  
1873 1873  (% class="western" %)
1874 1874  POST method should be used to create an individual source given the source parameters.
1875 1875  
1876 -(% class="wrapped" %)
1877 1877  |(((
1878 1878  (% class="western" %)
1879 1879  **Request**
... ... @@ -1895,7 +1895,6 @@
1895 1895  Defines the contents that makes up the source. Id parameters should not be set.
1896 1896  )))
1897 1897  
1898 -(% class="wrapped" %)
1899 1899  |(((
1900 1900  (% class="western" %)
1901 1901  **Response**
... ... @@ -1917,12 +1917,11 @@
1917 1917  Returns created source code id.
1918 1918  )))
1919 1919  
1920 -\\
1985 +
1921 1921  
1922 1922  (% class="western" %)
1923 1923  **PUT method can be used to update an individual source given the id.**
1924 1924  
1925 -(% class="wrapped" %)
1926 1926  |(((
1927 1927  (% class="western" %)
1928 1928  **Request**
... ... @@ -1944,7 +1944,6 @@
1944 1944  Defines the contents that makes up the source. The id parameter needs to be set which will identify the id of the source to be updated.
1945 1945  )))
1946 1946  
1947 -(% class="wrapped" %)
1948 1948  |(((
1949 1949  (% class="western" %)
1950 1950  **Response**
... ... @@ -1966,18 +1966,17 @@
1966 1966  Returns updated source id.
1967 1967  )))
1968 1968  
1969 -\\
2032 +
1970 1970  
1971 1971  (% class="western" %)
1972 -\\
2035 +
1973 1973  
1974 1974  (% class="western" %)
1975 -**COMPONENT: Transactions**
2038 +**Transactions**
1976 1976  
1977 1977  (% class="western" %)
1978 1978  This resource is for manipulating transactions resource. A transaction can be created or searched.
1979 1979  
1980 -(% class="wrapped" %)
1981 1981  |(((
1982 1982  (% class="western" %)
1983 1983  **Method**
... ... @@ -2019,15 +2019,14 @@
2019 2019  JSON of the Transactions type object needs to be sent as post data. Id field should not be sent.
2020 2020  )))
2021 2021  
2022 -\\
2084 +
2023 2023  
2024 2024  (% class="western" %)
2025 -\\
2087 +
2026 2026  
2027 2027  (% class="western" %)
2028 2028  Transactions can be looked up using transactionId, date range, userid. Use GET method to do lookup.
2029 2029  
2030 -(% class="wrapped" %)
2031 2031  |(((
2032 2032  (% class="western" %)
2033 2033  **Request**
... ... @@ -2061,7 +2061,10 @@
2061 2061  EndDate: When the search should end. Only valid when UserId is set. (Date)
2062 2062  )))
2063 2063  
2064 -(% class="wrapped" style="letter-spacing: 0.0px;" %)
2125 +
2126 +
2127 +
2128 +
2065 2065  |(((
2066 2066  (% class="western" %)
2067 2067  **Response**
... ... @@ -2080,27 +2080,14 @@
2080 2080  Transactions
2081 2081  )))|(((
2082 2082  (% class="western" %)
2083 -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.
2147 +Returns all transaction that satisfies the search criteria.
2084 2084  )))
2085 2085  
2086 -\\
2150 +
2087 2087  
2088 -**Sample response for /(% style="color: rgb(80,80,80);" %)transactions/lookup?UserId=25255105:(%%)**
2089 -
2090 -(% class="wrapped" %)
2091 -|=(((
2092 -(% class="content-wrapper" %)
2093 -(((
2094 -[[image:attach:Screen Shot 2020-02-26 at 11.14.29 AM.png||width="1407"]]
2095 -)))
2096 -)))
2097 -
2098 -\\
2099 -
2100 2100  (% class="western" %)
2101 2101  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.
2102 2102  
2103 -(% class="wrapped" %)
2104 2104  |(((
2105 2105  (% class="western" %)
2106 2106  **Request**
... ... @@ -2122,7 +2122,6 @@
2122 2122  Contains fields that define a transaction. Id field should not be set.
2123 2123  )))
2124 2124  
2125 -(% class="wrapped" %)
2126 2126  |(((
2127 2127  (% class="western" %)
2128 2128  **Response**
... ... @@ -2144,41 +2144,36 @@
2144 2144  Returns transactionId of the newly created transaction.
2145 2145  )))
2146 2146  
2147 -\\
2197 +
2148 2148  
2149 -\\
2150 -
2151 2151  (% class="western" %)
2152 -**COMPONENT: Leads
2153 -**
2200 +**Stats**
2154 2154  
2155 2155  (% class="western" %)
2156 2156  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.
2157 2157  
2158 2158  (% class="western" %)
2159 -\\
2206 +
2160 2160  
2161 2161  (% class="western" %)
2162 -\\
2209 +
2163 2163  
2164 2164  (% class="western" %)
2165 -\\
2212 +
2166 2166  
2167 2167  (% class="western" %)
2168 -\\
2215 +
2169 2169  
2170 2170  (% class="western" %)
2171 -\\
2218 +
2172 2172  
2173 2173  (% class="western" %)
2174 -**Telemarketing Leads
2175 -**
2221 +**Telemarketing**
2176 2176  
2177 2177  (% class="western" %)
2178 2178  
2179 2179  This resource is for manipulating telemarketing stat resource. A telemarketing stat can be created or listed.
2180 2180  
2181 -(% class="wrapped" %)
2182 2182  |(((
2183 2183  (% class="western" %)
2184 2184  **Method**
... ... @@ -2220,12 +2220,11 @@
2220 2220  JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent.
2221 2221  )))
2222 2222  
2223 -\\
2268 +
2224 2224  
2225 2225  (% class="western" %)
2226 2226  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.
2227 2227  
2228 -(% class="wrapped" %)
2229 2229  |(((
2230 2230  (% class="western" %)
2231 2231  **Request**
... ... @@ -2290,16 +2290,15 @@
2290 2290  )))
2291 2291  |(((
2292 2292  (% class="western" %)
2293 -\\
2337 +
2294 2294  )))|(((
2295 2295  (% class="western" %)
2296 -\\
2340 +
2297 2297  )))|(((
2298 2298  (% class="western" %)
2299 -\\
2343 +
2300 2300  )))
2301 2301  
2302 -(% class="wrapped" %)
2303 2303  |(((
2304 2304  (% class="western" %)
2305 2305  **Response**
... ... @@ -2321,23 +2321,14 @@
2321 2321  Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format.
2322 2322  )))
2323 2323  
2324 -\\
2367 +
2325 2325  
2326 -\\
2327 -
2328 -\\
2329 -
2330 -\\
2331 -
2332 -\\
2333 -
2334 2334  (% class="western" %)
2335 -**API REFERENCE**
2370 +**Reference**
2336 2336  
2337 2337  (% class="western" %)
2338 2338  **Type: Questions**
2339 2339  
2340 -(% class="wrapped" %)
2341 2341  |(((
2342 2342  (% class="western" %)
2343 2343  **Property Name**
... ... @@ -2378,12 +2378,12 @@
2378 2378  (% class="western" %)
2379 2379  Determines which type of question it is. Textbox, checkbox, select, radio.
2380 2380  There can be 6 types of questions.
2381 -type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2382 -type=2 means textarea type question or long response type question.
2383 -type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2384 -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.
2385 -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.
2386 -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.
2415 + type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2416 + type=2 means textarea type question or long response type question.
2417 + type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2418 + 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.
2419 + 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.
2420 + 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.
2387 2387  )))
2388 2388  |(((
2389 2389  (% class="western" %)
... ... @@ -2406,18 +2406,17 @@
2406 2406  Alias for admin purpose.
2407 2407  )))
2408 2408  
2409 -\\
2443 +
2410 2410  
2411 2411  (% class="western" %)
2412 -\\
2446 +
2413 2413  
2414 2414  (% class="western" %)
2415 -\\
2449 +
2416 2416  
2417 2417  (% class="western" %)
2418 2418  **Type: Choices**
2419 2419  
2420 -(% class="wrapped" %)
2421 2421  |(((
2422 2422  (% class="western" %)
2423 2423  **Property Name**
... ... @@ -2479,12 +2479,11 @@
2479 2479  Tied to which question id.
2480 2480  )))
2481 2481  
2482 -\\
2515 +
2483 2483  
2484 2484  (% class="western" %)
2485 2485  **Type: Users**
2486 2486  
2487 -(% class="wrapped" %)
2488 2488  |(((
2489 2489  (% class="western" %)
2490 2490  **Property Name**
... ... @@ -2536,12 +2536,11 @@
2536 2536  Request date.
2537 2537  )))
2538 2538  
2539 -\\
2571 +
2540 2540  
2541 2541  (% class="western" %)
2542 2542  **Type: Demo**
2543 2543  
2544 -(% class="wrapped" %)
2545 2545  |(((
2546 2546  (% class="western" %)
2547 2547  **Property Name**
... ... @@ -2583,12 +2583,11 @@
2583 2583  ...
2584 2584  )))
2585 2585  
2586 -\\
2617 +
2587 2587  
2588 2588  (% class="western" %)
2589 2589  **Type: Transactions**
2590 2590  
2591 -(% class="wrapped" %)
2592 2592  |(((
2593 2593  (% class="western" %)
2594 2594  **Property Name**
... ... @@ -2730,12 +2730,11 @@
2730 2730  If there is amount (USD) included in transaction.
2731 2731  )))
2732 2732  
2733 -\\
2763 +
2734 2734  
2735 2735  (% class="western" %)
2736 2736  **Type: Sources**
2737 2737  
2738 -(% class="wrapped" %)
2739 2739  |(((
2740 2740  (% class="western" %)
2741 2741  **Property Name**
... ... @@ -2787,15 +2787,14 @@
2787 2787  If this is a child source then list the parent source id.
2788 2788  )))
2789 2789  
2790 -\\
2819 +
2791 2791  
2792 2792  (% class="western" %)
2793 -\\
2822 +
2794 2794  
2795 2795  (% class="western" %)
2796 2796  **Type: Products**
2797 2797  
2798 -(% class="wrapped" %)
2799 2799  |(((
2800 2800  (% class="western" %)
2801 2801  **Property Name**
... ... @@ -2847,12 +2847,11 @@
2847 2847  (Array of) Terms associated with the product.
2848 2848  )))
2849 2849  
2850 -\\
2878 +
2851 2851  
2852 2852  (% class="western" %)
2853 2853  **Type: Terms**
2854 2854  
2855 -(% class="wrapped" %)
2856 2856  |(((
2857 2857  (% class="western" %)
2858 2858  **Property Name**
... ... @@ -2934,12 +2934,11 @@
2934 2934  If there is price (USD) for the term.
2935 2935  )))
2936 2936  
2937 -\\
2964 +
2938 2938  
2939 2939  (% class="western" %)
2940 2940  **Type: Resources**
2941 2941  
2942 -(% class="wrapped" %)
2943 2943  |(((
2944 2944  (% class="western" %)
2945 2945  **Property Name**
... ... @@ -3011,30 +3011,14 @@
3011 3011  )))|(((
3012 3012  (% class="western" %)
3013 3013  String
3014 -
3015 -(% class="western" %)
3016 -or
3017 -
3018 -(% class="western" %)
3019 -Array
3020 3020  )))|(((
3021 3021  (% class="western" %)
3022 -Value of Resource Type:
3042 +Value of Resource Type.
3023 3023  
3024 3024  (% class="western" %)
3025 -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.
3045 +Example : if the Type sent is 3 then Value would be **/digital/**
3026 3026  
3027 3027  (% class="western" %)
3028 -For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests.
3029 -
3030 -(% class="western" %)
3031 -Example :
3032 -
3033 -(% class="western" %)
3034 -if the Type sent is 3 with one value then Value would be "**/digital/**" or **["/digital"/].** We recommend using the second approach of **["/digital"/].** **
3035 -**if the Type sent is 3 with two values then Value would be ["**/digital/**", "**/articles/**"]
3036 -
3037 -(% class="western" %)
3038 3038  For Function type resource leave it blank.
3039 3039  )))
3040 3040  |(((
... ... @@ -3045,25 +3045,14 @@
3045 3045  Int
3046 3046  )))|(((
3047 3047  (% class="western" %)
3048 -Default limit is 25 but if all the data needs to be pulled then pass limit=0.
3058 +Default limit is 25 but all the data needs to be pulled then pass limit=0.
3049 3049  )))
3050 -|(% colspan="1" %)(% colspan="1" %)
3051 -(((
3052 -FreePass
3053 -)))|(% colspan="1" %)(% colspan="1" %)
3054 -(((
3055 -Int
3056 -)))|(% colspan="1" %)(% colspan="1" %)
3057 -(((
3058 -Default value is 0. This parameter is used to provide access to protected content.
3059 -)))
3060 3060  
3061 -\\
3061 +
3062 3062  
3063 3063  (% class="western" %)
3064 3064  **Type: Telemarketing**
3065 3065  
3066 -(% class="wrapped" %)
3067 3067  |(((
3068 3068  (% class="western" %)
3069 3069  **Property Name**
... ... @@ -3148,12 +3148,8 @@
3148 3148  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.
3149 3149  
3150 3150  (% class="western" %)
3151 -\\
3150 +
3152 3152  
3153 3153  (% class="western" %)
3154 3154  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.
3155 3155  )))
3156 -
3157 -\\
3158 -
3159 -\\
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -108691457
1 +3538998
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/108691457/ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/3538998/sonish-APIDocument-230317-1008-18