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

From version 19.1
edited by Admin
on 2023/12/14 21:08
Change comment: There is no comment for this version
To version 14.1
edited by ayush
on 2017/05/01 13:27
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -OLD-ONEcount API Documentation
1 +ONEcount API Documentation
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.ayush
Content
... ... @@ -66,7 +66,8 @@
66 66  **Appkey**: THIS WILL BE PROVIDED TO YOU
67 67  
68 68  (% class="western" %)
69 -**~ **
69 +**
70 +**
70 70  
71 71  (% class="western" %)
72 72  Your HTTP requests to a REST API resource should contain the following information:
... ... @@ -89,7 +89,7 @@
89 89  )))
90 90  
91 91  (% class="western" %)
92 -\\
93 +
93 93  
94 94  (% class="western" %)
95 95  **General API Usage**
... ... @@ -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 -\\
105 +
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 -\\
168 +
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,10 +220,11 @@
220 220   ]}]}}}}
221 221  
222 222  (% class="western" %)
223 -\\
224 +
224 224  
225 225  (% class="western" %)
226 -**~ **
227 +**
228 +**
227 227  
228 228  **COMPONENT: Users**
229 229  
... ... @@ -245,7 +245,7 @@
245 245  (% class="western" %)
246 246  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.
247 247  
248 -\\
250 +
249 249  
250 250  (% class="wrapped" %)
251 251  |(((
... ... @@ -273,7 +273,7 @@
273 273  GET
274 274  )))|(((
275 275  (% class="western" %)
276 -/users/<ocid or ocid_hash>
278 +/users/1
277 277  )))|(((
278 278  (% class="western" %)
279 279  Get data for user id 1. The user id can be a numeric value or a hash
... ... @@ -362,7 +362,7 @@
362 362  **OUTPUT** : Should get ocid of the user if it finds it otherwise get and error with msg user not found.
363 363  )))
364 364  
365 -\\
367 +
366 366  
367 367  (% class="western" %)
368 368  **GET method should be used to lookup users.**
... ... @@ -393,14 +393,11 @@
393 393  
394 394  (% class="western" %)
395 395  return: csv of question id that is requested back. The Users object returned will only have these properties plus UserId (String)
396 -
397 -(% class="western" %)
398 -If return is not provided, all the demographics will be returned.
399 399  )))
400 400  
401 -\\
400 +
402 402  
403 -\\
402 +
404 404  
405 405  (% class="wrapped" %)
406 406  |(((
... ... @@ -421,37 +421,11 @@
421 421  Users
422 422  )))|(((
423 423  (% class="western" %)
424 -Found users returned with the demo field requested in return parameter in json format
423 +Found users returned with the demo field requested in return parameter in json format.
425 425  )))
426 426  
427 -\\
426 +
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 456  **POST method should be used to create users.**
457 457  
... ... @@ -529,7 +529,7 @@
529 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.
530 530  )))
531 531  
532 -\\
505 +
533 533  
534 534  (% class="western" %)
535 535  **PUT method should be used to update users.**
... ... @@ -599,10 +599,10 @@
599 599  )))
600 600  
601 601  (% class="western" %)
602 -\\
575 +
603 603  
604 604  (% class="western" %)
605 -\\
578 +
606 606  
607 607  (% class="western" %)
608 608  Create new users. Here in this example the JSON for request is passed in userFile.json file.
... ... @@ -610,12 +610,14 @@
610 610  {{{curl -X POST -H “Appkey: xxx” -H "Content-Type: application/json" –data-binary -d '@userFile.json' https://api.onecount.net/v2/users}}}
611 611  
612 612  (% class="western" %)
613 -**~ **
586 +**
587 +**
614 614  
615 615  (% class="western" %)
616 -**~ **
590 +**
591 +**
617 617  
618 -\\
593 +
619 619  
620 620  (% class="western" %)
621 621  **COMPONENT: Questions**
... ... @@ -751,7 +751,7 @@
751 751  JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.
752 752  )))
753 753  
754 -\\
729 +
755 755  
756 756  (% class="western" %)
757 757  **GET method can be used to lookup questions.**
... ... @@ -809,7 +809,7 @@
809 809  Returns found question details.
810 810  )))
811 811  
812 -\\
787 +
813 813  
814 814  (% class="western" %)
815 815  **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).**
... ... @@ -858,7 +858,7 @@
858 858  Returns ONEcount question id on successful creation of the question.
859 859  )))
860 860  
861 -\\
836 +
862 862  
863 863  (% class="western" %)
864 864  PUT method should be used to update question.
... ... @@ -908,7 +908,7 @@
908 908  )))
909 909  
910 910  (% class="western" %)
911 -\\
886 +
912 912  
913 913  (% class="western" %)
914 914  Example: Get list of questions from api which has FirstName in text
... ... @@ -967,7 +967,7 @@
967 967  }
968 968  
969 969  (% class="western" %)
970 -\\
945 +
971 971  
972 972  (% class="western" %)
973 973  **COMPONENT: Products**
... ... @@ -1056,7 +1056,7 @@
1056 1056  {"ProductID":"65","ResourceID":”121"}
1057 1057  )))
1058 1058  
1059 -\\
1034 +
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 -\\
1089 +
1115 1115  
1116 1116  (% class="western" %)
1117 1117  **POST method should be used to create products.**
... ... @@ -1166,7 +1166,7 @@
1166 1166  Product Id of the newly created product.
1167 1167  )))
1168 1168  
1169 -\\
1144 +
1170 1170  
1171 1171  (% class="western" %)
1172 1172  PUT method should be used to update an individual product given the product info.
... ... @@ -1224,7 +1224,7 @@
1224 1224  Product id of the updated product.
1225 1225  )))
1226 1226  
1227 -\\
1202 +
1228 1228  
1229 1229  (% class="western" %)
1230 1230  **COMPONENT: Terms**
... ... @@ -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 -\\
1262 +
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 -\\
1317 +
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 -\\
1375 +
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 -\\
1402 +
1428 1428  
1429 1429  (% class="western" %)
1430 1430  **Example**:
... ... @@ -1455,7 +1455,7 @@
1455 1455  term id of the updated term.
1456 1456  )))
1457 1457  
1458 -\\
1433 +
1459 1459  
1460 1460  (% class="western" %)
1461 1461  **COMPONENT: Resources**
... ... @@ -1493,7 +1493,8 @@
1493 1493  )))
1494 1494  
1495 1495  (% class="western" %)
1496 -**~ **
1471 +**
1472 +**
1497 1497  
1498 1498  (% class="western" %)
1499 1499  This resource is for manipulating resources resource. A resource can be created, updated or searched.
... ... @@ -1550,7 +1550,7 @@
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 -\\
1529 +
1554 1554  
1555 1555  (% class="western" %)
1556 1556  **GET method should be used to lookup resources.**
... ... @@ -1605,7 +1605,7 @@
1605 1605  Returns found resource details.
1606 1606  )))
1607 1607  
1608 -\\
1584 +
1609 1609  
1610 1610  (% class="western" %)
1611 1611  **POST method should be used to create resources.**
... ... @@ -1672,7 +1672,7 @@
1672 1672  Resource Id of the newly created resource.
1673 1673  )))
1674 1674  
1675 -\\
1651 +
1676 1676  
1677 1677  (% class="western" %)
1678 1678  PUT method should be used to update an individual resource given the resource info.
... ... @@ -1699,7 +1699,7 @@
1699 1699  Resource details to be updated injsonformat to be sent withrequest. Id property needs to be set to identify the resource to be updated.
1700 1700  
1701 1701  (% class="western" %)
1702 -\\
1678 +
1703 1703  
1704 1704  (% class="western" %)
1705 1705  Examples:
... ... @@ -1739,12 +1739,12 @@
1739 1739  resource id of the updated resource.
1740 1740  )))
1741 1741  
1742 -\\
1718 +
1743 1743  
1744 -\\
1720 +
1745 1745  
1746 1746  (% class="western" %)
1747 -\\
1723 +
1748 1748  
1749 1749  (% class="western" %)
1750 1750  **COMPONENT: Source Codes
... ... @@ -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 -\\
1784 +
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 -\\
1839 +
1864 1864  
1865 1865  (% class="western" %)
1866 -\\
1842 +
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 -\\
1891 +
1916 1916  
1917 1917  (% class="western" %)
1918 1918  **PUT method can be used to update an individual source given the id.**
... ... @@ -1961,10 +1961,10 @@
1961 1961  Returns updated source id.
1962 1962  )))
1963 1963  
1964 -\\
1940 +
1965 1965  
1966 1966  (% class="western" %)
1967 -\\
1943 +
1968 1968  
1969 1969  (% class="western" %)
1970 1970  **COMPONENT: Transactions**
... ... @@ -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 -\\
1993 +
2018 2018  
2019 2019  (% class="western" %)
2020 -\\
1996 +
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;" %)
2035 +
2036 +
2037 +
2038 +
2039 +(% 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.
2058 +Returns all transaction that satisfies the search criteria.
2079 2079  )))
2080 2080  
2081 -\\
2061 +
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,9 +2139,9 @@
2139 2139  Returns transactionId of the newly created transaction.
2140 2140  )))
2141 2141  
2142 -\\
2110 +
2143 2143  
2144 -\\
2112 +
2145 2145  
2146 2146  (% class="western" %)
2147 2147  **COMPONENT: Leads
... ... @@ -2151,19 +2151,19 @@
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 -\\
2122 +
2155 2155  
2156 2156  (% class="western" %)
2157 -\\
2125 +
2158 2158  
2159 2159  (% class="western" %)
2160 -\\
2128 +
2161 2161  
2162 2162  (% class="western" %)
2163 -\\
2131 +
2164 2164  
2165 2165  (% class="western" %)
2166 -\\
2134 +
2167 2167  
2168 2168  (% class="western" %)
2169 2169  **Telemarketing Leads
... ... @@ -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 -\\
2186 +
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 -\\
2256 +
2289 2289  )))|(((
2290 2290  (% class="western" %)
2291 -\\
2259 +
2292 2292  )))|(((
2293 2293  (% class="western" %)
2294 -\\
2262 +
2295 2295  )))
2296 2296  
2297 2297  (% class="wrapped" %)
... ... @@ -2316,15 +2316,15 @@
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 -\\
2287 +
2320 2320  
2321 -\\
2289 +
2322 2322  
2323 -\\
2291 +
2324 2324  
2325 -\\
2293 +
2326 2326  
2327 -\\
2295 +
2328 2328  
2329 2329  (% class="western" %)
2330 2330  **API REFERENCE**
... ... @@ -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.
2344 + type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
2345 + type=2 means textarea type question or long response type question.
2346 + type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
2347 + 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.
2348 + 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.
2349 + 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 -\\
2372 +
2405 2405  
2406 2406  (% class="western" %)
2407 -\\
2375 +
2408 2408  
2409 2409  (% class="western" %)
2410 -\\
2378 +
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 -\\
2445 +
2478 2478  
2479 2479  (% class="western" %)
2480 2480  **Type: Users**
... ... @@ -2531,7 +2531,7 @@
2531 2531  Request date.
2532 2532  )))
2533 2533  
2534 -\\
2502 +
2535 2535  
2536 2536  (% class="western" %)
2537 2537  **Type: Demo**
... ... @@ -2578,7 +2578,7 @@
2578 2578  ...
2579 2579  )))
2580 2580  
2581 -\\
2549 +
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 -\\
2696 +
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 -\\
2753 +
2786 2786  
2787 2787  (% class="western" %)
2788 -\\
2756 +
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 -\\
2813 +
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 -\\
2900 +
2933 2933  
2934 2934  (% class="western" %)
2935 2935  **Type: Resources**
... ... @@ -3040,7 +3040,7 @@
3040 3040  Int
3041 3041  )))|(((
3042 3042  (% class="western" %)
3043 -Default limit is 25 but if all the data needs to be pulled then pass limit=0.
3011 +Default limit is 25 but all the data needs to be pulled then pass limit=0.
3044 3044  )))
3045 3045  |(% colspan="1" %)(% colspan="1" %)
3046 3046  (((
... ... @@ -3053,7 +3053,7 @@
3053 3053  Default value is 0. This parameter is used to provide access to protected content.
3054 3054  )))
3055 3055  
3056 -\\
3024 +
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 -\\
3114 +
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 -3538995
1 +4882506
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/3538995/OLD-ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/4882506/ONEcount API Documentation