Last modified by Rayaan Ahmed on 2025/02/09 22:20

From version 6.1
edited by rayaan@one-count_com
on 2023/12/12 08:01
Change comment: There is no comment for this version
To version 3.1
edited by rayaan@one-count_com
on 2023/12/12 06:21
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -115,7 +115,7 @@
115 115  (% class="western" %)
116 116  API will output the response in a JSON format discussed below.
117 117  
118 -{{code language="yml" theme="RDark" title="Response"}}
118 +{{code language="yml" theme="RDark" title="Response" collapse="true"}}
119 119  {
120 120   "result": {
121 121   "success": "1",
... ... @@ -227,7 +227,7 @@
227 227  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.
228 228  
229 229  (% class="western" %)
230 -Return parameter defines a CSV of question id that are requested back in response.
230 +Return parameter defines a csv of question id that are requested back in response.
231 231  )))
232 232  (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
233 233  (((
... ... @@ -335,13 +335,13 @@
335 335  
336 336  (% style="color: rgb(107,107,107);" %)Request
337 337  
338 -{{code language="php" theme="RDark" title="Get All Users Request"}}
338 +{{code language="php" theme="RDark" title="Get All Users Request" collapse="true"}}
339 339  <?php
340 340  
341 341  $curl = curl_init();
342 342  
343 343  curl_setopt_array($curl, array(
344 - CURLOPT_URL => 'https://api.onecount.net/v2/users',
344 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users',
345 345   CURLOPT_RETURNTRANSFER => true,
346 346   CURLOPT_ENCODING => '',
347 347   CURLOPT_MAXREDIRS => 10,
... ... @@ -364,7 +364,7 @@
364 364  
365 365  \\
366 366  
367 -(% style="color: rgb(107,107,107);" %)Response  200 OK
367 +(% style="color: rgb(107,107,107);" %)Response  200 OK
368 368  
369 369  {{code language="yml" theme="RDark" title="Get All Users Response" collapse="true"}}
370 370  {
... ... @@ -875,13 +875,13 @@
875 875  
876 876  (% style="color: rgb(107,107,107);" %)Request
877 877  
878 -{{code language="php" theme="RDark" title="Get specific User Request"}}
878 +{{code language="php" theme="RDark" title="Get specific User Request" collapse="true"}}
879 879  <?php
880 880  
881 881  $curl = curl_init();
882 882  
883 883  curl_setopt_array($curl, array(
884 - CURLOPT_URL => 'https://api.onecount.net/v2/users/{{OCID}}',
884 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/8418',
885 885   CURLOPT_RETURNTRANSFER => true,
886 886   CURLOPT_ENCODING => '',
887 887   CURLOPT_MAXREDIRS => 10,
... ... @@ -902,7 +902,7 @@
902 902  
903 903  \\
904 904  
905 -(% style="color: rgb(107,107,107);" %)Response  200 OK
905 +(% style="color: rgb(107,107,107);" %)Response  200 OK
906 906  
907 907  {{code language="yml" theme="RDark" title="Get specific user Response" collapse="true"}}
908 908  {
... ... @@ -973,7 +973,7 @@
973 973  
974 974  ----
975 975  
976 -{{code language="yml" theme="RDark" title="Body"}}
976 +{{code language="yml" theme="RDark" title="Body" collapse="true"}}
977 977  {"e":"rayaan@one-count.com","p":"12345"}
978 978  {{/code}}
979 979  
... ... @@ -983,13 +983,13 @@
983 983  
984 984  (% style="color: rgb(107,107,107);" %)Request
985 985  
986 -{{code language="php" theme="RDark" title="User login Request"}}
986 +{{code language="php" theme="RDark" title="User login Request" collapse="true"}}
987 987  <?php
988 988  
989 989  $curl = curl_init();
990 990  
991 991  curl_setopt_array($curl, array(
992 - CURLOPT_URL => 'https://api.onecount.net/v2/users/login',
992 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/login',
993 993   CURLOPT_RETURNTRANSFER => true,
994 994   CURLOPT_ENCODING => '',
995 995   CURLOPT_MAXREDIRS => 10,
... ... @@ -1011,7 +1011,7 @@
1011 1011  
1012 1012  \\
1013 1013  
1014 -(% style="color: rgb(107,107,107);" %)Response  200 OK
1014 +(% style="color: rgb(107,107,107);" %)Response  200 OK
1015 1015  
1016 1016  {{code language="yml" theme="RDark" title="Login user Response" collapse="true"}}
1017 1017  {
... ... @@ -1058,13 +1058,13 @@
1058 1058  
1059 1059  (% style="color: rgb(107,107,107);" %)Request
1060 1060  
1061 -{{code language="php" theme="RDark" title="Lookup user Request"}}
1061 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"}}
1062 1062  <?php
1063 1063  
1064 1064  $curl = curl_init();
1065 1065  
1066 1066  curl_setopt_array($curl, array(
1067 - CURLOPT_URL => 'https://api.onecount.net/v2/users/lookup?2=user_242_6298&return=1,2,3,4',
1067 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/lookup?2=user_242_6298&return=1%2C2%2C3%2C4',
1068 1068   CURLOPT_RETURNTRANSFER => true,
1069 1069   CURLOPT_ENCODING => '',
1070 1070   CURLOPT_MAXREDIRS => 10,
... ... @@ -1085,7 +1085,7 @@
1085 1085  
1086 1086  \\
1087 1087  
1088 -(% style="color: rgb(107,107,107);" %)Response  200 OK
1088 +(% style="color: rgb(107,107,107);" %)Response  200 OK
1089 1089  
1090 1090  {{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"}}
1091 1091  {
... ... @@ -1141,7 +1141,6 @@
1141 1141  (% class="western" %)
1142 1142  **POST method should be used to create users.**
1143 1143  
1144 -(% class="wrapped" %)
1145 1145  (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
1146 1146  (((
1147 1147  (% class="western" %)
... ... @@ -1208,7 +1208,6 @@
1208 1208  CSV of ONEcount QuestionId's requested back in Users object in response.
1209 1209  )))
1210 1210  
1211 -(% class="wrapped" %)
1212 1212  (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
1213 1213  (((
1214 1214  (% class="western" %)
... ... @@ -1246,7 +1246,7 @@
1246 1246  
1247 1247  ----
1248 1248  
1249 -{{code language="yml" theme="RDark" title="Body"}}
1247 +{{code language="yml" theme="RDark" title="Body" collapse="true"}}
1250 1250  {"Users":{"PartnerId":1,"Demo":{"1":"testApirayaan7@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[]}
1251 1251  {{/code}}
1252 1252  
... ... @@ -1256,13 +1256,13 @@
1256 1256  
1257 1257  (% style="color: rgb(107,107,107);" %)Request
1258 1258  
1259 -{{code language="php" theme="RDark" title="Create User Request"}}
1257 +{{code language="php" theme="RDark" title="Create User Request" collapse="true"}}
1260 1260  <?php
1261 1261  
1262 1262  $curl = curl_init();
1263 1263  
1264 1264  curl_setopt_array($curl, array(
1265 - CURLOPT_URL => 'https://api.onecount.net/v2/users',
1263 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users',
1266 1266   CURLOPT_RETURNTRANSFER => true,
1267 1267   CURLOPT_ENCODING => '',
1268 1268   CURLOPT_MAXREDIRS => 10,
... ... @@ -1284,7 +1284,7 @@
1284 1284  
1285 1285  \\
1286 1286  
1287 -(% style="color: rgb(107,107,107);" %)Response  200 OK
1285 +(% style="color: rgb(107,107,107);" %)Response  200 OK
1288 1288  
1289 1289  {{code language="yml" theme="RDark" title="Create user Response" collapse="true"}}
1290 1290  {
... ... @@ -1318,7 +1318,6 @@
1318 1318  (% class="western" %)
1319 1319  **PUT method should be used to update users.**
1320 1320  
1321 -(% class="wrapped" %)
1322 1322  (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
1323 1323  (((
1324 1324  (% class="western" %)
... ... @@ -1372,7 +1372,6 @@
1372 1372  RequestDate to use for the demo update. If not provided current date will be used.
1373 1373  )))
1374 1374  
1375 -(% class="wrapped" %)
1376 1376  (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
1377 1377  (((
1378 1378  (% class="western" %)
... ... @@ -1410,7 +1410,7 @@
1410 1410  
1411 1411  ----
1412 1412  
1413 -{{code language="yml" theme="RDark" title="Body"}}
1409 +{{code language="yml" theme="RDark" title="Body" collapse="true"}}
1414 1414  {"Users":{"Demo":{"6":"title1"}}}
1415 1415  {{/code}}
1416 1416  
... ... @@ -1420,13 +1420,13 @@
1420 1420  
1421 1421  (% style="color: rgb(107,107,107);" %)Request
1422 1422  
1423 -{{code language="php" theme="RDark" title="Update User Request"}}
1419 +{{code language="php" theme="RDark" title="Update User Request" collapse="true"}}
1424 1424  <?php
1425 1425  
1426 1426  $curl = curl_init();
1427 1427  
1428 1428  curl_setopt_array($curl, array(
1429 - CURLOPT_URL => 'https://api.onecount.net/v2/users/{{OCID}}',
1425 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/{{OCID}}',
1430 1430   CURLOPT_RETURNTRANSFER => true,
1431 1431   CURLOPT_ENCODING => '',
1432 1432   CURLOPT_MAXREDIRS => 10,
... ... @@ -1450,7 +1450,7 @@
1450 1450  
1451 1451  \\
1452 1452  
1453 -(% style="color: rgb(107,107,107);" %)Response  200 OK
1449 +(% style="color: rgb(107,107,107);" %)Response  200 OK
1454 1454  
1455 1455  {{code language="yml" theme="RDark" title="Update user Response" collapse="true"}}
1456 1456  {
... ... @@ -1474,7 +1474,7 @@
1474 1474  \\
1475 1475  
1476 1476  (% class="western" %)
1477 -=== **COMPONENT: Questions** ===
1473 +**COMPONENT: Questions**
1478 1478  
1479 1479  (% class="western" %)
1480 1480  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).
... ... @@ -1664,13 +1664,13 @@
1664 1664  
1665 1665  (% style="color: rgb(107,107,107);" %)Request
1666 1666  
1667 -{{code language="php" theme="RDark" title="Get All Questions Request"}}
1663 +{{code language="php" theme="RDark" title="Get All Questions Request" collapse="true"}}
1668 1668  <?php
1669 1669  
1670 1670  $curl = curl_init();
1671 1671  
1672 1672  curl_setopt_array($curl, array(
1673 - CURLOPT_URL => 'https://api.onecount.net/v2/questions',
1669 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions',
1674 1674   CURLOPT_RETURNTRANSFER => true,
1675 1675   CURLOPT_ENCODING => '',
1676 1676   CURLOPT_MAXREDIRS => 10,
... ... @@ -1694,7 +1694,7 @@
1694 1694  
1695 1695  \\
1696 1696  
1697 -(% style="color: rgb(107,107,107);" %)Response  200 OK
1693 +(% style="color: rgb(107,107,107);" %)Response  200 OK
1698 1698  
1699 1699  {{code language="yml" theme="RDark" title="Get All Questions Response" collapse="true"}}
1700 1700  {
... ... @@ -3805,13 +3805,13 @@
3805 3805  
3806 3806  (% style="color: rgb(107,107,107);" %)Request
3807 3807  
3808 -{{code language="php" theme="RDark" title="Get specific Question Request"}}
3804 +{{code language="php" theme="RDark" title="Get specific Question Request" collapse="true"}}
3809 3809  <?php
3810 3810  
3811 3811  $curl = curl_init();
3812 3812  
3813 3813  curl_setopt_array($curl, array(
3814 - CURLOPT_URL => 'https://api.onecount.net/v2/questions/{{QUESTION ID}}',
3810 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/{{QUESTION ID}}',
3815 3815   CURLOPT_RETURNTRANSFER => true,
3816 3816   CURLOPT_ENCODING => '',
3817 3817   CURLOPT_MAXREDIRS => 10,
... ... @@ -3832,7 +3832,7 @@
3832 3832  
3833 3833  \\
3834 3834  
3835 -(% style="color: rgb(107,107,107);" %)Response  200 OK
3831 +(% style="color: rgb(107,107,107);" %)Response  200 OK
3836 3836  
3837 3837  {{code language="yml" theme="RDark" title="Get specific question Response" collapse="true"}}
3838 3838  {
... ... @@ -3884,13 +3884,13 @@
3884 3884  
3885 3885  (% style="color: rgb(107,107,107);" %)Request
3886 3886  
3887 -{{code language="php" theme="RDark" title="Lookup question by text Request"}}
3883 +{{code language="php" theme="RDark" title="Lookup question by text Request" collapse="true"}}
3888 3888  <?php
3889 3889  
3890 3890  $curl = curl_init();
3891 3891  
3892 3892  curl_setopt_array($curl, array(
3893 - CURLOPT_URL => 'https://api.onecount.net/v2/questions/lookup?Text=COUNTRY',
3889 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/lookup?Text=COUNTRY',
3894 3894   CURLOPT_RETURNTRANSFER => true,
3895 3895   CURLOPT_ENCODING => '',
3896 3896   CURLOPT_MAXREDIRS => 10,
... ... @@ -3911,7 +3911,7 @@
3911 3911  
3912 3912  \\
3913 3913  
3914 -(% style="color: rgb(107,107,107);" %)Response  200 OK
3910 +(% style="color: rgb(107,107,107);" %)Response  200 OK
3915 3915  
3916 3916  {{code language="yml" theme="RDark" title="Lookup question by title Response" collapse="true"}}
3917 3917  {
... ... @@ -5330,13 +5330,13 @@
5330 5330  
5331 5331  (% style="color: rgb(107,107,107);" %)Request
5332 5332  
5333 -{{code language="php" theme="RDark" title="Lookup question by Type Request"}}
5329 +{{code language="php" theme="RDark" title="Lookup question by Type Request" collapse="true"}}
5334 5334  <?php
5335 5335  
5336 5336  $curl = curl_init();
5337 5337  
5338 5338  curl_setopt_array($curl, array(
5339 - CURLOPT_URL => 'https://api.onecount.net/v2/questions/lookup?Type=4',
5335 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/lookup?Type=4',
5340 5340   CURLOPT_RETURNTRANSFER => true,
5341 5341   CURLOPT_ENCODING => '',
5342 5342   CURLOPT_MAXREDIRS => 10,
... ... @@ -5357,7 +5357,7 @@
5357 5357  
5358 5358  \\
5359 5359  
5360 -(% style="color: rgb(107,107,107);" %)Response  200 OK
5356 +(% style="color: rgb(107,107,107);" %)Response  200 OK
5361 5361  
5362 5362  {{code language="yml" theme="RDark" title="Lookup question by type Response" collapse="true"}}
5363 5363  {
... ... @@ -8027,7 +8027,7 @@
8027 8027  
8028 8028  ----
8029 8029  
8030 -{{code language="yml" theme="RDark" title="Body"}}
8026 +{{code language="yml" theme="RDark" title="Body" collapse="true"}}
8031 8031  {"Text":"Test from API 3","Type":0,"Alias":"Test from API 3"}
8032 8032  {{/code}}
8033 8033  
... ... @@ -8037,13 +8037,13 @@
8037 8037  
8038 8038  (% style="color: rgb(107,107,107);" %)Request
8039 8039  
8040 -{{code language="php" theme="RDark" title="Create Question Request"}}
8036 +{{code language="php" theme="RDark" title="Create Question Request" collapse="true"}}
8041 8041  <?php
8042 8042  
8043 8043  $curl = curl_init();
8044 8044  
8045 8045  curl_setopt_array($curl, array(
8046 - CURLOPT_URL => 'https://api.onecount.net/v2/questions',
8042 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions',
8047 8047   CURLOPT_RETURNTRANSFER => true,
8048 8048   CURLOPT_ENCODING => '',
8049 8049   CURLOPT_MAXREDIRS => 10,
... ... @@ -8065,7 +8065,7 @@
8065 8065  
8066 8066  \\
8067 8067  
8068 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8064 +(% style="color: rgb(107,107,107);" %)Response  200 OK
8069 8069  
8070 8070  {{code language="yml" theme="RDark" title="Create question Response" collapse="true"}}
8071 8071  {
... ... @@ -8105,7 +8105,7 @@
8105 8105  
8106 8106  ----
8107 8107  
8108 -{{code language="yml" theme="RDark" title="Body"}}
8104 +{{code language="yml" theme="RDark" title="Body" collapse="true"}}
8109 8109  {"Text":"Test from API 6","Type":4,"Alias":"Test from API 6", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]}
8110 8110  {{/code}}
8111 8111  
... ... @@ -8115,13 +8115,13 @@
8115 8115  
8116 8116  (% style="color: rgb(107,107,107);" %)Request
8117 8117  
8118 -{{code language="php" theme="RDark" title="Create Question Request"}}
8114 +{{code language="php" theme="RDark" title="Create Question Request" collapse="true"}}
8119 8119  <?php
8120 8120  
8121 8121  $curl = curl_init();
8122 8122  
8123 8123  curl_setopt_array($curl, array(
8124 - CURLOPT_URL => 'https://api.onecount.net/v2/questions',
8120 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions',
8125 8125   CURLOPT_RETURNTRANSFER => true,
8126 8126   CURLOPT_ENCODING => '',
8127 8127   CURLOPT_MAXREDIRS => 10,
... ... @@ -8143,7 +8143,7 @@
8143 8143  
8144 8144  \\
8145 8145  
8146 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8142 +(% style="color: rgb(107,107,107);" %)Response  200 OK
8147 8147  
8148 8148  {{code language="yml" theme="RDark" title="Create question Response" collapse="true"}}
8149 8149  {
... ... @@ -8183,7 +8183,7 @@
8183 8183  
8184 8184  ----
8185 8185  
8186 -{{code language="yml" theme="RDark" title="Body"}}
8182 +{{code language="yml" theme="RDark" title="Body" collapse="true"}}
8187 8187  {"Text":"Test from API 6 changed","Type":4,"Alias":"Test from API 6 changed", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]}
8188 8188  {{/code}}
8189 8189  
... ... @@ -8193,13 +8193,13 @@
8193 8193  
8194 8194  (% style="color: rgb(107,107,107);" %)Request
8195 8195  
8196 -{{code language="php" theme="RDark" title="Update Question Request"}}
8192 +{{code language="php" theme="RDark" title="Update Question Request" collapse="true"}}
8197 8197  <?php
8198 8198  
8199 8199  $curl = curl_init();
8200 8200  
8201 8201  curl_setopt_array($curl, array(
8202 - CURLOPT_URL => 'https://api.onecount.net/v2/questions/{{QUESTION ID}}',
8198 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/503',
8203 8203   CURLOPT_RETURNTRANSFER => true,
8204 8204   CURLOPT_ENCODING => '',
8205 8205   CURLOPT_MAXREDIRS => 10,
... ... @@ -8223,7 +8223,7 @@
8223 8223  
8224 8224  \\
8225 8225  
8226 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8222 +(% style="color: rgb(107,107,107);" %)Response  200 OK
8227 8227  
8228 8228  {{code language="yml" theme="RDark" title="Update Question Response" collapse="true"}}
8229 8229  {
... ... @@ -8246,7 +8246,7 @@
8246 8246  \\
8247 8247  
8248 8248  (% class="western" %)
8249 -=== **COMPONENT: Products** ===
8245 +**COMPONENT: Products**
8250 8250  
8251 8251  (% class="western" %)
8252 8252  This resource is for manipulating products resource. A product can be created, updated or searched.
... ... @@ -8378,13 +8378,13 @@
8378 8378  
8379 8379  (% style="color: rgb(107,107,107);" %)Request
8380 8380  
8381 -{{code language="php" theme="RDark" title="Get All Products Request"}}
8377 +{{code language="php" theme="RDark" title="Get All Products Request" collapse="true"}}
8382 8382  <?php
8383 8383  
8384 8384  $curl = curl_init();
8385 8385  
8386 8386  curl_setopt_array($curl, array(
8387 - CURLOPT_URL => 'https://api.onecount.net/v2/products',
8383 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/products',
8388 8388   CURLOPT_RETURNTRANSFER => true,
8389 8389   CURLOPT_ENCODING => '',
8390 8390   CURLOPT_MAXREDIRS => 10,
... ... @@ -8407,7 +8407,7 @@
8407 8407  
8408 8408  \\
8409 8409  
8410 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8406 +(% style="color: rgb(107,107,107);" %)Response  200 OK
8411 8411  
8412 8412  {{code language="yml" theme="RDark" title="Get All Products Response" collapse="true"}}
8413 8413   {
... ... @@ -8666,13 +8666,13 @@
8666 8666  
8667 8667  (% style="color: rgb(107,107,107);" %)Request
8668 8668  
8669 -{{code language="php" theme="RDark" title="Get specific Product Request"}}
8665 +{{code language="php" theme="RDark" title="Get specific Product Request" collapse="true"}}
8670 8670   <?php
8671 8671  
8672 8672  $curl = curl_init();
8673 8673  
8674 8674  curl_setopt_array($curl, array(
8675 - CURLOPT_URL => 'https://api.onecount.net/v2/users/products/{{product id}}',
8671 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/products/{{Product id}}',
8676 8676   CURLOPT_RETURNTRANSFER => true,
8677 8677   CURLOPT_ENCODING => '',
8678 8678   CURLOPT_MAXREDIRS => 10,
... ... @@ -8693,7 +8693,7 @@
8693 8693  
8694 8694  \\
8695 8695  
8696 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8692 +(% style="color: rgb(107,107,107);" %)Response  200 OK
8697 8697  
8698 8698  {{code language="yml" theme="RDark" title="Get specific Product Response" collapse="true"}}
8699 8699   {
... ... @@ -8756,13 +8756,13 @@
8756 8756  
8757 8757  (% style="color: rgb(107,107,107);" %)Request
8758 8758  
8759 -{{code language="php" theme="RDark" title="Lookup Product Request"}}
8755 +{{code language="php" theme="RDark" title="Lookup Product Request" collapse="true"}}
8760 8760   <?php
8761 8761  
8762 8762  $curl = curl_init();
8763 8763  
8764 8764  curl_setopt_array($curl, array(
8765 - CURLOPT_URL => 'https://api.onecount.net/v2/products/lookup?Title={{Product Name}}',
8761 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/products/lookup?Title={{Package Name}}',
8766 8766   CURLOPT_RETURNTRANSFER => true,
8767 8767   CURLOPT_ENCODING => '',
8768 8768   CURLOPT_MAXREDIRS => 10,
... ... @@ -8783,7 +8783,7 @@
8783 8783  
8784 8784  \\
8785 8785  
8786 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8782 +(% style="color: rgb(107,107,107);" %)Response  200 OK
8787 8787  
8788 8788  {{code language="yml" theme="RDark" title="Lookup Product Response" collapse="true"}}
8789 8789   {
... ... @@ -8815,239 +8815,106 @@
8815 8815  
8816 8816  \\
8817 8817  
8818 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
8819 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Product(%%) ==
8814 +\\
8820 8820  
8821 -----
8816 +\\
8822 8822  
8823 -{{panel bgColor="#D3D3D3" width="100%"}}
8824 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products
8825 -{{/panel}}
8818 +\\
8826 8826  
8827 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
8820 +\\
8828 8828  
8829 -----
8822 +\\
8830 8830  
8831 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
8824 +\\
8832 8832  
8833 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
8826 +\\
8834 8834  
8835 -----
8828 +\\
8836 8836  
8837 -{{code language="yml" theme="RDark" title="Body"}}
8838 -{"Title":"Test API package creation 2","Description": "Test API package creation 2","Terms":{"Name":"Test term for API 2"},"PrimaryFormId":0}
8839 -{{/code}}
8830 +\\
8840 8840  
8841 -==== Example ====
8832 +\\
8842 8842  
8843 -----
8834 +\\
8844 8844  
8845 -(% style="color: rgb(107,107,107);" %)Request
8836 +\\
8846 8846  
8847 -{{code language="php" theme="RDark" title="Create Product Request"}}
8848 - <?php
8838 +\\
8849 8849  
8850 -$curl = curl_init();
8840 +\\
8851 8851  
8852 -curl_setopt_array($curl, array(
8853 - CURLOPT_URL => 'https://api.onecount.net/v2/products',
8854 - CURLOPT_RETURNTRANSFER => true,
8855 - CURLOPT_ENCODING => '',
8856 - CURLOPT_MAXREDIRS => 10,
8857 - CURLOPT_TIMEOUT => 0,
8858 - CURLOPT_FOLLOWLOCATION => true,
8859 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
8860 - CURLOPT_CUSTOMREQUEST => 'POST',
8861 - CURLOPT_POSTFIELDS =>'{"Title":"Test API package creation 1","Description": "Test API package creation 1","Terms":{"Name":"Test term for API 1"},"PrimaryFormId":0}',
8862 - CURLOPT_HTTPHEADER => array(
8863 - 'Appkey: {{ONECOUNT API KEY}}'
8864 - ),
8865 -));
8842 +\\
8866 8866  
8867 -$response = curl_exec($curl);
8844 +\\
8868 8868  
8869 -curl_close($curl);
8870 -echo $response;
8871 -{{/code}}
8846 +\\
8872 8872  
8873 8873  \\
8874 8874  
8875 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8850 +\\
8876 8876  
8877 -{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}}
8878 - {
8879 - "result": {
8880 - "success": "1",
8881 - "error": {
8882 - "code": "",
8883 - "message": ""
8884 - }
8885 - },
8886 - "Products": [
8887 - {
8888 - "ProductId": 599
8889 - }
8890 - ]
8891 -}
8892 -{{/code}}
8852 +\\
8893 8893  
8894 8894  \\
8895 8895  
8896 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
8897 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Product(%%) ==
8856 +\\
8898 8898  
8899 -----
8858 +\\
8900 8900  
8901 -{{panel bgColor="#D3D3D3" width="100%"}}
8902 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/~{~{Product id}}
8903 -{{/panel}}
8860 +\\
8904 8904  
8905 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
8862 +\\
8906 8906  
8907 -----
8864 +\\
8908 8908  
8909 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
8866 +\\
8910 8910  
8911 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
8868 +\\
8912 8912  
8913 -----
8870 +\\
8914 8914  
8915 -{{code language="yml" theme="RDark" title="Body"}}
8916 -{"Title":"Test API package 23","Description": "Test API package 23","PrimaryFormId":0}
8917 -{{/code}}
8872 +\\
8918 8918  
8919 -==== Example ====
8874 +\\
8920 8920  
8921 -----
8876 +\\
8922 8922  
8923 -(% style="color: rgb(107,107,107);" %)Request
8878 +\\
8924 8924  
8925 -{{code language="php" theme="RDark" title="Update Product Request"}}
8926 -<?php
8880 +\\
8927 8927  
8928 -$curl = curl_init();
8882 +\\
8929 8929  
8930 -curl_setopt_array($curl, array(
8931 - CURLOPT_URL => 'https://api.onecount.net/v2/products/{{Product id}}',
8932 - CURLOPT_RETURNTRANSFER => true,
8933 - CURLOPT_ENCODING => '',
8934 - CURLOPT_MAXREDIRS => 10,
8935 - CURLOPT_TIMEOUT => 0,
8936 - CURLOPT_FOLLOWLOCATION => true,
8937 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
8938 - CURLOPT_CUSTOMREQUEST => 'PUT',
8939 - CURLOPT_POSTFIELDS =>'{"Title":"Test API package 1","Description": "Test API package 1","PrimaryFormId":0}',
8940 - CURLOPT_HTTPHEADER => array(
8941 - 'Appkey: {{ONECOUNT API KEY}}'
8942 - ),
8943 -));
8884 +\\
8944 8944  
8945 -$response = curl_exec($curl);
8886 +\\
8946 8946  
8947 -curl_close($curl);
8948 -echo $response;
8949 -
8950 -{{/code}}
8888 +\\
8951 8951  
8952 8952  \\
8953 8953  
8954 -(% style="color: rgb(107,107,107);" %)Response  200 OK
8892 +\\
8955 8955  
8956 -{{code language="yml" theme="RDark" title="Update Product Response" collapse="true"}}
8957 - {
8958 - "result": {
8959 - "success": "1",
8960 - "error": {
8961 - "code": "",
8962 - "message": ""
8963 - }
8964 - },
8965 - "Products": [
8966 - {
8967 - "ProductId": 599,
8968 - "Title": "Test API package 1",
8969 - "Description": "Test API package 1"
8970 - }
8971 - ]
8972 -}
8973 -{{/code}}
8894 +\\
8974 8974  
8975 8975  \\
8976 8976  
8977 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
8978 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Attach Resource to Product(%%) ==
8898 +\\
8979 8979  
8980 -----
8900 +\\
8981 8981  
8982 -{{panel bgColor="#D3D3D3" width="100%"}}
8983 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/attachResource
8984 -{{/panel}}
8902 +\\
8985 8985  
8986 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
8904 +\\
8987 8987  
8988 -----
8906 +\\
8989 8989  
8990 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
8908 +\\
8991 8991  
8992 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
8993 -
8994 -----
8995 -
8996 -{{code language="yml" theme="RDark" title="Body"}}
8997 -{"ProductID":"599","ResourceID":"903"}
8998 -{{/code}}
8999 -
9000 -==== Example ====
9001 -
9002 -----
9003 -
9004 -(% style="color: rgb(107,107,107);" %)Request
9005 -
9006 -{{code language="php" theme="RDark" title="Attach Resource to Product Request"}}
9007 - <?php
9008 -
9009 -$curl = curl_init();
9010 -
9011 -curl_setopt_array($curl, array(
9012 - CURLOPT_URL => 'https://api.onecount.net/v2/products/attachResource',
9013 - CURLOPT_RETURNTRANSFER => true,
9014 - CURLOPT_ENCODING => '',
9015 - CURLOPT_MAXREDIRS => 10,
9016 - CURLOPT_TIMEOUT => 0,
9017 - CURLOPT_FOLLOWLOCATION => true,
9018 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
9019 - CURLOPT_CUSTOMREQUEST => 'POST',
9020 - CURLOPT_POSTFIELDS =>'{"ProductID":"599","ResourceID":"903"}',
9021 - CURLOPT_HTTPHEADER => array(
9022 - 'Appkey: {{ONECOUNT API KEY}}'
9023 - ),
9024 -));
9025 -
9026 -$response = curl_exec($curl);
9027 -
9028 -curl_close($curl);
9029 -echo $response;
9030 -{{/code}}
9031 -
9032 9032  \\
9033 9033  
9034 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9035 -
9036 -{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}}
9037 - {
9038 - "result": {
9039 - "success": "1",
9040 - "error": {
9041 - "code": "",
9042 - "message": ""
9043 - }
9044 - },
9045 - "Products": "599"
9046 -}
9047 -{{/code}}
9048 -
9049 9049  (% class="western" %)
9050 -=== **COMPONENT: Terms** ===
8913 +**COMPONENT: Terms**
9051 9051  
9052 9052  (% class="western" %)
9053 9053  This resource is for manipulating terms resource. A term can be created, updated or searched.
... ... @@ -9144,13 +9144,13 @@
9144 9144  
9145 9145  (% style="color: rgb(107,107,107);" %)Request
9146 9146  
9147 -{{code language="php" theme="RDark" title="Get All Terms Request"}}
9010 +{{code language="php" theme="RDark" title="Get All Terms Request" collapse="true"}}
9148 9148   <?php
9149 9149  
9150 9150  $curl = curl_init();
9151 9151  
9152 9152  curl_setopt_array($curl, array(
9153 - CURLOPT_URL => 'https://api.onecount.net/v2/terms',
9016 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/terms',
9154 9154   CURLOPT_RETURNTRANSFER => true,
9155 9155   CURLOPT_ENCODING => '',
9156 9156   CURLOPT_MAXREDIRS => 10,
... ... @@ -9171,7 +9171,7 @@
9171 9171  
9172 9172  \\
9173 9173  
9174 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9037 +(% style="color: rgb(107,107,107);" %)Response  200 OK
9175 9175  
9176 9176  {{code language="yml" theme="RDark" title="Get All Terms Response" collapse="true"}}
9177 9177   {
... ... @@ -9327,13 +9327,13 @@
9327 9327  
9328 9328  (% style="color: rgb(107,107,107);" %)Request
9329 9329  
9330 -{{code language="php" theme="RDark" title="Get specific Term Request"}}
9193 +{{code language="php" theme="RDark" title="Get specific Term Request" collapse="true"}}
9331 9331   <?php
9332 9332  
9333 9333  $curl = curl_init();
9334 9334  
9335 9335  curl_setopt_array($curl, array(
9336 - CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}',
9199 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/terms/{{Term Id}}',
9337 9337   CURLOPT_RETURNTRANSFER => true,
9338 9338   CURLOPT_ENCODING => '',
9339 9339   CURLOPT_MAXREDIRS => 10,
... ... @@ -9354,7 +9354,7 @@
9354 9354  
9355 9355  \\
9356 9356  
9357 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9220 +(% style="color: rgb(107,107,107);" %)Response  200 OK
9358 9358  
9359 9359  {{code language="yml" theme="RDark" title="Get specific Term Response" collapse="true"}}
9360 9360   {
... ... @@ -9408,13 +9408,13 @@
9408 9408  
9409 9409  (% style="color: rgb(107,107,107);" %)Request
9410 9410  
9411 -{{code language="php" theme="RDark" title="Lookup Term Request"}}
9274 +{{code language="php" theme="RDark" title="Lookup Term Request" collapse="true"}}
9412 9412   <?php
9413 9413  
9414 9414  $curl = curl_init();
9415 9415  
9416 9416  curl_setopt_array($curl, array(
9417 - CURLOPT_URL => 'https://api.onecount.net/v2/terms/lookup?Name={{Term Name}}',
9280 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/terms/lookup?Name={{Term Name}} ',
9418 9418   CURLOPT_RETURNTRANSFER => true,
9419 9419   CURLOPT_ENCODING => '',
9420 9420   CURLOPT_MAXREDIRS => 10,
... ... @@ -9435,201 +9435,22 @@
9435 9435  
9436 9436  \\
9437 9437  
9438 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9301 +(% style="color: rgb(107,107,107);" %)Response  200 OK
9439 9439  
9440 -{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"}}
9441 -{
9442 - "result": {
9443 - "success": "1",
9444 - "error": {
9445 - "code": "",
9446 - "message": ""
9447 - }
9448 - },
9449 - "Terms": [
9450 - {
9451 - "Id": 431,
9452 - "Name": "Test term for API 1",
9453 - "Description": null,
9454 - "Duration": 0,
9455 - "DurationUnit": "",
9456 - "Price": "0.00",
9457 - "ProductId": 599
9458 - }
9459 - ]
9460 -}
9461 -{{/code}}
9303 +{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"/}}
9462 9462  
9463 9463  \\
9464 9464  
9465 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
9466 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Term(%%) ==
9467 -
9468 -----
9469 -
9470 -{{panel bgColor="#D3D3D3" width="100%"}}
9471 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms
9472 -{{/panel}}
9473 -
9474 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
9475 -
9476 -----
9477 -
9478 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
9479 -
9480 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
9481 -
9482 -----
9483 -
9484 -{{code language="yml" theme="RDark" title="Body"}}
9485 -{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599}
9486 -{{/code}}
9487 -
9488 -==== Example ====
9489 -
9490 -----
9491 -
9492 -(% style="color: rgb(107,107,107);" %)Request
9493 -
9494 -{{code language="php" theme="RDark" title="Create Term Request"}}
9495 -<?php
9496 -
9497 -$curl = curl_init();
9498 -
9499 -curl_setopt_array($curl, array(
9500 - CURLOPT_URL => 'https://api.onecount.net/v2/terms',
9501 - CURLOPT_RETURNTRANSFER => true,
9502 - CURLOPT_ENCODING => '',
9503 - CURLOPT_MAXREDIRS => 10,
9504 - CURLOPT_TIMEOUT => 0,
9505 - CURLOPT_FOLLOWLOCATION => true,
9506 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
9507 - CURLOPT_CUSTOMREQUEST => 'POST',
9508 - CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599}
9509 -
9510 -',
9511 - CURLOPT_HTTPHEADER => array(
9512 - 'Appkey: {{ONECOUNT API KEY}}'
9513 - ),
9514 -));
9515 -
9516 -$response = curl_exec($curl);
9517 -
9518 -curl_close($curl);
9519 -echo $response;
9520 -
9521 -
9522 -{{/code}}
9523 -
9524 9524  \\
9525 9525  
9526 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9527 -
9528 -{{code language="yml" theme="RDark" title="Create Term Response" collapse="true"}}
9529 -{
9530 - "result": {
9531 - "success": "1",
9532 - "error": {
9533 - "code": "",
9534 - "message": ""
9535 - }
9536 - },
9537 - "Terms": [
9538 - {
9539 - "Id": 447
9540 - }
9541 - ]
9542 -}
9543 -{{/code}}
9544 -
9545 9545  \\
9546 9546  
9547 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
9548 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Term(%%) ==
9549 -
9550 -----
9551 -
9552 -{{panel bgColor="#D3D3D3" width="100%"}}
9553 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms/~{~{Term Id}}
9554 -{{/panel}}
9555 -
9556 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
9557 -
9558 -----
9559 -
9560 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
9561 -
9562 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
9563 -
9564 -----
9565 -
9566 -{{code language="yml" theme="RDark" title="Body"}}
9567 -{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}
9568 -{{/code}}
9569 -
9570 -==== Example ====
9571 -
9572 -----
9573 -
9574 -(% style="color: rgb(107,107,107);" %)Request
9575 -
9576 -{{code language="php" theme="RDark" title="Update Term Request"}}
9577 - <?php
9578 -
9579 -$curl = curl_init();
9580 -
9581 -curl_setopt_array($curl, array(
9582 - CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}',
9583 - CURLOPT_RETURNTRANSFER => true,
9584 - CURLOPT_ENCODING => '',
9585 - CURLOPT_MAXREDIRS => 10,
9586 - CURLOPT_TIMEOUT => 0,
9587 - CURLOPT_FOLLOWLOCATION => true,
9588 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
9589 - CURLOPT_CUSTOMREQUEST => 'PUT',
9590 - CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}',
9591 - CURLOPT_HTTPHEADER => array(
9592 - 'Appkey: {{ONECOUNT API KEY}}'
9593 - ),
9594 -));
9595 -
9596 -$response = curl_exec($curl);
9597 -
9598 -curl_close($curl);
9599 -echo $response;
9600 -{{/code}}
9601 -
9602 9602  \\
9603 9603  
9604 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9605 -
9606 -{{code language="yml" theme="RDark" title="Update Term Response" collapse="true"}}
9607 - {
9608 - "result": {
9609 - "success": "1",
9610 - "error": {
9611 - "code": "",
9612 - "message": ""
9613 - }
9614 - },
9615 - "Terms": [
9616 - {
9617 - "Id": 447,
9618 - "Name": "Test API term creation update",
9619 - "Description": "Test API term creation update",
9620 - "Duration": 10,
9621 - "DurationUnit": "",
9622 - "Price": "0.00",
9623 - "ProductId": 599
9624 - }
9625 - ]
9626 -}
9627 -{{/code}}
9628 -
9629 9629  \\
9630 9630  
9631 9631  (% class="western" %)
9632 -=== **COMPONENT: Resources** ===
9316 +**COMPONENT: Resources**
9633 9633  
9634 9634  (% class="western" %)
9635 9635  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.
... ... @@ -9761,13 +9761,13 @@
9761 9761  
9762 9762  (% style="color: rgb(107,107,107);" %)Request
9763 9763  
9764 -{{code language="php" theme="RDark" title="Get All Resource Request"}}
9448 +{{code language="php" theme="RDark" title="Get All Resource Request" collapse="true"}}
9765 9765   <?php
9766 9766  
9767 9767  $curl = curl_init();
9768 9768  
9769 9769  curl_setopt_array($curl, array(
9770 - CURLOPT_URL => 'https://api.onecount.net/v2/resources',
9454 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/resources?limit=10',
9771 9771   CURLOPT_RETURNTRANSFER => true,
9772 9772   CURLOPT_ENCODING => '',
9773 9773   CURLOPT_MAXREDIRS => 10,
... ... @@ -9788,7 +9788,7 @@
9788 9788  
9789 9789  \\
9790 9790  
9791 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9475 +(% style="color: rgb(107,107,107);" %)Response  200 OK
9792 9792  
9793 9793  {{code language="yml" theme="RDark" title="Get All Resource Response" collapse="true"}}
9794 9794   {
... ... @@ -9907,13 +9907,13 @@
9907 9907  
9908 9908  (% style="color: rgb(107,107,107);" %)Request
9909 9909  
9910 -{{code language="php" theme="RDark" title="Get specific Resource Request"}}
9594 +{{code language="php" theme="RDark" title="Get specific Resource Request" collapse="true"}}
9911 9911   <?php
9912 9912  
9913 9913  $curl = curl_init();
9914 9914  
9915 9915  curl_setopt_array($curl, array(
9916 - CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{Resource ID}}',
9600 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/resources/{{Resource ID}}',
9917 9917   CURLOPT_RETURNTRANSFER => true,
9918 9918   CURLOPT_ENCODING => '',
9919 9919   CURLOPT_MAXREDIRS => 10,
... ... @@ -9934,7 +9934,7 @@
9934 9934  
9935 9935  \\
9936 9936  
9937 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9621 +(% style="color: rgb(107,107,107);" %)Response  200 OK
9938 9938  
9939 9939  {{code language="yml" theme="RDark" title="Get specific Resource Response" collapse="true"}}
9940 9940   {
... ... @@ -9966,7 +9966,7 @@
9966 9966  ----
9967 9967  
9968 9968  {{panel bgColor="#D3D3D3" width="100%"}}
9969 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources/lookup?Name={(%%){Resource Name}}
9653 +(% class="nolink" %)[[https:~~/~~/api.onecount.net/v2/users>>url:https://api.onecount.net/v2/users||shape="rect"]](% style="color: rgb(33,33,33);" %)/lookup?2=user_242_6298&return=1,2,3,4
9970 9970  {{/panel}}
9971 9971  
9972 9972  === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
... ... @@ -9979,7 +9979,8 @@
9979 9979  
9980 9980  ----
9981 9981  
9982 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Name (% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" style="color: rgb(33, 33, 33); color: rgb(33, 33, 33)" %){(% style="color: rgb(33,33,33);" class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" %){Resource Name}}
9666 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)2  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)user_242_6298(%%)
9667 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)return  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)1,2,3,4
9983 9983  
9984 9984  ==== Example ====
9985 9985  
... ... @@ -9987,237 +9987,30 @@
9987 9987  
9988 9988  (% style="color: rgb(107,107,107);" %)Request
9989 9989  
9990 -{{code language="php" theme="RDark" title="Lookup Resource Request"}}
9991 - <?php
9675 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}}
9992 9992  
9993 -$curl = curl_init();
9677 +\\
9994 9994  
9995 -curl_setopt_array($curl, array(
9996 - CURLOPT_URL => 'https://api.onecount.net/v2/resources/lookup?Name={{Resource Name}}',
9997 - CURLOPT_RETURNTRANSFER => true,
9998 - CURLOPT_ENCODING => '',
9999 - CURLOPT_MAXREDIRS => 10,
10000 - CURLOPT_TIMEOUT => 0,
10001 - CURLOPT_FOLLOWLOCATION => true,
10002 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10003 - CURLOPT_CUSTOMREQUEST => 'GET',
10004 - CURLOPT_HTTPHEADER => array(
10005 - 'Appkey: {{ONECOUNT API KEY}}'
10006 - ),
10007 -));
9679 +(% style="color: rgb(107,107,107);" %)Response  200 OK
10008 10008  
10009 -$response = curl_exec($curl);
9681 +{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}}
10010 10010  
10011 -curl_close($curl);
10012 -echo $response;
10013 -{{/code}}
10014 -
10015 10015  \\
10016 10016  
10017 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10018 -
10019 -{{code language="yml" theme="RDark" title="Lookup Resource Response" collapse="true"}}
10020 - {
10021 - "result": {
10022 - "success": "1",
10023 - "error": {
10024 - "code": "",
10025 - "message": ""
10026 - }
10027 - },
10028 - "Resources": [
10029 - {
10030 - "Id": 479,
10031 - "Name": "Virtualization Review",
10032 - "Description": "",
10033 - "Type": "0",
10034 - "Value": "",
10035 - "FreePass": 0
10036 - }
10037 - ]
10038 -}
10039 -{{/code}}
10040 -
10041 10041  \\
10042 10042  
10043 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
10044 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Resource(%%) ==
10045 -
10046 -----
10047 -
10048 -{{panel bgColor="#D3D3D3" width="100%"}}
10049 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources
10050 -{{/panel}}
10051 -
10052 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
10053 -
10054 -----
10055 -
10056 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
10057 -
10058 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
10059 -
10060 -----
10061 -
10062 -{{code language="yml" theme="RDark" title="Body"}}
10063 -{"Name":"Test API product creation 22","Description":"Test API product creation 22","Type":3,"FreePass":1,"Value":["http://one-count.com"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}
10064 -{{/code}}
10065 -
10066 -==== Example ====
10067 -
10068 -----
10069 -
10070 -(% style="color: rgb(107,107,107);" %)Request
10071 -
10072 -{{code language="php" theme="RDark" title="Create Resource Request"}}
10073 - <?php
10074 -
10075 -$curl = curl_init();
10076 -
10077 -curl_setopt_array($curl, array(
10078 - CURLOPT_URL => 'https://api.onecount.net/v2/resources',
10079 - CURLOPT_RETURNTRANSFER => true,
10080 - CURLOPT_ENCODING => '',
10081 - CURLOPT_MAXREDIRS => 10,
10082 - CURLOPT_TIMEOUT => 0,
10083 - CURLOPT_FOLLOWLOCATION => true,
10084 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10085 - CURLOPT_CUSTOMREQUEST => 'POST',
10086 - CURLOPT_POSTFIELDS =>'{"Name":"Test API product creation 21","Description":"Test API product creation 21","Type":3,"FreePass":1,"Value":["http://one-count.com"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}',
10087 - CURLOPT_HTTPHEADER => array(
10088 - 'Appkey: {{ONECOUNT API KEY}}'
10089 - ),
10090 -));
10091 -
10092 -$response = curl_exec($curl);
10093 -
10094 -curl_close($curl);
10095 -echo $response;
10096 -{{/code}}
10097 -
10098 10098  \\
10099 10099  
10100 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10101 -
10102 -{{code language="yml" theme="RDark" title="Create Resource Response" collapse="true"}}
10103 - {
10104 - "result": {
10105 - "success": "1",
10106 - "error": {
10107 - "code": "",
10108 - "message": ""
10109 - }
10110 - },
10111 - "Resources": [
10112 - {
10113 - "Id": 871,
10114 - "Name": "Test API product creation 21",
10115 - "Description": "Test API product creation 21",
10116 - "Type": "3",
10117 - "Value": "http://one-count.com",
10118 - "FreePass": 1
10119 - }
10120 - ]
10121 -}
10122 -{{/code}}
10123 -
10124 10124  \\
10125 10125  
10126 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
10127 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Resource(%%) ==
10128 -
10129 -----
10130 -
10131 -{{panel bgColor="#D3D3D3" width="100%"}}
10132 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources/~{~{resource id}}
10133 -{{/panel}}
10134 -
10135 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
10136 -
10137 -----
10138 -
10139 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
10140 -
10141 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
10142 -
10143 -----
10144 -
10145 -{{code language="yml" theme="RDark" title="Body"}}
10146 -{"Name":"Test API product creation 23","Description":"Test API product creation 23","Type":3,"FreePass":1,"Value":["http://one-count.com","onecount.net"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}
10147 -{{/code}}
10148 -
10149 -==== Example ====
10150 -
10151 -----
10152 -
10153 -(% style="color: rgb(107,107,107);" %)Request
10154 -
10155 -{{code language="php" theme="RDark" title="Update Resource Request"}}
10156 - <?php
10157 -
10158 -$curl = curl_init();
10159 -
10160 -curl_setopt_array($curl, array(
10161 - CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{resource id}}',
10162 - CURLOPT_RETURNTRANSFER => true,
10163 - CURLOPT_ENCODING => '',
10164 - CURLOPT_MAXREDIRS => 10,
10165 - CURLOPT_TIMEOUT => 0,
10166 - CURLOPT_FOLLOWLOCATION => true,
10167 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10168 - CURLOPT_CUSTOMREQUEST => 'PUT',
10169 - CURLOPT_POSTFIELDS =>'{"Name":"Test API product creation 23","Description":"Test API product creation 23","Type":3,"FreePass":1,"Value":["http://one-count.com","onecount.net"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}',
10170 - CURLOPT_HTTPHEADER => array(
10171 - 'Appkey: {{ONECOUNT API KEY}}'
10172 - ),
10173 -));
10174 -
10175 -$response = curl_exec($curl);
10176 -
10177 -curl_close($curl);
10178 -echo $response;
10179 -{{/code}}
10180 -
10181 10181  \\
10182 10182  
10183 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10184 -
10185 -{{code language="yml" theme="RDark" title="Update Resource Response" collapse="true"}}
10186 - {
10187 - "result": {
10188 - "success": "1",
10189 - "error": {
10190 - "code": "",
10191 - "message": ""
10192 - }
10193 - },
10194 - "Resources": [
10195 - {
10196 - "Id": 903,
10197 - "Name": "Test API product creation 23",
10198 - "Description": "Test API product creation 23",
10199 - "Type": "3",
10200 - "Value": "http://one-count.com",
10201 - "FreePass": 1
10202 - },
10203 - {
10204 - "Id": 903,
10205 - "Name": "Test API product creation 23",
10206 - "Description": "Test API product creation 23",
10207 - "Type": "3",
10208 - "Value": "onecount.net",
10209 - "FreePass": 1
10210 - }
10211 - ]
10212 -}
10213 -{{/code}}
10214 -
10215 10215  (% class="western" %)
10216 10216  \\
10217 10217  
10218 10218  (% class="western" %)
10219 -=== **COMPONENT: Source Codes
10220 -** ===
9697 +**COMPONENT: Source Codes
9698 +**
10221 10221  
10222 10222  (% class="western" %)
10223 10223  This resource is for manipulating source code for a resource. A source code can be created, updated or searched.
... ... @@ -10314,13 +10314,13 @@
10314 10314  
10315 10315  (% style="color: rgb(107,107,107);" %)Request
10316 10316  
10317 -{{code language="php" theme="RDark" title="Get All Source code Request"}}
9795 +{{code language="php" theme="RDark" title="Get All Source code Request" collapse="true"}}
10318 10318   <?php
10319 10319  
10320 10320  $curl = curl_init();
10321 10321  
10322 10322  curl_setopt_array($curl, array(
10323 - CURLOPT_URL => 'https://api.onecount.net/v2/sources',
9801 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/sources',
10324 10324   CURLOPT_RETURNTRANSFER => true,
10325 10325   CURLOPT_ENCODING => '',
10326 10326   CURLOPT_MAXREDIRS => 10,
... ... @@ -10341,7 +10341,7 @@
10341 10341  
10342 10342  \\
10343 10343  
10344 -(% style="color: rgb(107,107,107);" %)Response  200 OK
9822 +(% style="color: rgb(107,107,107);" %)Response  200 OK
10345 10345  
10346 10346  {{code language="yml" theme="RDark" title="Get All Source code Response" collapse="true"}}
10347 10347   {
... ... @@ -10530,13 +10530,13 @@
10530 10530  
10531 10531  (% style="color: rgb(107,107,107);" %)Request
10532 10532  
10533 -{{code language="php" theme="RDark" title="Get specific Source Request"}}
10011 +{{code language="php" theme="RDark" title="Get specific Source Request" collapse="true"}}
10534 10534   <?php
10535 10535  
10536 10536  $curl = curl_init();
10537 10537  
10538 10538  curl_setopt_array($curl, array(
10539 - CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}',
10017 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/sources/{{source code id}}',
10540 10540   CURLOPT_RETURNTRANSFER => true,
10541 10541   CURLOPT_ENCODING => '',
10542 10542   CURLOPT_MAXREDIRS => 10,
... ... @@ -10557,7 +10557,7 @@
10557 10557  
10558 10558  \\
10559 10559  
10560 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10038 +(% style="color: rgb(107,107,107);" %)Response  200 OK
10561 10561  
10562 10562  {{code language="yml" theme="RDark" title="Get specific Source Response" collapse="true"}}
10563 10563   {
... ... @@ -10587,7 +10587,7 @@
10587 10587  ----
10588 10588  
10589 10589  {{panel bgColor="#D3D3D3" width="100%"}}
10590 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources/lookup?Source={(%%){Source code Name}}
10068 +(% class="nolink" %)[[https:~~/~~/api.onecount.net/v2/users>>url:https://api.onecount.net/v2/users||shape="rect"]](% style="color: rgb(33,33,33);" %)/lookup?2=user_242_6298&return=1,2,3,4
10591 10591  {{/panel}}
10592 10592  
10593 10593  === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
... ... @@ -10600,7 +10600,8 @@
10600 10600  
10601 10601  ----
10602 10602  
10603 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Source (% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" style="color: rgb(33, 33, 33); color: rgb(33, 33, 33)" %){(% style="color: rgb(33,33,33);" class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" %){Source code Name}}
10081 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)2  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)user_242_6298(%%)
10082 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)return  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)1,2,3,4
10604 10604  
10605 10605  ==== Example ====
10606 10606  
... ... @@ -10608,222 +10608,27 @@
10608 10608  
10609 10609  (% style="color: rgb(107,107,107);" %)Request
10610 10610  
10611 -{{code language="php" theme="RDark" title="Lookup Source code Request"}}
10612 - <?php
10090 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}}
10613 10613  
10614 -$curl = curl_init();
10615 -
10616 -curl_setopt_array($curl, array(
10617 - CURLOPT_URL => 'https://api.onecount.net/v2/sources/lookup?Source={{Source code Name}}',
10618 - CURLOPT_RETURNTRANSFER => true,
10619 - CURLOPT_ENCODING => '',
10620 - CURLOPT_MAXREDIRS => 10,
10621 - CURLOPT_TIMEOUT => 0,
10622 - CURLOPT_FOLLOWLOCATION => true,
10623 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10624 - CURLOPT_CUSTOMREQUEST => 'GET',
10625 - CURLOPT_HTTPHEADER => array(
10626 - 'Appkey: {{ONECOUNT API KEY}}'
10627 - ),
10628 -));
10629 -
10630 -$response = curl_exec($curl);
10631 -
10632 -curl_close($curl);
10633 -echo $response;
10634 -{{/code}}
10635 -
10636 10636  \\
10637 10637  
10638 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10094 +(% style="color: rgb(107,107,107);" %)Response  200 OK
10639 10639  
10640 -{{code language="yml" theme="RDark" title="Lookup Source code Response" collapse="true"}}
10641 - {
10642 - "result": {
10643 - "success": "1",
10644 - "error": {
10645 - "code": "",
10646 - "message": ""
10647 - }
10648 - },
10649 - "Sources": [
10650 - {
10651 - "Id": 26,
10652 - "Source": "GCN-Member",
10653 - "Description": "Uploaded from Reston VA",
10654 - "Parent": 0
10655 - }
10656 - ]
10657 -}
10658 -{{/code}}
10096 +{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}}
10659 10659  
10660 10660  \\
10661 10661  
10662 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
10663 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Source code(%%) ==
10664 -
10665 -----
10666 -
10667 -{{panel bgColor="#D3D3D3" width="100%"}}
10668 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources
10669 -{{/panel}}
10670 -
10671 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
10672 -
10673 -----
10674 -
10675 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
10676 -
10677 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
10678 -
10679 -----
10680 -
10681 -{{code language="yml" theme="RDark" title="Body"}}
10682 -{"Source":"Test source code from API"}
10683 -{{/code}}
10684 -
10685 -==== Example ====
10686 -
10687 -----
10688 -
10689 -(% style="color: rgb(107,107,107);" %)Request
10690 -
10691 -{{code language="php" theme="RDark" title="Create Source code Request"}}
10692 - <?php
10693 -
10694 -$curl = curl_init();
10695 -
10696 -curl_setopt_array($curl, array(
10697 - CURLOPT_URL => 'https://api.onecount.net/v2/sources',
10698 - CURLOPT_RETURNTRANSFER => true,
10699 - CURLOPT_ENCODING => '',
10700 - CURLOPT_MAXREDIRS => 10,
10701 - CURLOPT_TIMEOUT => 0,
10702 - CURLOPT_FOLLOWLOCATION => true,
10703 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10704 - CURLOPT_CUSTOMREQUEST => 'POST',
10705 - CURLOPT_POSTFIELDS =>'{"Source":"Test source code from API"}',
10706 - CURLOPT_HTTPHEADER => array(
10707 - 'Appkey: {{ONECOUNT API KEY}}'
10708 - ),
10709 -));
10710 -
10711 -$response = curl_exec($curl);
10712 -
10713 -curl_close($curl);
10714 -echo $response;
10715 -{{/code}}
10716 -
10717 10717  \\
10718 10718  
10719 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10720 -
10721 -{{code language="yml" theme="RDark" title="Create Source code Response" collapse="true"}}
10722 - {
10723 - "result": {
10724 - "success": "1",
10725 - "error": {
10726 - "code": "",
10727 - "message": ""
10728 - }
10729 - },
10730 - "Sources": [
10731 - {
10732 - "Id": 223,
10733 - "Source": "Test source code from API",
10734 - "Description": "",
10735 - "Parent": 0
10736 - }
10737 - ]
10738 -}
10739 -{{/code}}
10740 -
10741 10741  \\
10742 10742  
10743 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
10744 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Source code(%%) ==
10745 -
10746 -----
10747 -
10748 -{{panel bgColor="#D3D3D3" width="100%"}}
10749 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources/~{~{source code id}}
10750 -{{/panel}}
10751 -
10752 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
10753 -
10754 -----
10755 -
10756 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
10757 -
10758 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
10759 -
10760 -----
10761 -
10762 -{{code language="yml" theme="RDark" title="Body"}}
10763 -{"Source":"Test API","Parent":215}
10764 -{{/code}}
10765 -
10766 -==== Example ====
10767 -
10768 -----
10769 -
10770 -(% style="color: rgb(107,107,107);" %)Request
10771 -
10772 -{{code language="php" theme="RDark" title="Update Source code Request"}}
10773 - <?php
10774 -
10775 -$curl = curl_init();
10776 -
10777 -curl_setopt_array($curl, array(
10778 - CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}',
10779 - CURLOPT_RETURNTRANSFER => true,
10780 - CURLOPT_ENCODING => '',
10781 - CURLOPT_MAXREDIRS => 10,
10782 - CURLOPT_TIMEOUT => 0,
10783 - CURLOPT_FOLLOWLOCATION => true,
10784 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10785 - CURLOPT_CUSTOMREQUEST => 'PUT',
10786 - CURLOPT_POSTFIELDS =>'{"Source":"Test API","Parent":215}',
10787 - CURLOPT_HTTPHEADER => array(
10788 - 'Appkey: {{ONECOUNT API KEY}}'
10789 - ),
10790 -));
10791 -
10792 -$response = curl_exec($curl);
10793 -
10794 -curl_close($curl);
10795 -echo $response;
10796 -{{/code}}
10797 -
10798 10798  \\
10799 10799  
10800 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10801 -
10802 -{{code language="yml" theme="RDark" title="Update Source code Response" collapse="true"}}
10803 - {
10804 - "result": {
10805 - "success": "1",
10806 - "error": {
10807 - "code": "",
10808 - "message": ""
10809 - }
10810 - },
10811 - "Sources": [
10812 - {
10813 - "Id": 223,
10814 - "Source": "Test API",
10815 - "Description": "",
10816 - "Parent": 215
10817 - }
10818 - ]
10819 -}
10820 -{{/code}}
10821 -
10822 10822  (% class="western" %)
10823 10823  \\
10824 10824  
10825 10825  (% class="western" %)
10826 -=== **COMPONENT: Transactions** ===
10110 +**COMPONENT: Transactions**
10827 10827  
10828 10828  (% class="western" %)
10829 10829  This resource is for manipulating transactions resource. A transaction can be created or searched.
... ... @@ -10907,13 +10907,13 @@
10907 10907  
10908 10908  (% style="color: rgb(107,107,107);" %)Request
10909 10909  
10910 -{{code language="php" theme="RDark" title="Get All Transaction Request"}}
10194 +{{code language="php" theme="RDark" title="Get All Transaction Request" collapse="true"}}
10911 10911   <?php
10912 10912  
10913 10913  $curl = curl_init();
10914 10914  
10915 10915  curl_setopt_array($curl, array(
10916 - CURLOPT_URL => 'https://api.onecount.net/v2/transactions',
10200 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/transactions?limit=100',
10917 10917   CURLOPT_RETURNTRANSFER => true,
10918 10918   CURLOPT_ENCODING => '',
10919 10919   CURLOPT_MAXREDIRS => 10,
... ... @@ -10934,7 +10934,7 @@
10934 10934  
10935 10935  \\
10936 10936  
10937 -(% style="color: rgb(107,107,107);" %)Response  200 OK
10221 +(% style="color: rgb(107,107,107);" %)Response  200 OK
10938 10938  
10939 10939  {{code language="yml" theme="RDark" title="Get All Transaction Response" collapse="true"}}
10940 10940   {
... ... @@ -12473,13 +12473,13 @@
12473 12473  
12474 12474  (% style="color: rgb(107,107,107);" %)Request
12475 12475  
12476 -{{code language="php" theme="RDark" title="Get specific Transaction Request"}}
11760 +{{code language="php" theme="RDark" title="Get specific Transaction Request" collapse="true"}}
12477 12477   <?php
12478 12478  
12479 12479  $curl = curl_init();
12480 12480  
12481 12481  curl_setopt_array($curl, array(
12482 - CURLOPT_URL => 'https://api.onecount.net/v2/transactions/{{Transaction id}}',
11766 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/transactions/{{Transaction id}}',
12483 12483   CURLOPT_RETURNTRANSFER => true,
12484 12484   CURLOPT_ENCODING => '',
12485 12485   CURLOPT_MAXREDIRS => 10,
... ... @@ -12500,7 +12500,7 @@
12500 12500  
12501 12501  \\
12502 12502  
12503 -(% style="color: rgb(107,107,107);" %)Response  200 OK
11787 +(% style="color: rgb(107,107,107);" %)Response  200 OK
12504 12504  
12505 12505  {{code language="yml" theme="RDark" title="Get specific Transaction Response" collapse="true"}}
12506 12506   {
... ... @@ -12539,7 +12539,7 @@
12539 12539  ----
12540 12540  
12541 12541  {{panel bgColor="#D3D3D3" width="100%"}}
12542 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/transactions/lookup?UserId=~{~{OCID}}
11826 +(% class="nolink" %)[[https:~~/~~/api.onecount.net/v2/users>>url:https://api.onecount.net/v2/users||shape="rect"]](% style="color: rgb(33,33,33);" %)/lookup?2=user_242_6298&return=1,2,3,4
12543 12543  {{/panel}}
12544 12544  
12545 12545  === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
... ... @@ -12552,7 +12552,8 @@
12552 12552  
12553 12553  ----
12554 12554  
12555 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)UserId (% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" style="color: rgb(33, 33, 33); color: rgb(33, 33, 33)" %)~{~{OCID}}
11839 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)2  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)user_242_6298(%%)
11840 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)return  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)1,2,3,4
12556 12556  
12557 12557  ==== Example ====
12558 12558  
... ... @@ -12560,721 +12560,65 @@
12560 12560  
12561 12561  (% style="color: rgb(107,107,107);" %)Request
12562 12562  
12563 -{{code language="php" theme="RDark" title="Lookup Transaction Request"}}
12564 - <?php
11848 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}}
12565 12565  
12566 -$curl = curl_init();
11850 +\\
12567 12567  
12568 -curl_setopt_array($curl, array(
12569 - CURLOPT_URL => 'https://api.onecount.net/v2/transactions/lookup?UserId={{OCID}}',
12570 - CURLOPT_RETURNTRANSFER => true,
12571 - CURLOPT_ENCODING => '',
12572 - CURLOPT_MAXREDIRS => 10,
12573 - CURLOPT_TIMEOUT => 0,
12574 - CURLOPT_FOLLOWLOCATION => true,
12575 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
12576 - CURLOPT_CUSTOMREQUEST => 'GET',
12577 - CURLOPT_HTTPHEADER => array(
12578 - 'Appkey: {{ONECOUNT API KEY}}'
12579 - ),
12580 -));
11852 +(% style="color: rgb(107,107,107);" %)Response  200 OK
12581 12581  
12582 -$response = curl_exec($curl);
11854 +{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}}
12583 12583  
12584 -curl_close($curl);
12585 -echo $response;
12586 -{{/code}}
11856 +\\
12587 12587  
12588 12588  \\
12589 12589  
12590 -(% style="color: rgb(107,107,107);" %)Response  200 OK
11860 +\\
12591 12591  
12592 -{{code language="yml" theme="RDark" title="Lookup Transaction Response" collapse="true"}}
12593 - {
12594 - "result": {
12595 - "success": "1",
12596 - "error": {
12597 - "code": "",
12598 - "message": ""
12599 - }
12600 - },
12601 - "Transactions": [
12602 - {
12603 - "Id": 52494786,
12604 - "UserId": 1234,
12605 - "TermId": 34,
12606 - "TransactionDate": "2016-01-19",
12607 - "TransactionTime": "15:30:04",
12608 - "RequestDate": "2016-01-19",
12609 - "UserIP": "12.226.247.2",
12610 - "SubscriptionType": "u",
12611 - "ProductId": 34,
12612 - "Source": 0,
12613 - "ProductStatus": 0,
12614 - "MediaFilePath": "",
12615 - "Amount": ""
12616 - },
12617 - {
12618 - "Id": 42654041,
12619 - "UserId": 1234,
12620 - "TermId": 34,
12621 - "TransactionDate": "2015-09-09",
12622 - "TransactionTime": "11:20:39",
12623 - "RequestDate": "2015-09-09",
12624 - "UserIP": "24.187.236.98",
12625 - "SubscriptionType": "n",
12626 - "ProductId": 34,
12627 - "Source": 0,
12628 - "ProductStatus": 2,
12629 - "MediaFilePath": "",
12630 - "Amount": ""
12631 - },
12632 - {
12633 - "Id": 97251022,
12634 - "UserId": 1234,
12635 - "TermId": 34,
12636 - "TransactionDate": "2015-06-04",
12637 - "TransactionTime": "14:59:42",
12638 - "RequestDate": "2015-06-04",
12639 - "UserIP": "12.226.247.2",
12640 - "SubscriptionType": "u",
12641 - "ProductId": 34,
12642 - "Source": 0,
12643 - "ProductStatus": 0,
12644 - "MediaFilePath": "",
12645 - "Amount": ""
12646 - },
12647 - {
12648 - "Id": 55492559,
12649 - "UserId": 1234,
12650 - "TermId": 34,
12651 - "TransactionDate": "2015-04-03",
12652 - "TransactionTime": "16:32:04",
12653 - "RequestDate": "2015-04-03",
12654 - "UserIP": "24.187.236.98",
12655 - "SubscriptionType": "r",
12656 - "ProductId": 34,
12657 - "Source": 58,
12658 - "ProductStatus": 106,
12659 - "MediaFilePath": "",
12660 - "Amount": ""
12661 - },
12662 - {
12663 - "Id": 98173391,
12664 - "UserId": 1234,
12665 - "TermId": 34,
12666 - "TransactionDate": "2015-04-03",
12667 - "TransactionTime": "15:50:45",
12668 - "RequestDate": "2014-08-19",
12669 - "UserIP": "24.187.236.98",
12670 - "SubscriptionType": "n",
12671 - "ProductId": 34,
12672 - "Source": 34,
12673 - "ProductStatus": 106,
12674 - "MediaFilePath": "",
12675 - "Amount": ""
12676 - },
12677 - {
12678 - "Id": 91711793,
12679 - "UserId": 1234,
12680 - "TermId": 18,
12681 - "TransactionDate": "2015-04-27",
12682 - "TransactionTime": "14:24:51",
12683 - "RequestDate": "2015-04-27",
12684 - "UserIP": "24.187.236.98",
12685 - "SubscriptionType": "u",
12686 - "ProductId": 18,
12687 - "Source": 0,
12688 - "ProductStatus": 106,
12689 - "MediaFilePath": "",
12690 - "Amount": ""
12691 - },
12692 - {
12693 - "Id": 74936400,
12694 - "UserId": 1234,
12695 - "TermId": 18,
12696 - "TransactionDate": "2015-04-27",
12697 - "TransactionTime": "12:35:18",
12698 - "RequestDate": "2015-04-27",
12699 - "UserIP": "68.196.187.74",
12700 - "SubscriptionType": "n",
12701 - "ProductId": 18,
12702 - "Source": 34,
12703 - "ProductStatus": 106,
12704 - "MediaFilePath": "",
12705 - "Amount": ""
12706 - },
12707 - {
12708 - "Id": 21664714,
12709 - "UserId": 1234,
12710 - "TermId": 18,
12711 - "TransactionDate": "2015-04-03",
12712 - "TransactionTime": "15:50:46",
12713 - "RequestDate": "2015-04-03",
12714 - "UserIP": "24.187.236.98",
12715 - "SubscriptionType": "u",
12716 - "ProductId": 18,
12717 - "Source": 0,
12718 - "ProductStatus": 2,
12719 - "MediaFilePath": "",
12720 - "Amount": ""
12721 - },
12722 - {
12723 - "Id": 81129263,
12724 - "UserId": 1234,
12725 - "TermId": 18,
12726 - "TransactionDate": "2014-08-19",
12727 - "TransactionTime": "11:18:55",
12728 - "RequestDate": "2014-08-19",
12729 - "UserIP": "74.201.38.1",
12730 - "SubscriptionType": "n",
12731 - "ProductId": 18,
12732 - "Source": 34,
12733 - "ProductStatus": 2,
12734 - "MediaFilePath": "",
12735 - "Amount": ""
12736 - },
12737 - {
12738 - "Id": 30461748,
12739 - "UserId": 1234,
12740 - "ResourceId": 459,
12741 - "TransactionDate": "2023-03-15",
12742 - "TransactionTime": "12:07:55",
12743 - "RequestDate": "2023-03-15",
12744 - "UserIP": "74.201.38.12",
12745 - "SubscriptionType": "n",
12746 - "SourceCode": 0,
12747 - "ProductStatus": 0,
12748 - "MediaFilePath": "",
12749 - "Amount": ""
12750 - },
12751 - {
12752 - "Id": 25858253,
12753 - "UserId": 1234,
12754 - "ResourceId": 451,
12755 - "TransactionDate": "2023-03-15",
12756 - "TransactionTime": "11:45:19",
12757 - "RequestDate": "2023-03-15",
12758 - "UserIP": "74.201.38.12",
12759 - "SubscriptionType": "n",
12760 - "SourceCode": 0,
12761 - "ProductStatus": 0,
12762 - "MediaFilePath": "",
12763 - "Amount": ""
12764 - },
12765 - {
12766 - "Id": 69453260,
12767 - "UserId": 1234,
12768 - "ResourceId": 411,
12769 - "TransactionDate": "2022-06-07",
12770 - "TransactionTime": "17:03:14",
12771 - "RequestDate": "2022-06-07",
12772 - "UserIP": "74.201.38.12",
12773 - "SubscriptionType": "n",
12774 - "SourceCode": 0,
12775 - "ProductStatus": 0,
12776 - "MediaFilePath": "",
12777 - "Amount": ""
12778 - },
12779 - {
12780 - "Id": 51354425,
12781 - "UserId": 1234,
12782 - "ResourceId": 355,
12783 - "TransactionDate": "2020-04-06",
12784 - "TransactionTime": "12:24:08",
12785 - "RequestDate": "2020-04-06",
12786 - "UserIP": "74.201.38.12",
12787 - "SubscriptionType": "n",
12788 - "SourceCode": 0,
12789 - "ProductStatus": 0,
12790 - "MediaFilePath": "",
12791 - "Amount": ""
12792 - }
12793 - ]
12794 -}
12795 -{{/code}}
11862 +\\
12796 12796  
12797 12797  \\
12798 12798  
12799 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
12800 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Transaction(%%) ==
11866 +\\
12801 12801  
12802 -----
11868 +\\
12803 12803  
12804 -{{panel bgColor="#D3D3D3" width="100%"}}
12805 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/transactions
12806 -{{/panel}}
11870 +\\
12807 12807  
12808 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
11872 +\\
12809 12809  
12810 -----
11874 +\\
12811 12811  
12812 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
11876 +\\
12813 12813  
12814 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
11878 +\\
12815 12815  
12816 -----
11880 +\\
12817 12817  
12818 -{{code language="yml" theme="RDark" title="Body"}}
12819 -{"UserId": 1845775,"TermId":447 ,"UserIP":"192.168.0.1" ,"SubscriptionType":"n" , "ProductId":599 ,"FormId": "8f93834c-adce-4dc7-acd0-f3a1e0f7c63f","Source": 83,"ProductStatus": 2,"Amount":"0.00" ,"PaypalTransId":"" , "MediaFilePath":"" ,"Remarks": "USER SUBSCRIBED","BatchId":"1234" ,"Quantity": 1, "ExpireDate":"20251211" }
12820 -{{/code}}
11882 +\\
12821 12821  
12822 -==== Example ====
11884 +\\
12823 12823  
12824 -----
11886 +\\
12825 12825  
12826 -(% style="color: rgb(107,107,107);" %)Request
12827 -
12828 -{{code language="php" theme="RDark" title="Create Transaction Request"}}
12829 - <?php
12830 -
12831 -$curl = curl_init();
12832 -
12833 -curl_setopt_array($curl, array(
12834 - CURLOPT_URL => 'https://api.onecount.net/v2/transactions',
12835 - CURLOPT_RETURNTRANSFER => true,
12836 - CURLOPT_ENCODING => '',
12837 - CURLOPT_MAXREDIRS => 10,
12838 - CURLOPT_TIMEOUT => 0,
12839 - CURLOPT_FOLLOWLOCATION => true,
12840 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
12841 - CURLOPT_CUSTOMREQUEST => 'POST',
12842 - CURLOPT_POSTFIELDS =>'{"UserId": 1845775,"TermId":447 ,"UserIP":"192.168.0.1" ,"SubscriptionType":"n" , "ProductId":599 ,"FormId": "8f93834c-adce-4dc7-acd0-f3a1e0f7c63f","Source": 83,"ProductStatus": 2,"Amount":"0.00" ,"PaypalTransId":"" , "MediaFilePath":"" ,"Remarks": "USER SUBSCRIBED","BatchId":"1234" ,"Quantity": 1, "ExpireDate":"20251211" }',
12843 - CURLOPT_HTTPHEADER => array(
12844 - 'Appkey: {{ONECOUNT API KEY}}'
12845 - ),
12846 -));
12847 -
12848 -$response = curl_exec($curl);
12849 -
12850 -curl_close($curl);
12851 -echo $response;
12852 -{{/code}}
12853 -
12854 12854  \\
12855 12855  
12856 -(% style="color: rgb(107,107,107);" %)Response  200 OK
12857 -
12858 -{{code language="yml" theme="RDark" title="Create Transaction Response" collapse="true"}}
12859 - {
12860 - "result": {
12861 - "success": "1",
12862 - "error": {
12863 - "code": "",
12864 - "message": ""
12865 - }
12866 - },
12867 - "Transactions": {
12868 - "Id": "1234",
12869 - "UserId": 1845775,
12870 - "TermId": 447,
12871 - "TransactionDate": "20231211",
12872 - "TransactionTime": "09:34:26",
12873 - "RequestDate": "20231211",
12874 - "UserIP": "192.168.0.1",
12875 - "SubscriptionType": "n",
12876 - "ProductId": 599,
12877 - "Source": 83,
12878 - "ProductStatus": 2,
12879 - "MediaFilePath": "",
12880 - "Amount": "0.00"
12881 - }
12882 -}
12883 -{{/code}}
12884 -
12885 12885  \\
12886 12886  
12887 -=== **COMPONENT: Engagements** ===
12888 -
12889 -(% class="western" %)
12890 -Engagement can be added, updated and searched for using the engagements resource from the api.
12891 -
12892 -(% class="western" %)
12893 12893  \\
12894 12894  
12895 -(% class="wrapped" %)
12896 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12897 -(((
12898 -(% class="western" %)
12899 -**Method**
12900 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12901 -(((
12902 -(% class="western" %)
12903 -**Url**
12904 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12905 -(((
12906 -(% class="western" %)
12907 -**Action**
12908 -)))
12909 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12910 -(((
12911 -(% class="western" %)
12912 -GET
12913 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12914 -(((
12915 -(% class="western" %)
12916 -/(% style="color: rgb(33,33,33);" %)engagements
12917 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12918 -(((
12919 -(% class="western" %)
12920 -Get engagement data limiting 25.
12921 -)))
12922 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12923 -(((
12924 -(% class="western" %)
12925 -GET
12926 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12927 -(((
12928 -(% class="western" %)
12929 -/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id>
12930 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12931 -(((
12932 -(% class="western" %)
12933 -Get data for engagement id. The engagement id is a string
12934 -)))
12935 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12936 -(((
12937 -(% class="western" %)
12938 -POST
12939 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12940 -(((
12941 -(% class="western" %)
12942 -/(% style="color: rgb(33,33,33);" %)engagements
12943 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12944 -(((
12945 -(% class="western" %)
12946 -Create a new engagement
12947 -
12948 -(% class="western" %)
12949 -Parameters required to create the engagement needs to be sent as post data in JSON format.
12950 -)))
12951 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12952 -(((
12953 -(% class="western" %)
12954 -PUT
12955 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12956 -(((
12957 -(% class="western" %)
12958 -/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id>
12959 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12960 -(((
12961 -(% class="western" %)
12962 -Update engagement by engagement id. The engagement id string
12963 -
12964 -(% class="western" %)
12965 -Parameters required to update the engagement needs to be sent as post data in JSON format.
12966 -)))
12967 -|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12968 -(((
12969 -(% class="western" %)
12970 -POST
12971 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12972 -(((
12973 -(% class="western" %)
12974 -(% style="color: rgb(33,33,33);" %)/engagements/addUser
12975 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
12976 -(((
12977 -(% class="western" %)
12978 -Add user to engagement
12979 -
12980 -(% class="western" %)
12981 -Parameters required to add user to the engagement needs to be sent as post data in JSON format.
12982 -)))
12983 -
12984 12984  \\
12985 12985  
12986 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
12987 -== (% class="sc-fzoaKM imuBmi" style="color: rgb(0,127,49);" %)GET (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)All Engagements(%%) ==
12988 -
12989 -----
12990 -
12991 -----
12992 -
12993 -{{panel bgColor="#D3D3D3" width="100%"}}
12994 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements
12995 -{{/panel}}
12996 -
12997 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
12998 -
12999 -----
13000 -
13001 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
13002 -
13003 -==== Example ====
13004 -
13005 -----
13006 -
13007 -(% style="color: rgb(107,107,107);" %)Request
13008 -
13009 -{{code language="php" theme="RDark" title="Get All Engagement Request"}}
13010 -<?php
13011 -
13012 -$curl = curl_init();
13013 -
13014 -curl_setopt_array($curl, array(
13015 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements',
13016 - CURLOPT_RETURNTRANSFER => true,
13017 - CURLOPT_ENCODING => '',
13018 - CURLOPT_MAXREDIRS => 10,
13019 - CURLOPT_TIMEOUT => 0,
13020 - CURLOPT_FOLLOWLOCATION => true,
13021 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13022 - CURLOPT_CUSTOMREQUEST => 'GET',
13023 - CURLOPT_HTTPHEADER => array(
13024 - 'Appkey: {{ONECOUNT API KEY}}'
13025 - ),
13026 -));
13027 -
13028 -$response = curl_exec($curl);
13029 -
13030 -curl_close($curl);
13031 -echo $response;
13032 -
13033 -
13034 -{{/code}}
13035 -
13036 13036  \\
13037 13037  
13038 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13039 -== (% class="sc-fzoaKM imuBmi" style="color: rgb(0,127,49);" %)GET (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Specific Engagement(%%) ==
13040 -
13041 -----
13042 -
13043 -----
13044 -
13045 -{{panel bgColor="#D3D3D3" width="100%"}}
13046 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement ID}}
13047 -{{/panel}}
13048 -
13049 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13050 -
13051 -----
13052 -
13053 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
13054 -
13055 -==== Example ====
13056 -
13057 -----
13058 -
13059 -(% style="color: rgb(107,107,107);" %)Request
13060 -
13061 -{{code language="php" theme="RDark" title="Get Specific Engagement Request"}}
13062 -<?php
13063 -
13064 -$curl = curl_init();
13065 -
13066 -curl_setopt_array($curl, array(
13067 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement ID}}',
13068 - CURLOPT_RETURNTRANSFER => true,
13069 - CURLOPT_ENCODING => '',
13070 - CURLOPT_MAXREDIRS => 10,
13071 - CURLOPT_TIMEOUT => 0,
13072 - CURLOPT_FOLLOWLOCATION => true,
13073 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13074 - CURLOPT_CUSTOMREQUEST => 'GET',
13075 - CURLOPT_HTTPHEADER => array(
13076 - 'Appkey: {{ONECOUNT API KEY}}'
13077 - ),
13078 -));
13079 -
13080 -$response = curl_exec($curl);
13081 -
13082 -curl_close($curl);
13083 -echo $response;
13084 -
13085 -
13086 -{{/code}}
13087 -
13088 13088  \\
13089 13089  
13090 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13091 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Engagement(%%) ==
13092 -
13093 -----
13094 -
13095 -{{panel bgColor="#D3D3D3" width="100%"}}
13096 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements
13097 -{{/panel}}
13098 -
13099 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13100 -
13101 -----
13102 -
13103 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
13104 -
13105 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
13106 -
13107 -----
13108 -
13109 -{{code language="yml" theme="RDark" title="Body"}}
13110 -{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[
13111 - {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"},
13112 - {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"},
13113 - {"Price":[],"Type": "numeric"},
13114 - {"Transaction Date":[],"Type": "date"}
13115 -]}
13116 -{{/code}}
13117 -
13118 -==== Example ====
13119 -
13120 -----
13121 -
13122 -(% style="color: rgb(107,107,107);" %)Request
13123 -
13124 -{{code language="php" theme="RDark" title="Create Engagement Request"}}
13125 - <?php
13126 -
13127 -$curl = curl_init();
13128 -
13129 -curl_setopt_array($curl, array(
13130 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements',
13131 - CURLOPT_RETURNTRANSFER => true,
13132 - CURLOPT_ENCODING => '',
13133 - CURLOPT_MAXREDIRS => 10,
13134 - CURLOPT_TIMEOUT => 0,
13135 - CURLOPT_FOLLOWLOCATION => true,
13136 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13137 - CURLOPT_CUSTOMREQUEST => 'POST',
13138 - CURLOPT_POSTFIELDS =>'{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[
13139 - {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"},
13140 - {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"},
13141 - {"Price":[],"Type": "numeric"},
13142 - {"Transaction Date":[],"Type": "date"}
13143 -]}',
13144 - CURLOPT_HTTPHEADER => array(
13145 - 'Appkey: {{ONECOUNT API KEY}}'
13146 - ),
13147 -));
13148 -
13149 -$response = curl_exec($curl);
13150 -
13151 -curl_close($curl);
13152 -echo $response;
13153 -{{/code}}
13154 -
13155 13155  \\
13156 13156  
13157 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13158 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Engagement(%%) ==
13159 -
13160 -----
13161 -
13162 -{{panel bgColor="#D3D3D3" width="100%"}}
13163 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement Id}}
13164 -{{/panel}}
13165 -
13166 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13167 -
13168 -----
13169 -
13170 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
13171 -
13172 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
13173 -
13174 -----
13175 -
13176 -{{code language="yml" theme="RDark" title="Body"}}
13177 -{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[
13178 - {"Name":[{"webinar ID 5":"Webinar 5"},{"webinar ID 4":"Webinar 4"}],"Type": "select"},
13179 - {"Price":[],"Type": "text"}
13180 -]}
13181 -{{/code}}
13182 -
13183 -==== Example ====
13184 -
13185 -----
13186 -
13187 -(% style="color: rgb(107,107,107);" %)Request
13188 -
13189 -{{code language="php" theme="RDark" title="Update Engagement Request"}}
13190 - <?php
13191 -
13192 -$curl = curl_init();
13193 -
13194 -curl_setopt_array($curl, array(
13195 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement Id}}',
13196 - CURLOPT_RETURNTRANSFER => true,
13197 - CURLOPT_ENCODING => '',
13198 - CURLOPT_MAXREDIRS => 10,
13199 - CURLOPT_TIMEOUT => 0,
13200 - CURLOPT_FOLLOWLOCATION => true,
13201 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13202 - CURLOPT_CUSTOMREQUEST => 'PUT',
13203 - CURLOPT_POSTFIELDS =>'{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[
13204 - {"Name":[{"webinar ID 5":"Webinar 5"},{"webinar ID 4":"Webinar 4"}],"Type": "select"},
13205 - {"Price":[],"Type": "text"}
13206 -]}',
13207 - CURLOPT_HTTPHEADER => array(
13208 - 'Appkey: {{ONECOUNT API KEY}}'
13209 - ),
13210 -));
13211 -
13212 -$response = curl_exec($curl);
13213 -
13214 -curl_close($curl);
13215 -echo $response;
13216 -{{/code}}
13217 -
13218 13218  \\
13219 13219  
13220 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13221 -== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Add User to Engagement(%%) ==
13222 -
13223 -----
13224 -
13225 -{{panel bgColor="#D3D3D3" width="100%"}}
13226 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/addUser
13227 -{{/panel}}
13228 -
13229 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13230 -
13231 -----
13232 -
13233 -(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey  (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}}
13234 -
13235 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
13236 -
13237 -----
13238 -
13239 -{{code language="yml" theme="RDark" title="Body"}}
13240 -{"Engagement id":"073b3a98-129b-440e-90b1-57957215ca67","Vendor id":1, "Engagement show id":"webinar ID 4","User id":"3143231","timestamp":1702319997, "data":{"Attendance Status":"not_attended","Price":10.00},"segment":["segment id 1"]}
13241 -{{/code}}
13242 -
13243 -==== Example ====
13244 -
13245 -----
13246 -
13247 -(% style="color: rgb(107,107,107);" %)Request
13248 -
13249 -{{code language="php" theme="RDark" title="Add User to Engagement Request"}}
13250 - <?php
13251 -
13252 -$curl = curl_init();
13253 -
13254 -curl_setopt_array($curl, array(
13255 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/addUser',
13256 - CURLOPT_RETURNTRANSFER => true,
13257 - CURLOPT_ENCODING => '',
13258 - CURLOPT_MAXREDIRS => 10,
13259 - CURLOPT_TIMEOUT => 0,
13260 - CURLOPT_FOLLOWLOCATION => true,
13261 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13262 - CURLOPT_CUSTOMREQUEST => 'POST',
13263 - CURLOPT_POSTFIELDS =>'{"Engagement id":"073b3a98-129b-440e-90b1-57957215ca67","Vendor id":1, "Engagement show id":"webinar ID 4","User id":"3143231","timestamp":1702319997, "data":{"Attendance Status":"not_attended","Price":10.00},"segment":["segment id 1"]}',
13264 - CURLOPT_HTTPHEADER => array(
13265 - 'Appkey: {{ONECOUNT API KEY}}'
13266 - ),
13267 -));
13268 -
13269 -$response = curl_exec($curl);
13270 -
13271 -curl_close($curl);
13272 -echo $response;
13273 -{{/code}}
13274 -
13275 13275  (% class="western" %)
13276 -=== **COMPONENT: Leads
13277 -** ===
11905 +**COMPONENT: Leads
11906 +**
13278 13278  
13279 13279  (% class="western" %)
13280 13280  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.
... ... @@ -13459,6 +13459,14 @@
13459 13459  
13460 13460  \\
13461 13461  
12091 +\\
12092 +
12093 +\\
12094 +
12095 +\\
12096 +
12097 +\\
12098 +
13462 13462  (% class="western" %)
13463 13463  **API REFERENCE**
13464 13464  
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -110231560
1 +108265481
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/110231560/ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/108265481/ONEcount API Documentation