Changes for page ONEcount API Documentation
Last modified by Rayaan Ahmed on 2025/02/09 22:20
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 3 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -System Setup Detail and Technical Information - Content
-
... ... @@ -59,11 +59,6 @@ 59 59 11. Create Engagements 60 60 11. Update Engagements 61 61 11. Add users data to Engagement 62 -1. Segments\\ 63 -11. Get all Segments 64 -11. Get specific segment by segment id 65 -11. Add users to segment 66 -11. Get all segment ids for a user 67 67 68 68 \\ 69 69 ... ... @@ -120,7 +120,7 @@ 120 120 (% class="western" %) 121 121 API will output the response in a JSON format discussed below. 122 122 123 -{{code language="yml" theme="RDark" title="Response"}} 118 +{{code language="yml" theme="RDark" title="Response" collapse="true"}} 124 124 { 125 125 "result": { 126 126 "success": "1", ... ... @@ -232,7 +232,7 @@ 232 232 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. 233 233 234 234 (% class="western" %) 235 -Return parameter defines a CSVof question id that are requested back in response.230 +Return parameter defines a csv of question id that are requested back in response. 236 236 ))) 237 237 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 238 238 ((( ... ... @@ -340,13 +340,13 @@ 340 340 341 341 (% style="color: rgb(107,107,107);" %)Request 342 342 343 -{{code language="php" theme="RDark" title="Get All Users Request"}} 338 +{{code language="php" theme="RDark" title="Get All Users Request" collapse="true"}} 344 344 <?php 345 345 346 346 $curl = curl_init(); 347 347 348 348 curl_setopt_array($curl, array( 349 - CURLOPT_URL => ' https://api.onecount.net/v2/users',344 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users', 350 350 CURLOPT_RETURNTRANSFER => true, 351 351 CURLOPT_ENCODING => '', 352 352 CURLOPT_MAXREDIRS => 10, ... ... @@ -369,7 +369,7 @@ 369 369 370 370 \\ 371 371 372 -(% style="color: rgb(107,107,107);" %)Response 200 OK 367 +(% style="color: rgb(107,107,107);" %)Response 200 OK 373 373 374 374 {{code language="yml" theme="RDark" title="Get All Users Response" collapse="true"}} 375 375 { ... ... @@ -880,13 +880,13 @@ 880 880 881 881 (% style="color: rgb(107,107,107);" %)Request 882 882 883 -{{code language="php" theme="RDark" title="Get specific User Request"}} 878 +{{code language="php" theme="RDark" title="Get specific User Request" collapse="true"}} 884 884 <?php 885 885 886 886 $curl = curl_init(); 887 887 888 888 curl_setopt_array($curl, array( 889 - CURLOPT_URL => ' https://api.onecount.net/v2/users/{{OCID}}',884 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/8418', 890 890 CURLOPT_RETURNTRANSFER => true, 891 891 CURLOPT_ENCODING => '', 892 892 CURLOPT_MAXREDIRS => 10, ... ... @@ -907,7 +907,7 @@ 907 907 908 908 \\ 909 909 910 -(% style="color: rgb(107,107,107);" %)Response 200 OK 905 +(% style="color: rgb(107,107,107);" %)Response 200 OK 911 911 912 912 {{code language="yml" theme="RDark" title="Get specific user Response" collapse="true"}} 913 913 { ... ... @@ -978,7 +978,7 @@ 978 978 979 979 ---- 980 980 981 -{{code language="yml" theme="RDark" title="Body"}} 976 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 982 982 {"e":"rayaan@one-count.com","p":"12345"} 983 983 {{/code}} 984 984 ... ... @@ -988,13 +988,13 @@ 988 988 989 989 (% style="color: rgb(107,107,107);" %)Request 990 990 991 -{{code language="php" theme="RDark" title="User login Request"}} 986 +{{code language="php" theme="RDark" title="User login Request" collapse="true"}} 992 992 <?php 993 993 994 994 $curl = curl_init(); 995 995 996 996 curl_setopt_array($curl, array( 997 - CURLOPT_URL => ' https://api.onecount.net/v2/users/login',992 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/login', 998 998 CURLOPT_RETURNTRANSFER => true, 999 999 CURLOPT_ENCODING => '', 1000 1000 CURLOPT_MAXREDIRS => 10, ... ... @@ -1016,7 +1016,7 @@ 1016 1016 1017 1017 \\ 1018 1018 1019 -(% style="color: rgb(107,107,107);" %)Response 200 OK 1014 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1020 1020 1021 1021 {{code language="yml" theme="RDark" title="Login user Response" collapse="true"}} 1022 1022 { ... ... @@ -1063,13 +1063,13 @@ 1063 1063 1064 1064 (% style="color: rgb(107,107,107);" %)Request 1065 1065 1066 -{{code language="php" theme="RDark" title="Lookup user Request"}} 1061 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"}} 1067 1067 <?php 1068 1068 1069 1069 $curl = curl_init(); 1070 1070 1071 1071 curl_setopt_array($curl, array( 1072 - 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', 1073 1073 CURLOPT_RETURNTRANSFER => true, 1074 1074 CURLOPT_ENCODING => '', 1075 1075 CURLOPT_MAXREDIRS => 10, ... ... @@ -1090,7 +1090,7 @@ 1090 1090 1091 1091 \\ 1092 1092 1093 -(% style="color: rgb(107,107,107);" %)Response 200 OK 1088 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1094 1094 1095 1095 {{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"}} 1096 1096 { ... ... @@ -1146,7 +1146,6 @@ 1146 1146 (% class="western" %) 1147 1147 **POST method should be used to create users.** 1148 1148 1149 -(% class="wrapped" %) 1150 1150 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1151 1151 ((( 1152 1152 (% class="western" %) ... ... @@ -1213,7 +1213,6 @@ 1213 1213 CSV of ONEcount QuestionId's requested back in Users object in response. 1214 1214 ))) 1215 1215 1216 -(% class="wrapped" %) 1217 1217 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1218 1218 ((( 1219 1219 (% class="western" %) ... ... @@ -1251,7 +1251,7 @@ 1251 1251 1252 1252 ---- 1253 1253 1254 -{{code language="yml" theme="RDark" title="Body"}} 1247 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 1255 1255 {"Users":{"PartnerId":1,"Demo":{"1":"testApirayaan7@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[]} 1256 1256 {{/code}} 1257 1257 ... ... @@ -1261,13 +1261,13 @@ 1261 1261 1262 1262 (% style="color: rgb(107,107,107);" %)Request 1263 1263 1264 -{{code language="php" theme="RDark" title="Create User Request"}} 1257 +{{code language="php" theme="RDark" title="Create User Request" collapse="true"}} 1265 1265 <?php 1266 1266 1267 1267 $curl = curl_init(); 1268 1268 1269 1269 curl_setopt_array($curl, array( 1270 - CURLOPT_URL => ' https://api.onecount.net/v2/users',1263 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users', 1271 1271 CURLOPT_RETURNTRANSFER => true, 1272 1272 CURLOPT_ENCODING => '', 1273 1273 CURLOPT_MAXREDIRS => 10, ... ... @@ -1289,7 +1289,7 @@ 1289 1289 1290 1290 \\ 1291 1291 1292 -(% style="color: rgb(107,107,107);" %)Response 200 OK 1285 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1293 1293 1294 1294 {{code language="yml" theme="RDark" title="Create user Response" collapse="true"}} 1295 1295 { ... ... @@ -1323,7 +1323,6 @@ 1323 1323 (% class="western" %) 1324 1324 **PUT method should be used to update users.** 1325 1325 1326 -(% class="wrapped" %) 1327 1327 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1328 1328 ((( 1329 1329 (% class="western" %) ... ... @@ -1377,7 +1377,6 @@ 1377 1377 RequestDate to use for the demo update. If not provided current date will be used. 1378 1378 ))) 1379 1379 1380 -(% class="wrapped" %) 1381 1381 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1382 1382 ((( 1383 1383 (% class="western" %) ... ... @@ -1415,7 +1415,7 @@ 1415 1415 1416 1416 ---- 1417 1417 1418 -{{code language="yml" theme="RDark" title="Body"}} 1409 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 1419 1419 {"Users":{"Demo":{"6":"title1"}}} 1420 1420 {{/code}} 1421 1421 ... ... @@ -1425,13 +1425,13 @@ 1425 1425 1426 1426 (% style="color: rgb(107,107,107);" %)Request 1427 1427 1428 -{{code language="php" theme="RDark" title="Update User Request"}} 1419 +{{code language="php" theme="RDark" title="Update User Request" collapse="true"}} 1429 1429 <?php 1430 1430 1431 1431 $curl = curl_init(); 1432 1432 1433 1433 curl_setopt_array($curl, array( 1434 - CURLOPT_URL => ' https://api.onecount.net/v2/users/{{OCID}}',1425 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/users/{{OCID}}', 1435 1435 CURLOPT_RETURNTRANSFER => true, 1436 1436 CURLOPT_ENCODING => '', 1437 1437 CURLOPT_MAXREDIRS => 10, ... ... @@ -1455,7 +1455,7 @@ 1455 1455 1456 1456 \\ 1457 1457 1458 -(% style="color: rgb(107,107,107);" %)Response 200 OK 1449 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1459 1459 1460 1460 {{code language="yml" theme="RDark" title="Update user Response" collapse="true"}} 1461 1461 { ... ... @@ -1479,7 +1479,7 @@ 1479 1479 \\ 1480 1480 1481 1481 (% class="western" %) 1482 - ===**COMPONENT: Questions**===1473 +**COMPONENT: Questions** 1483 1483 1484 1484 (% class="western" %) 1485 1485 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). ... ... @@ -1669,13 +1669,13 @@ 1669 1669 1670 1670 (% style="color: rgb(107,107,107);" %)Request 1671 1671 1672 -{{code language="php" theme="RDark" title="Get All Questions Request"}} 1663 +{{code language="php" theme="RDark" title="Get All Questions Request" collapse="true"}} 1673 1673 <?php 1674 1674 1675 1675 $curl = curl_init(); 1676 1676 1677 1677 curl_setopt_array($curl, array( 1678 - CURLOPT_URL => ' https://api.onecount.net/v2/questions',1669 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions', 1679 1679 CURLOPT_RETURNTRANSFER => true, 1680 1680 CURLOPT_ENCODING => '', 1681 1681 CURLOPT_MAXREDIRS => 10, ... ... @@ -1699,7 +1699,7 @@ 1699 1699 1700 1700 \\ 1701 1701 1702 -(% style="color: rgb(107,107,107);" %)Response 200 OK 1693 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1703 1703 1704 1704 {{code language="yml" theme="RDark" title="Get All Questions Response" collapse="true"}} 1705 1705 { ... ... @@ -3810,13 +3810,13 @@ 3810 3810 3811 3811 (% style="color: rgb(107,107,107);" %)Request 3812 3812 3813 -{{code language="php" theme="RDark" title="Get specific Question Request"}} 3804 +{{code language="php" theme="RDark" title="Get specific Question Request" collapse="true"}} 3814 3814 <?php 3815 3815 3816 3816 $curl = curl_init(); 3817 3817 3818 3818 curl_setopt_array($curl, array( 3819 - CURLOPT_URL => ' https://api.onecount.net/v2/questions/{{QUESTION ID}}',3810 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/{{QUESTION ID}}', 3820 3820 CURLOPT_RETURNTRANSFER => true, 3821 3821 CURLOPT_ENCODING => '', 3822 3822 CURLOPT_MAXREDIRS => 10, ... ... @@ -3837,7 +3837,7 @@ 3837 3837 3838 3838 \\ 3839 3839 3840 -(% style="color: rgb(107,107,107);" %)Response 200 OK 3831 +(% style="color: rgb(107,107,107);" %)Response 200 OK 3841 3841 3842 3842 {{code language="yml" theme="RDark" title="Get specific question Response" collapse="true"}} 3843 3843 { ... ... @@ -3889,13 +3889,13 @@ 3889 3889 3890 3890 (% style="color: rgb(107,107,107);" %)Request 3891 3891 3892 -{{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"}} 3893 3893 <?php 3894 3894 3895 3895 $curl = curl_init(); 3896 3896 3897 3897 curl_setopt_array($curl, array( 3898 - CURLOPT_URL => ' https://api.onecount.net/v2/questions/lookup?Text=COUNTRY',3889 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/lookup?Text=COUNTRY', 3899 3899 CURLOPT_RETURNTRANSFER => true, 3900 3900 CURLOPT_ENCODING => '', 3901 3901 CURLOPT_MAXREDIRS => 10, ... ... @@ -3916,7 +3916,7 @@ 3916 3916 3917 3917 \\ 3918 3918 3919 -(% style="color: rgb(107,107,107);" %)Response 200 OK 3910 +(% style="color: rgb(107,107,107);" %)Response 200 OK 3920 3920 3921 3921 {{code language="yml" theme="RDark" title="Lookup question by title Response" collapse="true"}} 3922 3922 { ... ... @@ -5335,13 +5335,13 @@ 5335 5335 5336 5336 (% style="color: rgb(107,107,107);" %)Request 5337 5337 5338 -{{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"}} 5339 5339 <?php 5340 5340 5341 5341 $curl = curl_init(); 5342 5342 5343 5343 curl_setopt_array($curl, array( 5344 - CURLOPT_URL => ' https://api.onecount.net/v2/questions/lookup?Type=4',5335 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/lookup?Type=4', 5345 5345 CURLOPT_RETURNTRANSFER => true, 5346 5346 CURLOPT_ENCODING => '', 5347 5347 CURLOPT_MAXREDIRS => 10, ... ... @@ -5362,7 +5362,7 @@ 5362 5362 5363 5363 \\ 5364 5364 5365 -(% style="color: rgb(107,107,107);" %)Response 200 OK 5356 +(% style="color: rgb(107,107,107);" %)Response 200 OK 5366 5366 5367 5367 {{code language="yml" theme="RDark" title="Lookup question by type Response" collapse="true"}} 5368 5368 { ... ... @@ -8032,7 +8032,7 @@ 8032 8032 8033 8033 ---- 8034 8034 8035 -{{code language="yml" theme="RDark" title="Body"}} 8026 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 8036 8036 {"Text":"Test from API 3","Type":0,"Alias":"Test from API 3"} 8037 8037 {{/code}} 8038 8038 ... ... @@ -8042,13 +8042,13 @@ 8042 8042 8043 8043 (% style="color: rgb(107,107,107);" %)Request 8044 8044 8045 -{{code language="php" theme="RDark" title="Create Question Request"}} 8036 +{{code language="php" theme="RDark" title="Create Question Request" collapse="true"}} 8046 8046 <?php 8047 8047 8048 8048 $curl = curl_init(); 8049 8049 8050 8050 curl_setopt_array($curl, array( 8051 - CURLOPT_URL => ' https://api.onecount.net/v2/questions',8042 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions', 8052 8052 CURLOPT_RETURNTRANSFER => true, 8053 8053 CURLOPT_ENCODING => '', 8054 8054 CURLOPT_MAXREDIRS => 10, ... ... @@ -8070,7 +8070,7 @@ 8070 8070 8071 8071 \\ 8072 8072 8073 -(% style="color: rgb(107,107,107);" %)Response 200 OK 8064 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8074 8074 8075 8075 {{code language="yml" theme="RDark" title="Create question Response" collapse="true"}} 8076 8076 { ... ... @@ -8110,7 +8110,7 @@ 8110 8110 8111 8111 ---- 8112 8112 8113 -{{code language="yml" theme="RDark" title="Body"}} 8104 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 8114 8114 {"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"}]} 8115 8115 {{/code}} 8116 8116 ... ... @@ -8120,13 +8120,13 @@ 8120 8120 8121 8121 (% style="color: rgb(107,107,107);" %)Request 8122 8122 8123 -{{code language="php" theme="RDark" title="Create Question Request"}} 8114 +{{code language="php" theme="RDark" title="Create Question Request" collapse="true"}} 8124 8124 <?php 8125 8125 8126 8126 $curl = curl_init(); 8127 8127 8128 8128 curl_setopt_array($curl, array( 8129 - CURLOPT_URL => ' https://api.onecount.net/v2/questions',8120 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions', 8130 8130 CURLOPT_RETURNTRANSFER => true, 8131 8131 CURLOPT_ENCODING => '', 8132 8132 CURLOPT_MAXREDIRS => 10, ... ... @@ -8148,7 +8148,7 @@ 8148 8148 8149 8149 \\ 8150 8150 8151 -(% style="color: rgb(107,107,107);" %)Response 200 OK 8142 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8152 8152 8153 8153 {{code language="yml" theme="RDark" title="Create question Response" collapse="true"}} 8154 8154 { ... ... @@ -8188,7 +8188,7 @@ 8188 8188 8189 8189 ---- 8190 8190 8191 -{{code language="yml" theme="RDark" title="Body"}} 8182 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 8192 8192 {"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"}]} 8193 8193 {{/code}} 8194 8194 ... ... @@ -8198,13 +8198,13 @@ 8198 8198 8199 8199 (% style="color: rgb(107,107,107);" %)Request 8200 8200 8201 -{{code language="php" theme="RDark" title="Update Question Request"}} 8192 +{{code language="php" theme="RDark" title="Update Question Request" collapse="true"}} 8202 8202 <?php 8203 8203 8204 8204 $curl = curl_init(); 8205 8205 8206 8206 curl_setopt_array($curl, array( 8207 - CURLOPT_URL => ' https://api.onecount.net/v2/questions/{{QUESTION ID}}',8198 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/questions/503', 8208 8208 CURLOPT_RETURNTRANSFER => true, 8209 8209 CURLOPT_ENCODING => '', 8210 8210 CURLOPT_MAXREDIRS => 10, ... ... @@ -8228,7 +8228,7 @@ 8228 8228 8229 8229 \\ 8230 8230 8231 -(% style="color: rgb(107,107,107);" %)Response 200 OK 8222 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8232 8232 8233 8233 {{code language="yml" theme="RDark" title="Update Question Response" collapse="true"}} 8234 8234 { ... ... @@ -8251,7 +8251,7 @@ 8251 8251 \\ 8252 8252 8253 8253 (% class="western" %) 8254 - ===**COMPONENT: Products**===8245 +**COMPONENT: Products** 8255 8255 8256 8256 (% class="western" %) 8257 8257 This resource is for manipulating products resource. A product can be created, updated or searched. ... ... @@ -8383,13 +8383,13 @@ 8383 8383 8384 8384 (% style="color: rgb(107,107,107);" %)Request 8385 8385 8386 -{{code language="php" theme="RDark" title="Get All Products Request"}} 8377 +{{code language="php" theme="RDark" title="Get All Products Request" collapse="true"}} 8387 8387 <?php 8388 8388 8389 8389 $curl = curl_init(); 8390 8390 8391 8391 curl_setopt_array($curl, array( 8392 - CURLOPT_URL => ' https://api.onecount.net/v2/products',8383 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/products', 8393 8393 CURLOPT_RETURNTRANSFER => true, 8394 8394 CURLOPT_ENCODING => '', 8395 8395 CURLOPT_MAXREDIRS => 10, ... ... @@ -8412,7 +8412,7 @@ 8412 8412 8413 8413 \\ 8414 8414 8415 -(% style="color: rgb(107,107,107);" %)Response 200 OK 8406 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8416 8416 8417 8417 {{code language="yml" theme="RDark" title="Get All Products Response" collapse="true"}} 8418 8418 { ... ... @@ -8671,13 +8671,13 @@ 8671 8671 8672 8672 (% style="color: rgb(107,107,107);" %)Request 8673 8673 8674 -{{code language="php" theme="RDark" title="Get specific Product Request"}} 8665 +{{code language="php" theme="RDark" title="Get specific Product Request" collapse="true"}} 8675 8675 <?php 8676 8676 8677 8677 $curl = curl_init(); 8678 8678 8679 8679 curl_setopt_array($curl, array( 8680 - CURLOPT_URL => ' https://api.onecount.net/v2/users/products/{{product id}}',8671 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/products/{{Product id}}', 8681 8681 CURLOPT_RETURNTRANSFER => true, 8682 8682 CURLOPT_ENCODING => '', 8683 8683 CURLOPT_MAXREDIRS => 10, ... ... @@ -8698,7 +8698,7 @@ 8698 8698 8699 8699 \\ 8700 8700 8701 -(% style="color: rgb(107,107,107);" %)Response 200 OK 8692 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8702 8702 8703 8703 {{code language="yml" theme="RDark" title="Get specific Product Response" collapse="true"}} 8704 8704 { ... ... @@ -8761,13 +8761,13 @@ 8761 8761 8762 8762 (% style="color: rgb(107,107,107);" %)Request 8763 8763 8764 -{{code language="php" theme="RDark" title="Lookup Product Request"}} 8755 +{{code language="php" theme="RDark" title="Lookup Product Request" collapse="true"}} 8765 8765 <?php 8766 8766 8767 8767 $curl = curl_init(); 8768 8768 8769 8769 curl_setopt_array($curl, array( 8770 - CURLOPT_URL => ' https://api.onecount.net/v2/products/lookup?Title={{ProductName}}',8761 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/products/lookup?Title={{Package Name}}', 8771 8771 CURLOPT_RETURNTRANSFER => true, 8772 8772 CURLOPT_ENCODING => '', 8773 8773 CURLOPT_MAXREDIRS => 10, ... ... @@ -8788,7 +8788,7 @@ 8788 8788 8789 8789 \\ 8790 8790 8791 -(% style="color: rgb(107,107,107);" %)Response 200 OK 8782 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8792 8792 8793 8793 {{code language="yml" theme="RDark" title="Lookup Product Response" collapse="true"}} 8794 8794 { ... ... @@ -8820,239 +8820,106 @@ 8820 8820 8821 8821 \\ 8822 8822 8823 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8824 -== (% 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 +\\ 8825 8825 8826 - ----8816 +\\ 8827 8827 8828 -{{panel bgColor="#D3D3D3" width="100%"}} 8829 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products 8830 -{{/panel}} 8818 +\\ 8831 8831 8832 - === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===8820 +\\ 8833 8833 8834 - ----8822 +\\ 8835 8835 8836 - (% 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 +\\ 8837 8837 8838 - === (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===8826 +\\ 8839 8839 8840 - ----8828 +\\ 8841 8841 8842 -{{code language="yml" theme="RDark" title="Body"}} 8843 -{"Title":"Test API package creation 2","Description": "Test API package creation 2","Terms":{"Name":"Test term for API 2"},"PrimaryFormId":0} 8844 -{{/code}} 8830 +\\ 8845 8845 8846 - ==== Example ====8832 +\\ 8847 8847 8848 - ----8834 +\\ 8849 8849 8850 - (% style="color: rgb(107,107,107);" %)Request8836 +\\ 8851 8851 8852 -{{code language="php" theme="RDark" title="Create Product Request"}} 8853 - <?php 8838 +\\ 8854 8854 8855 - $curl = curl_init();8840 +\\ 8856 8856 8857 -curl_setopt_array($curl, array( 8858 - CURLOPT_URL => 'https://api.onecount.net/v2/products', 8859 - CURLOPT_RETURNTRANSFER => true, 8860 - CURLOPT_ENCODING => '', 8861 - CURLOPT_MAXREDIRS => 10, 8862 - CURLOPT_TIMEOUT => 0, 8863 - CURLOPT_FOLLOWLOCATION => true, 8864 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 8865 - CURLOPT_CUSTOMREQUEST => 'POST', 8866 - CURLOPT_POSTFIELDS =>'{"Title":"Test API package creation 1","Description": "Test API package creation 1","Terms":{"Name":"Test term for API 1"},"PrimaryFormId":0}', 8867 - CURLOPT_HTTPHEADER => array( 8868 - 'Appkey: {{ONECOUNT API KEY}}' 8869 - ), 8870 -)); 8842 +\\ 8871 8871 8872 - $response = curl_exec($curl);8844 +\\ 8873 8873 8874 -curl_close($curl); 8875 -echo $response; 8876 -{{/code}} 8846 +\\ 8877 8877 8878 8878 \\ 8879 8879 8880 - (% style="color: rgb(107,107,107);" %)Response 200 OK8850 +\\ 8881 8881 8882 -{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}} 8883 - { 8884 - "result": { 8885 - "success": "1", 8886 - "error": { 8887 - "code": "", 8888 - "message": "" 8889 - } 8890 - }, 8891 - "Products": [ 8892 - { 8893 - "ProductId": 599 8894 - } 8895 - ] 8896 -} 8897 -{{/code}} 8852 +\\ 8898 8898 8899 8899 \\ 8900 8900 8901 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8902 -== (% 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 +\\ 8903 8903 8904 - ----8858 +\\ 8905 8905 8906 -{{panel bgColor="#D3D3D3" width="100%"}} 8907 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/~{~{Product id}} 8908 -{{/panel}} 8860 +\\ 8909 8909 8910 - === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===8862 +\\ 8911 8911 8912 - ----8864 +\\ 8913 8913 8914 - (% 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 +\\ 8915 8915 8916 - === (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===8868 +\\ 8917 8917 8918 - ----8870 +\\ 8919 8919 8920 -{{code language="yml" theme="RDark" title="Body"}} 8921 -{"Title":"Test API package 23","Description": "Test API package 23","PrimaryFormId":0} 8922 -{{/code}} 8872 +\\ 8923 8923 8924 - ==== Example ====8874 +\\ 8925 8925 8926 - ----8876 +\\ 8927 8927 8928 - (% style="color: rgb(107,107,107);" %)Request8878 +\\ 8929 8929 8930 -{{code language="php" theme="RDark" title="Update Product Request"}} 8931 -<?php 8880 +\\ 8932 8932 8933 - $curl = curl_init();8882 +\\ 8934 8934 8935 -curl_setopt_array($curl, array( 8936 - CURLOPT_URL => 'https://api.onecount.net/v2/products/{{Product id}}', 8937 - CURLOPT_RETURNTRANSFER => true, 8938 - CURLOPT_ENCODING => '', 8939 - CURLOPT_MAXREDIRS => 10, 8940 - CURLOPT_TIMEOUT => 0, 8941 - CURLOPT_FOLLOWLOCATION => true, 8942 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 8943 - CURLOPT_CUSTOMREQUEST => 'PUT', 8944 - CURLOPT_POSTFIELDS =>'{"Title":"Test API package 1","Description": "Test API package 1","PrimaryFormId":0}', 8945 - CURLOPT_HTTPHEADER => array( 8946 - 'Appkey: {{ONECOUNT API KEY}}' 8947 - ), 8948 -)); 8884 +\\ 8949 8949 8950 - $response = curl_exec($curl);8886 +\\ 8951 8951 8952 -curl_close($curl); 8953 -echo $response; 8954 - 8955 -{{/code}} 8888 +\\ 8956 8956 8957 8957 \\ 8958 8958 8959 - (% style="color: rgb(107,107,107);" %)Response 200 OK8892 +\\ 8960 8960 8961 -{{code language="yml" theme="RDark" title="Update Product Response" collapse="true"}} 8962 - { 8963 - "result": { 8964 - "success": "1", 8965 - "error": { 8966 - "code": "", 8967 - "message": "" 8968 - } 8969 - }, 8970 - "Products": [ 8971 - { 8972 - "ProductId": 599, 8973 - "Title": "Test API package 1", 8974 - "Description": "Test API package 1" 8975 - } 8976 - ] 8977 -} 8978 -{{/code}} 8894 +\\ 8979 8979 8980 8980 \\ 8981 8981 8982 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8983 -== (% 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 +\\ 8984 8984 8985 - ----8900 +\\ 8986 8986 8987 -{{panel bgColor="#D3D3D3" width="100%"}} 8988 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/attachResource 8989 -{{/panel}} 8902 +\\ 8990 8990 8991 - === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===8904 +\\ 8992 8992 8993 - ----8906 +\\ 8994 8994 8995 - (% 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 +\\ 8996 8996 8997 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 8998 - 8999 ----- 9000 - 9001 -{{code language="yml" theme="RDark" title="Body"}} 9002 -{"ProductID":"599","ResourceID":"903"} 9003 -{{/code}} 9004 - 9005 -==== Example ==== 9006 - 9007 ----- 9008 - 9009 -(% style="color: rgb(107,107,107);" %)Request 9010 - 9011 -{{code language="php" theme="RDark" title="Attach Resource to Product Request"}} 9012 - <?php 9013 - 9014 -$curl = curl_init(); 9015 - 9016 -curl_setopt_array($curl, array( 9017 - CURLOPT_URL => 'https://api.onecount.net/v2/products/attachResource', 9018 - CURLOPT_RETURNTRANSFER => true, 9019 - CURLOPT_ENCODING => '', 9020 - CURLOPT_MAXREDIRS => 10, 9021 - CURLOPT_TIMEOUT => 0, 9022 - CURLOPT_FOLLOWLOCATION => true, 9023 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9024 - CURLOPT_CUSTOMREQUEST => 'POST', 9025 - CURLOPT_POSTFIELDS =>'{"ProductID":"599","ResourceID":"903"}', 9026 - CURLOPT_HTTPHEADER => array( 9027 - 'Appkey: {{ONECOUNT API KEY}}' 9028 - ), 9029 -)); 9030 - 9031 -$response = curl_exec($curl); 9032 - 9033 -curl_close($curl); 9034 -echo $response; 9035 -{{/code}} 9036 - 9037 9037 \\ 9038 9038 9039 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9040 - 9041 -{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}} 9042 - { 9043 - "result": { 9044 - "success": "1", 9045 - "error": { 9046 - "code": "", 9047 - "message": "" 9048 - } 9049 - }, 9050 - "Products": "599" 9051 -} 9052 -{{/code}} 9053 - 9054 9054 (% class="western" %) 9055 - ===**COMPONENT: Terms**===8913 +**COMPONENT: Terms** 9056 9056 9057 9057 (% class="western" %) 9058 9058 This resource is for manipulating terms resource. A term can be created, updated or searched. ... ... @@ -9149,13 +9149,13 @@ 9149 9149 9150 9150 (% style="color: rgb(107,107,107);" %)Request 9151 9151 9152 -{{code language="php" theme="RDark" title="Get All Terms Request"}} 9010 +{{code language="php" theme="RDark" title="Get All Terms Request" collapse="true"}} 9153 9153 <?php 9154 9154 9155 9155 $curl = curl_init(); 9156 9156 9157 9157 curl_setopt_array($curl, array( 9158 - CURLOPT_URL => ' https://api.onecount.net/v2/terms',9016 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/terms', 9159 9159 CURLOPT_RETURNTRANSFER => true, 9160 9160 CURLOPT_ENCODING => '', 9161 9161 CURLOPT_MAXREDIRS => 10, ... ... @@ -9176,7 +9176,7 @@ 9176 9176 9177 9177 \\ 9178 9178 9179 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9037 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9180 9180 9181 9181 {{code language="yml" theme="RDark" title="Get All Terms Response" collapse="true"}} 9182 9182 { ... ... @@ -9332,13 +9332,13 @@ 9332 9332 9333 9333 (% style="color: rgb(107,107,107);" %)Request 9334 9334 9335 -{{code language="php" theme="RDark" title="Get specific Term Request"}} 9193 +{{code language="php" theme="RDark" title="Get specific Term Request" collapse="true"}} 9336 9336 <?php 9337 9337 9338 9338 $curl = curl_init(); 9339 9339 9340 9340 curl_setopt_array($curl, array( 9341 - CURLOPT_URL => ' https://api.onecount.net/v2/terms/{{Term Id}}',9199 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/terms/{{Term Id}}', 9342 9342 CURLOPT_RETURNTRANSFER => true, 9343 9343 CURLOPT_ENCODING => '', 9344 9344 CURLOPT_MAXREDIRS => 10, ... ... @@ -9359,7 +9359,7 @@ 9359 9359 9360 9360 \\ 9361 9361 9362 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9220 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9363 9363 9364 9364 {{code language="yml" theme="RDark" title="Get specific Term Response" collapse="true"}} 9365 9365 { ... ... @@ -9413,13 +9413,13 @@ 9413 9413 9414 9414 (% style="color: rgb(107,107,107);" %)Request 9415 9415 9416 -{{code language="php" theme="RDark" title="Lookup Term Request"}} 9274 +{{code language="php" theme="RDark" title="Lookup Term Request" collapse="true"}} 9417 9417 <?php 9418 9418 9419 9419 $curl = curl_init(); 9420 9420 9421 9421 curl_setopt_array($curl, array( 9422 - 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}} ', 9423 9423 CURLOPT_RETURNTRANSFER => true, 9424 9424 CURLOPT_ENCODING => '', 9425 9425 CURLOPT_MAXREDIRS => 10, ... ... @@ -9440,201 +9440,22 @@ 9440 9440 9441 9441 \\ 9442 9442 9443 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9301 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9444 9444 9445 -{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"}} 9446 -{ 9447 - "result": { 9448 - "success": "1", 9449 - "error": { 9450 - "code": "", 9451 - "message": "" 9452 - } 9453 - }, 9454 - "Terms": [ 9455 - { 9456 - "Id": 431, 9457 - "Name": "Test term for API 1", 9458 - "Description": null, 9459 - "Duration": 0, 9460 - "DurationUnit": "", 9461 - "Price": "0.00", 9462 - "ProductId": 599 9463 - } 9464 - ] 9465 -} 9466 -{{/code}} 9303 +{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"/}} 9467 9467 9468 9468 \\ 9469 9469 9470 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9471 -== (% 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(%%) == 9472 - 9473 ----- 9474 - 9475 -{{panel bgColor="#D3D3D3" width="100%"}} 9476 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms 9477 -{{/panel}} 9478 - 9479 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9480 - 9481 ----- 9482 - 9483 -(% 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}} 9484 - 9485 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9486 - 9487 ----- 9488 - 9489 -{{code language="yml" theme="RDark" title="Body"}} 9490 -{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9491 -{{/code}} 9492 - 9493 -==== Example ==== 9494 - 9495 ----- 9496 - 9497 -(% style="color: rgb(107,107,107);" %)Request 9498 - 9499 -{{code language="php" theme="RDark" title="Create Term Request"}} 9500 -<?php 9501 - 9502 -$curl = curl_init(); 9503 - 9504 -curl_setopt_array($curl, array( 9505 - CURLOPT_URL => 'https://api.onecount.net/v2/terms', 9506 - CURLOPT_RETURNTRANSFER => true, 9507 - CURLOPT_ENCODING => '', 9508 - CURLOPT_MAXREDIRS => 10, 9509 - CURLOPT_TIMEOUT => 0, 9510 - CURLOPT_FOLLOWLOCATION => true, 9511 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9512 - CURLOPT_CUSTOMREQUEST => 'POST', 9513 - CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9514 - 9515 -', 9516 - CURLOPT_HTTPHEADER => array( 9517 - 'Appkey: {{ONECOUNT API KEY}}' 9518 - ), 9519 -)); 9520 - 9521 -$response = curl_exec($curl); 9522 - 9523 -curl_close($curl); 9524 -echo $response; 9525 - 9526 - 9527 -{{/code}} 9528 - 9529 9529 \\ 9530 9530 9531 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9532 - 9533 -{{code language="yml" theme="RDark" title="Create Term Response" collapse="true"}} 9534 -{ 9535 - "result": { 9536 - "success": "1", 9537 - "error": { 9538 - "code": "", 9539 - "message": "" 9540 - } 9541 - }, 9542 - "Terms": [ 9543 - { 9544 - "Id": 447 9545 - } 9546 - ] 9547 -} 9548 -{{/code}} 9549 - 9550 9550 \\ 9551 9551 9552 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9553 -== (% 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(%%) == 9554 - 9555 ----- 9556 - 9557 -{{panel bgColor="#D3D3D3" width="100%"}} 9558 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms/~{~{Term Id}} 9559 -{{/panel}} 9560 - 9561 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9562 - 9563 ----- 9564 - 9565 -(% 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}} 9566 - 9567 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9568 - 9569 ----- 9570 - 9571 -{{code language="yml" theme="RDark" title="Body"}} 9572 -{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599} 9573 -{{/code}} 9574 - 9575 -==== Example ==== 9576 - 9577 ----- 9578 - 9579 -(% style="color: rgb(107,107,107);" %)Request 9580 - 9581 -{{code language="php" theme="RDark" title="Update Term Request"}} 9582 - <?php 9583 - 9584 -$curl = curl_init(); 9585 - 9586 -curl_setopt_array($curl, array( 9587 - CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}', 9588 - CURLOPT_RETURNTRANSFER => true, 9589 - CURLOPT_ENCODING => '', 9590 - CURLOPT_MAXREDIRS => 10, 9591 - CURLOPT_TIMEOUT => 0, 9592 - CURLOPT_FOLLOWLOCATION => true, 9593 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9594 - CURLOPT_CUSTOMREQUEST => 'PUT', 9595 - CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}', 9596 - CURLOPT_HTTPHEADER => array( 9597 - 'Appkey: {{ONECOUNT API KEY}}' 9598 - ), 9599 -)); 9600 - 9601 -$response = curl_exec($curl); 9602 - 9603 -curl_close($curl); 9604 -echo $response; 9605 -{{/code}} 9606 - 9607 9607 \\ 9608 9608 9609 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9610 - 9611 -{{code language="yml" theme="RDark" title="Update Term Response" collapse="true"}} 9612 - { 9613 - "result": { 9614 - "success": "1", 9615 - "error": { 9616 - "code": "", 9617 - "message": "" 9618 - } 9619 - }, 9620 - "Terms": [ 9621 - { 9622 - "Id": 447, 9623 - "Name": "Test API term creation update", 9624 - "Description": "Test API term creation update", 9625 - "Duration": 10, 9626 - "DurationUnit": "", 9627 - "Price": "0.00", 9628 - "ProductId": 599 9629 - } 9630 - ] 9631 -} 9632 -{{/code}} 9633 - 9634 9634 \\ 9635 9635 9636 9636 (% class="western" %) 9637 - ===**COMPONENT: Resources**===9316 +**COMPONENT: Resources** 9638 9638 9639 9639 (% class="western" %) 9640 9640 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. ... ... @@ -9766,13 +9766,13 @@ 9766 9766 9767 9767 (% style="color: rgb(107,107,107);" %)Request 9768 9768 9769 -{{code language="php" theme="RDark" title="Get All Resource Request"}} 9448 +{{code language="php" theme="RDark" title="Get All Resource Request" collapse="true"}} 9770 9770 <?php 9771 9771 9772 9772 $curl = curl_init(); 9773 9773 9774 9774 curl_setopt_array($curl, array( 9775 - CURLOPT_URL => ' https://api.onecount.net/v2/resources',9454 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/resources?limit=10', 9776 9776 CURLOPT_RETURNTRANSFER => true, 9777 9777 CURLOPT_ENCODING => '', 9778 9778 CURLOPT_MAXREDIRS => 10, ... ... @@ -9793,7 +9793,7 @@ 9793 9793 9794 9794 \\ 9795 9795 9796 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9475 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9797 9797 9798 9798 {{code language="yml" theme="RDark" title="Get All Resource Response" collapse="true"}} 9799 9799 { ... ... @@ -9912,13 +9912,13 @@ 9912 9912 9913 9913 (% style="color: rgb(107,107,107);" %)Request 9914 9914 9915 -{{code language="php" theme="RDark" title="Get specific Resource Request"}} 9594 +{{code language="php" theme="RDark" title="Get specific Resource Request" collapse="true"}} 9916 9916 <?php 9917 9917 9918 9918 $curl = curl_init(); 9919 9919 9920 9920 curl_setopt_array($curl, array( 9921 - CURLOPT_URL => ' https://api.onecount.net/v2/resources/{{Resource ID}}',9600 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/resources/{{Resource ID}}', 9922 9922 CURLOPT_RETURNTRANSFER => true, 9923 9923 CURLOPT_ENCODING => '', 9924 9924 CURLOPT_MAXREDIRS => 10, ... ... @@ -9939,7 +9939,7 @@ 9939 9939 9940 9940 \\ 9941 9941 9942 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9621 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9943 9943 9944 9944 {{code language="yml" theme="RDark" title="Get specific Resource Response" collapse="true"}} 9945 9945 { ... ... @@ -9971,7 +9971,7 @@ 9971 9971 ---- 9972 9972 9973 9973 {{panel bgColor="#D3D3D3" width="100%"}} 9974 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/ resources/lookup?Name={(%%){ResourceName}}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 9975 9975 {{/panel}} 9976 9976 9977 9977 === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === ... ... @@ -9984,7 +9984,8 @@ 9984 9984 9985 9985 ---- 9986 9986 9987 -(% 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 9988 9988 9989 9989 ==== Example ==== 9990 9990 ... ... @@ -9992,237 +9992,30 @@ 9992 9992 9993 9993 (% style="color: rgb(107,107,107);" %)Request 9994 9994 9995 -{{code language="php" theme="RDark" title="Lookup Resource Request"}} 9996 - <?php 9675 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}} 9997 9997 9998 - $curl = curl_init();9677 +\\ 9999 9999 10000 -curl_setopt_array($curl, array( 10001 - CURLOPT_URL => 'https://api.onecount.net/v2/resources/lookup?Name={{Resource Name}}', 10002 - CURLOPT_RETURNTRANSFER => true, 10003 - CURLOPT_ENCODING => '', 10004 - CURLOPT_MAXREDIRS => 10, 10005 - CURLOPT_TIMEOUT => 0, 10006 - CURLOPT_FOLLOWLOCATION => true, 10007 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10008 - CURLOPT_CUSTOMREQUEST => 'GET', 10009 - CURLOPT_HTTPHEADER => array( 10010 - 'Appkey: {{ONECOUNT API KEY}}' 10011 - ), 10012 -)); 9679 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10013 10013 10014 - $response=curl_exec($curl);9681 +{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}} 10015 10015 10016 -curl_close($curl); 10017 -echo $response; 10018 -{{/code}} 10019 - 10020 10020 \\ 10021 10021 10022 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10023 - 10024 -{{code language="yml" theme="RDark" title="Lookup Resource Response" collapse="true"}} 10025 - { 10026 - "result": { 10027 - "success": "1", 10028 - "error": { 10029 - "code": "", 10030 - "message": "" 10031 - } 10032 - }, 10033 - "Resources": [ 10034 - { 10035 - "Id": 479, 10036 - "Name": "Virtualization Review", 10037 - "Description": "", 10038 - "Type": "0", 10039 - "Value": "", 10040 - "FreePass": 0 10041 - } 10042 - ] 10043 -} 10044 -{{/code}} 10045 - 10046 10046 \\ 10047 10047 10048 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10049 -== (% 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(%%) == 10050 - 10051 ----- 10052 - 10053 -{{panel bgColor="#D3D3D3" width="100%"}} 10054 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources 10055 -{{/panel}} 10056 - 10057 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10058 - 10059 ----- 10060 - 10061 -(% 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}} 10062 - 10063 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10064 - 10065 ----- 10066 - 10067 -{{code language="yml" theme="RDark" title="Body"}} 10068 -{"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} 10069 -{{/code}} 10070 - 10071 -==== Example ==== 10072 - 10073 ----- 10074 - 10075 -(% style="color: rgb(107,107,107);" %)Request 10076 - 10077 -{{code language="php" theme="RDark" title="Create Resource Request"}} 10078 - <?php 10079 - 10080 -$curl = curl_init(); 10081 - 10082 -curl_setopt_array($curl, array( 10083 - CURLOPT_URL => 'https://api.onecount.net/v2/resources', 10084 - CURLOPT_RETURNTRANSFER => true, 10085 - CURLOPT_ENCODING => '', 10086 - CURLOPT_MAXREDIRS => 10, 10087 - CURLOPT_TIMEOUT => 0, 10088 - CURLOPT_FOLLOWLOCATION => true, 10089 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10090 - CURLOPT_CUSTOMREQUEST => 'POST', 10091 - 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}', 10092 - CURLOPT_HTTPHEADER => array( 10093 - 'Appkey: {{ONECOUNT API KEY}}' 10094 - ), 10095 -)); 10096 - 10097 -$response = curl_exec($curl); 10098 - 10099 -curl_close($curl); 10100 -echo $response; 10101 -{{/code}} 10102 - 10103 10103 \\ 10104 10104 10105 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10106 - 10107 -{{code language="yml" theme="RDark" title="Create Resource Response" collapse="true"}} 10108 - { 10109 - "result": { 10110 - "success": "1", 10111 - "error": { 10112 - "code": "", 10113 - "message": "" 10114 - } 10115 - }, 10116 - "Resources": [ 10117 - { 10118 - "Id": 871, 10119 - "Name": "Test API product creation 21", 10120 - "Description": "Test API product creation 21", 10121 - "Type": "3", 10122 - "Value": "http://one-count.com", 10123 - "FreePass": 1 10124 - } 10125 - ] 10126 -} 10127 -{{/code}} 10128 - 10129 10129 \\ 10130 10130 10131 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10132 -== (% 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(%%) == 10133 - 10134 ----- 10135 - 10136 -{{panel bgColor="#D3D3D3" width="100%"}} 10137 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources/~{~{resource id}} 10138 -{{/panel}} 10139 - 10140 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10141 - 10142 ----- 10143 - 10144 -(% 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}} 10145 - 10146 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10147 - 10148 ----- 10149 - 10150 -{{code language="yml" theme="RDark" title="Body"}} 10151 -{"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} 10152 -{{/code}} 10153 - 10154 -==== Example ==== 10155 - 10156 ----- 10157 - 10158 -(% style="color: rgb(107,107,107);" %)Request 10159 - 10160 -{{code language="php" theme="RDark" title="Update Resource Request"}} 10161 - <?php 10162 - 10163 -$curl = curl_init(); 10164 - 10165 -curl_setopt_array($curl, array( 10166 - CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{resource id}}', 10167 - CURLOPT_RETURNTRANSFER => true, 10168 - CURLOPT_ENCODING => '', 10169 - CURLOPT_MAXREDIRS => 10, 10170 - CURLOPT_TIMEOUT => 0, 10171 - CURLOPT_FOLLOWLOCATION => true, 10172 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10173 - CURLOPT_CUSTOMREQUEST => 'PUT', 10174 - 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}', 10175 - CURLOPT_HTTPHEADER => array( 10176 - 'Appkey: {{ONECOUNT API KEY}}' 10177 - ), 10178 -)); 10179 - 10180 -$response = curl_exec($curl); 10181 - 10182 -curl_close($curl); 10183 -echo $response; 10184 -{{/code}} 10185 - 10186 10186 \\ 10187 10187 10188 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10189 - 10190 -{{code language="yml" theme="RDark" title="Update Resource Response" collapse="true"}} 10191 - { 10192 - "result": { 10193 - "success": "1", 10194 - "error": { 10195 - "code": "", 10196 - "message": "" 10197 - } 10198 - }, 10199 - "Resources": [ 10200 - { 10201 - "Id": 903, 10202 - "Name": "Test API product creation 23", 10203 - "Description": "Test API product creation 23", 10204 - "Type": "3", 10205 - "Value": "http://one-count.com", 10206 - "FreePass": 1 10207 - }, 10208 - { 10209 - "Id": 903, 10210 - "Name": "Test API product creation 23", 10211 - "Description": "Test API product creation 23", 10212 - "Type": "3", 10213 - "Value": "onecount.net", 10214 - "FreePass": 1 10215 - } 10216 - ] 10217 -} 10218 -{{/code}} 10219 - 10220 10220 (% class="western" %) 10221 10221 \\ 10222 10222 10223 10223 (% class="western" %) 10224 - ===**COMPONENT: Source Codes10225 -** ===9697 +**COMPONENT: Source Codes 9698 +** 10226 10226 10227 10227 (% class="western" %) 10228 10228 This resource is for manipulating source code for a resource. A source code can be created, updated or searched. ... ... @@ -10319,13 +10319,13 @@ 10319 10319 10320 10320 (% style="color: rgb(107,107,107);" %)Request 10321 10321 10322 -{{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"}} 10323 10323 <?php 10324 10324 10325 10325 $curl = curl_init(); 10326 10326 10327 10327 curl_setopt_array($curl, array( 10328 - CURLOPT_URL => ' https://api.onecount.net/v2/sources',9801 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/sources', 10329 10329 CURLOPT_RETURNTRANSFER => true, 10330 10330 CURLOPT_ENCODING => '', 10331 10331 CURLOPT_MAXREDIRS => 10, ... ... @@ -10346,7 +10346,7 @@ 10346 10346 10347 10347 \\ 10348 10348 10349 -(% style="color: rgb(107,107,107);" %)Response 200 OK 9822 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10350 10350 10351 10351 {{code language="yml" theme="RDark" title="Get All Source code Response" collapse="true"}} 10352 10352 { ... ... @@ -10535,13 +10535,13 @@ 10535 10535 10536 10536 (% style="color: rgb(107,107,107);" %)Request 10537 10537 10538 -{{code language="php" theme="RDark" title="Get specific Source Request"}} 10011 +{{code language="php" theme="RDark" title="Get specific Source Request" collapse="true"}} 10539 10539 <?php 10540 10540 10541 10541 $curl = curl_init(); 10542 10542 10543 10543 curl_setopt_array($curl, array( 10544 - CURLOPT_URL => ' https://api.onecount.net/v2/sources/{{source code id}}',10017 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/sources/{{source code id}}', 10545 10545 CURLOPT_RETURNTRANSFER => true, 10546 10546 CURLOPT_ENCODING => '', 10547 10547 CURLOPT_MAXREDIRS => 10, ... ... @@ -10562,7 +10562,7 @@ 10562 10562 10563 10563 \\ 10564 10564 10565 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10038 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10566 10566 10567 10567 {{code language="yml" theme="RDark" title="Get specific Source Response" collapse="true"}} 10568 10568 { ... ... @@ -10592,7 +10592,7 @@ 10592 10592 ---- 10593 10593 10594 10594 {{panel bgColor="#D3D3D3" width="100%"}} 10595 -(% 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 10596 10596 {{/panel}} 10597 10597 10598 10598 === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === ... ... @@ -10605,7 +10605,8 @@ 10605 10605 10606 10606 ---- 10607 10607 10608 -(% 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 10609 10609 10610 10610 ==== Example ==== 10611 10611 ... ... @@ -10613,222 +10613,27 @@ 10613 10613 10614 10614 (% style="color: rgb(107,107,107);" %)Request 10615 10615 10616 -{{code language="php" theme="RDark" title="Lookup Source code Request"}} 10617 - <?php 10090 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}} 10618 10618 10619 -$curl = curl_init(); 10620 - 10621 -curl_setopt_array($curl, array( 10622 - CURLOPT_URL => 'https://api.onecount.net/v2/sources/lookup?Source={{Source code Name}}', 10623 - CURLOPT_RETURNTRANSFER => true, 10624 - CURLOPT_ENCODING => '', 10625 - CURLOPT_MAXREDIRS => 10, 10626 - CURLOPT_TIMEOUT => 0, 10627 - CURLOPT_FOLLOWLOCATION => true, 10628 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10629 - CURLOPT_CUSTOMREQUEST => 'GET', 10630 - CURLOPT_HTTPHEADER => array( 10631 - 'Appkey: {{ONECOUNT API KEY}}' 10632 - ), 10633 -)); 10634 - 10635 -$response = curl_exec($curl); 10636 - 10637 -curl_close($curl); 10638 -echo $response; 10639 -{{/code}} 10640 - 10641 10641 \\ 10642 10642 10643 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10094 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10644 10644 10645 -{{code language="yml" theme="RDark" title="Lookup Source code Response" collapse="true"}} 10646 - { 10647 - "result": { 10648 - "success": "1", 10649 - "error": { 10650 - "code": "", 10651 - "message": "" 10652 - } 10653 - }, 10654 - "Sources": [ 10655 - { 10656 - "Id": 26, 10657 - "Source": "GCN-Member", 10658 - "Description": "Uploaded from Reston VA", 10659 - "Parent": 0 10660 - } 10661 - ] 10662 -} 10663 -{{/code}} 10096 +{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}} 10664 10664 10665 10665 \\ 10666 10666 10667 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10668 -== (% 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(%%) == 10669 - 10670 ----- 10671 - 10672 -{{panel bgColor="#D3D3D3" width="100%"}} 10673 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources 10674 -{{/panel}} 10675 - 10676 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10677 - 10678 ----- 10679 - 10680 -(% 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}} 10681 - 10682 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10683 - 10684 ----- 10685 - 10686 -{{code language="yml" theme="RDark" title="Body"}} 10687 -{"Source":"Test source code from API"} 10688 -{{/code}} 10689 - 10690 -==== Example ==== 10691 - 10692 ----- 10693 - 10694 -(% style="color: rgb(107,107,107);" %)Request 10695 - 10696 -{{code language="php" theme="RDark" title="Create Source code Request"}} 10697 - <?php 10698 - 10699 -$curl = curl_init(); 10700 - 10701 -curl_setopt_array($curl, array( 10702 - CURLOPT_URL => 'https://api.onecount.net/v2/sources', 10703 - CURLOPT_RETURNTRANSFER => true, 10704 - CURLOPT_ENCODING => '', 10705 - CURLOPT_MAXREDIRS => 10, 10706 - CURLOPT_TIMEOUT => 0, 10707 - CURLOPT_FOLLOWLOCATION => true, 10708 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10709 - CURLOPT_CUSTOMREQUEST => 'POST', 10710 - CURLOPT_POSTFIELDS =>'{"Source":"Test source code from API"}', 10711 - CURLOPT_HTTPHEADER => array( 10712 - 'Appkey: {{ONECOUNT API KEY}}' 10713 - ), 10714 -)); 10715 - 10716 -$response = curl_exec($curl); 10717 - 10718 -curl_close($curl); 10719 -echo $response; 10720 -{{/code}} 10721 - 10722 10722 \\ 10723 10723 10724 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10725 - 10726 -{{code language="yml" theme="RDark" title="Create Source code Response" collapse="true"}} 10727 - { 10728 - "result": { 10729 - "success": "1", 10730 - "error": { 10731 - "code": "", 10732 - "message": "" 10733 - } 10734 - }, 10735 - "Sources": [ 10736 - { 10737 - "Id": 223, 10738 - "Source": "Test source code from API", 10739 - "Description": "", 10740 - "Parent": 0 10741 - } 10742 - ] 10743 -} 10744 -{{/code}} 10745 - 10746 10746 \\ 10747 10747 10748 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10749 -== (% 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(%%) == 10750 - 10751 ----- 10752 - 10753 -{{panel bgColor="#D3D3D3" width="100%"}} 10754 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources/~{~{source code id}} 10755 -{{/panel}} 10756 - 10757 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10758 - 10759 ----- 10760 - 10761 -(% 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}} 10762 - 10763 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10764 - 10765 ----- 10766 - 10767 -{{code language="yml" theme="RDark" title="Body"}} 10768 -{"Source":"Test API","Parent":215} 10769 -{{/code}} 10770 - 10771 -==== Example ==== 10772 - 10773 ----- 10774 - 10775 -(% style="color: rgb(107,107,107);" %)Request 10776 - 10777 -{{code language="php" theme="RDark" title="Update Source code Request"}} 10778 - <?php 10779 - 10780 -$curl = curl_init(); 10781 - 10782 -curl_setopt_array($curl, array( 10783 - CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}', 10784 - CURLOPT_RETURNTRANSFER => true, 10785 - CURLOPT_ENCODING => '', 10786 - CURLOPT_MAXREDIRS => 10, 10787 - CURLOPT_TIMEOUT => 0, 10788 - CURLOPT_FOLLOWLOCATION => true, 10789 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10790 - CURLOPT_CUSTOMREQUEST => 'PUT', 10791 - CURLOPT_POSTFIELDS =>'{"Source":"Test API","Parent":215}', 10792 - CURLOPT_HTTPHEADER => array( 10793 - 'Appkey: {{ONECOUNT API KEY}}' 10794 - ), 10795 -)); 10796 - 10797 -$response = curl_exec($curl); 10798 - 10799 -curl_close($curl); 10800 -echo $response; 10801 -{{/code}} 10802 - 10803 10803 \\ 10804 10804 10805 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10806 - 10807 -{{code language="yml" theme="RDark" title="Update Source code Response" collapse="true"}} 10808 - { 10809 - "result": { 10810 - "success": "1", 10811 - "error": { 10812 - "code": "", 10813 - "message": "" 10814 - } 10815 - }, 10816 - "Sources": [ 10817 - { 10818 - "Id": 223, 10819 - "Source": "Test API", 10820 - "Description": "", 10821 - "Parent": 215 10822 - } 10823 - ] 10824 -} 10825 -{{/code}} 10826 - 10827 10827 (% class="western" %) 10828 10828 \\ 10829 10829 10830 10830 (% class="western" %) 10831 - ===**COMPONENT: Transactions**===10110 +**COMPONENT: Transactions** 10832 10832 10833 10833 (% class="western" %) 10834 10834 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -10912,13 +10912,13 @@ 10912 10912 10913 10913 (% style="color: rgb(107,107,107);" %)Request 10914 10914 10915 -{{code language="php" theme="RDark" title="Get All Transaction Request"}} 10194 +{{code language="php" theme="RDark" title="Get All Transaction Request" collapse="true"}} 10916 10916 <?php 10917 10917 10918 10918 $curl = curl_init(); 10919 10919 10920 10920 curl_setopt_array($curl, array( 10921 - CURLOPT_URL => ' https://api.onecount.net/v2/transactions',10200 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/transactions?limit=100', 10922 10922 CURLOPT_RETURNTRANSFER => true, 10923 10923 CURLOPT_ENCODING => '', 10924 10924 CURLOPT_MAXREDIRS => 10, ... ... @@ -10939,7 +10939,7 @@ 10939 10939 10940 10940 \\ 10941 10941 10942 -(% style="color: rgb(107,107,107);" %)Response 200 OK 10221 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10943 10943 10944 10944 {{code language="yml" theme="RDark" title="Get All Transaction Response" collapse="true"}} 10945 10945 { ... ... @@ -12478,13 +12478,13 @@ 12478 12478 12479 12479 (% style="color: rgb(107,107,107);" %)Request 12480 12480 12481 -{{code language="php" theme="RDark" title="Get specific Transaction Request"}} 11760 +{{code language="php" theme="RDark" title="Get specific Transaction Request" collapse="true"}} 12482 12482 <?php 12483 12483 12484 12484 $curl = curl_init(); 12485 12485 12486 12486 curl_setopt_array($curl, array( 12487 - CURLOPT_URL => ' https://api.onecount.net/v2/transactions/{{Transaction id}}',11766 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/transactions/{{Transaction id}}', 12488 12488 CURLOPT_RETURNTRANSFER => true, 12489 12489 CURLOPT_ENCODING => '', 12490 12490 CURLOPT_MAXREDIRS => 10, ... ... @@ -12505,7 +12505,7 @@ 12505 12505 12506 12506 \\ 12507 12507 12508 -(% style="color: rgb(107,107,107);" %)Response 200 OK 11787 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12509 12509 12510 12510 {{code language="yml" theme="RDark" title="Get specific Transaction Response" collapse="true"}} 12511 12511 { ... ... @@ -12544,7 +12544,7 @@ 12544 12544 ---- 12545 12545 12546 12546 {{panel bgColor="#D3D3D3" width="100%"}} 12547 -(% 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 12548 12548 {{/panel}} 12549 12549 12550 12550 === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === ... ... @@ -12557,7 +12557,8 @@ 12557 12557 12558 12558 ---- 12559 12559 12560 -(% 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 12561 12561 12562 12562 ==== Example ==== 12563 12563 ... ... @@ -12565,1541 +12565,65 @@ 12565 12565 12566 12566 (% style="color: rgb(107,107,107);" %)Request 12567 12567 12568 -{{code language="php" theme="RDark" title="Lookup Transaction Request"}} 12569 - <?php 11848 +{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}} 12570 12570 12571 -$curl = curl_init(); 12572 - 12573 -curl_setopt_array($curl, array( 12574 - CURLOPT_URL => 'https://api.onecount.net/v2/transactions/lookup?UserId={{OCID}}', 12575 - CURLOPT_RETURNTRANSFER => true, 12576 - CURLOPT_ENCODING => '', 12577 - CURLOPT_MAXREDIRS => 10, 12578 - CURLOPT_TIMEOUT => 0, 12579 - CURLOPT_FOLLOWLOCATION => true, 12580 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 12581 - CURLOPT_CUSTOMREQUEST => 'GET', 12582 - CURLOPT_HTTPHEADER => array( 12583 - 'Appkey: {{ONECOUNT API KEY}}' 12584 - ), 12585 -)); 12586 - 12587 -$response = curl_exec($curl); 12588 - 12589 -curl_close($curl); 12590 -echo $response; 12591 -{{/code}} 12592 - 12593 12593 \\ 12594 12594 12595 -(% style="color: rgb(107,107,107);" %)Response 200 OK 11852 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12596 12596 12597 -{{code language="yml" theme="RDark" title="Lookup Transaction Response" collapse="true"}} 12598 - { 12599 - "result": { 12600 - "success": "1", 12601 - "error": { 12602 - "code": "", 12603 - "message": "" 12604 - } 12605 - }, 12606 - "Transactions": [ 12607 - { 12608 - "Id": 52494786, 12609 - "UserId": 1234, 12610 - "TermId": 34, 12611 - "TransactionDate": "2016-01-19", 12612 - "TransactionTime": "15:30:04", 12613 - "RequestDate": "2016-01-19", 12614 - "UserIP": "12.226.247.2", 12615 - "SubscriptionType": "u", 12616 - "ProductId": 34, 12617 - "Source": 0, 12618 - "ProductStatus": 0, 12619 - "MediaFilePath": "", 12620 - "Amount": "" 12621 - }, 12622 - { 12623 - "Id": 42654041, 12624 - "UserId": 1234, 12625 - "TermId": 34, 12626 - "TransactionDate": "2015-09-09", 12627 - "TransactionTime": "11:20:39", 12628 - "RequestDate": "2015-09-09", 12629 - "UserIP": "24.187.236.98", 12630 - "SubscriptionType": "n", 12631 - "ProductId": 34, 12632 - "Source": 0, 12633 - "ProductStatus": 2, 12634 - "MediaFilePath": "", 12635 - "Amount": "" 12636 - }, 12637 - { 12638 - "Id": 97251022, 12639 - "UserId": 1234, 12640 - "TermId": 34, 12641 - "TransactionDate": "2015-06-04", 12642 - "TransactionTime": "14:59:42", 12643 - "RequestDate": "2015-06-04", 12644 - "UserIP": "12.226.247.2", 12645 - "SubscriptionType": "u", 12646 - "ProductId": 34, 12647 - "Source": 0, 12648 - "ProductStatus": 0, 12649 - "MediaFilePath": "", 12650 - "Amount": "" 12651 - }, 12652 - { 12653 - "Id": 55492559, 12654 - "UserId": 1234, 12655 - "TermId": 34, 12656 - "TransactionDate": "2015-04-03", 12657 - "TransactionTime": "16:32:04", 12658 - "RequestDate": "2015-04-03", 12659 - "UserIP": "24.187.236.98", 12660 - "SubscriptionType": "r", 12661 - "ProductId": 34, 12662 - "Source": 58, 12663 - "ProductStatus": 106, 12664 - "MediaFilePath": "", 12665 - "Amount": "" 12666 - }, 12667 - { 12668 - "Id": 98173391, 12669 - "UserId": 1234, 12670 - "TermId": 34, 12671 - "TransactionDate": "2015-04-03", 12672 - "TransactionTime": "15:50:45", 12673 - "RequestDate": "2014-08-19", 12674 - "UserIP": "24.187.236.98", 12675 - "SubscriptionType": "n", 12676 - "ProductId": 34, 12677 - "Source": 34, 12678 - "ProductStatus": 106, 12679 - "MediaFilePath": "", 12680 - "Amount": "" 12681 - }, 12682 - { 12683 - "Id": 91711793, 12684 - "UserId": 1234, 12685 - "TermId": 18, 12686 - "TransactionDate": "2015-04-27", 12687 - "TransactionTime": "14:24:51", 12688 - "RequestDate": "2015-04-27", 12689 - "UserIP": "24.187.236.98", 12690 - "SubscriptionType": "u", 12691 - "ProductId": 18, 12692 - "Source": 0, 12693 - "ProductStatus": 106, 12694 - "MediaFilePath": "", 12695 - "Amount": "" 12696 - }, 12697 - { 12698 - "Id": 74936400, 12699 - "UserId": 1234, 12700 - "TermId": 18, 12701 - "TransactionDate": "2015-04-27", 12702 - "TransactionTime": "12:35:18", 12703 - "RequestDate": "2015-04-27", 12704 - "UserIP": "68.196.187.74", 12705 - "SubscriptionType": "n", 12706 - "ProductId": 18, 12707 - "Source": 34, 12708 - "ProductStatus": 106, 12709 - "MediaFilePath": "", 12710 - "Amount": "" 12711 - }, 12712 - { 12713 - "Id": 21664714, 12714 - "UserId": 1234, 12715 - "TermId": 18, 12716 - "TransactionDate": "2015-04-03", 12717 - "TransactionTime": "15:50:46", 12718 - "RequestDate": "2015-04-03", 12719 - "UserIP": "24.187.236.98", 12720 - "SubscriptionType": "u", 12721 - "ProductId": 18, 12722 - "Source": 0, 12723 - "ProductStatus": 2, 12724 - "MediaFilePath": "", 12725 - "Amount": "" 12726 - }, 12727 - { 12728 - "Id": 81129263, 12729 - "UserId": 1234, 12730 - "TermId": 18, 12731 - "TransactionDate": "2014-08-19", 12732 - "TransactionTime": "11:18:55", 12733 - "RequestDate": "2014-08-19", 12734 - "UserIP": "74.201.38.1", 12735 - "SubscriptionType": "n", 12736 - "ProductId": 18, 12737 - "Source": 34, 12738 - "ProductStatus": 2, 12739 - "MediaFilePath": "", 12740 - "Amount": "" 12741 - }, 12742 - { 12743 - "Id": 30461748, 12744 - "UserId": 1234, 12745 - "ResourceId": 459, 12746 - "TransactionDate": "2023-03-15", 12747 - "TransactionTime": "12:07:55", 12748 - "RequestDate": "2023-03-15", 12749 - "UserIP": "74.201.38.12", 12750 - "SubscriptionType": "n", 12751 - "SourceCode": 0, 12752 - "ProductStatus": 0, 12753 - "MediaFilePath": "", 12754 - "Amount": "" 12755 - }, 12756 - { 12757 - "Id": 25858253, 12758 - "UserId": 1234, 12759 - "ResourceId": 451, 12760 - "TransactionDate": "2023-03-15", 12761 - "TransactionTime": "11:45:19", 12762 - "RequestDate": "2023-03-15", 12763 - "UserIP": "74.201.38.12", 12764 - "SubscriptionType": "n", 12765 - "SourceCode": 0, 12766 - "ProductStatus": 0, 12767 - "MediaFilePath": "", 12768 - "Amount": "" 12769 - }, 12770 - { 12771 - "Id": 69453260, 12772 - "UserId": 1234, 12773 - "ResourceId": 411, 12774 - "TransactionDate": "2022-06-07", 12775 - "TransactionTime": "17:03:14", 12776 - "RequestDate": "2022-06-07", 12777 - "UserIP": "74.201.38.12", 12778 - "SubscriptionType": "n", 12779 - "SourceCode": 0, 12780 - "ProductStatus": 0, 12781 - "MediaFilePath": "", 12782 - "Amount": "" 12783 - }, 12784 - { 12785 - "Id": 51354425, 12786 - "UserId": 1234, 12787 - "ResourceId": 355, 12788 - "TransactionDate": "2020-04-06", 12789 - "TransactionTime": "12:24:08", 12790 - "RequestDate": "2020-04-06", 12791 - "UserIP": "74.201.38.12", 12792 - "SubscriptionType": "n", 12793 - "SourceCode": 0, 12794 - "ProductStatus": 0, 12795 - "MediaFilePath": "", 12796 - "Amount": "" 12797 - } 12798 - ] 12799 -} 12800 -{{/code}} 11854 +{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}} 12801 12801 12802 12802 \\ 12803 12803 12804 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12805 -== (% 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(%%) == 12806 - 12807 ----- 12808 - 12809 -{{panel bgColor="#D3D3D3" width="100%"}} 12810 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/transactions 12811 -{{/panel}} 12812 - 12813 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 12814 - 12815 ----- 12816 - 12817 -(% 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}} 12818 - 12819 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 12820 - 12821 ----- 12822 - 12823 -{{code language="yml" theme="RDark" title="Body"}} 12824 -{"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" } 12825 -{{/code}} 12826 - 12827 -==== Example ==== 12828 - 12829 ----- 12830 - 12831 -(% style="color: rgb(107,107,107);" %)Request 12832 - 12833 -{{code language="php" theme="RDark" title="Create Transaction Request"}} 12834 - <?php 12835 - 12836 -$curl = curl_init(); 12837 - 12838 -curl_setopt_array($curl, array( 12839 - CURLOPT_URL => 'https://api.onecount.net/v2/transactions', 12840 - CURLOPT_RETURNTRANSFER => true, 12841 - CURLOPT_ENCODING => '', 12842 - CURLOPT_MAXREDIRS => 10, 12843 - CURLOPT_TIMEOUT => 0, 12844 - CURLOPT_FOLLOWLOCATION => true, 12845 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 12846 - CURLOPT_CUSTOMREQUEST => 'POST', 12847 - 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" }', 12848 - CURLOPT_HTTPHEADER => array( 12849 - 'Appkey: {{ONECOUNT API KEY}}' 12850 - ), 12851 -)); 12852 - 12853 -$response = curl_exec($curl); 12854 - 12855 -curl_close($curl); 12856 -echo $response; 12857 -{{/code}} 12858 - 12859 12859 \\ 12860 12860 12861 -(% style="color: rgb(107,107,107);" %)Response 200 OK 12862 - 12863 -{{code language="yml" theme="RDark" title="Create Transaction Response" collapse="true"}} 12864 - { 12865 - "result": { 12866 - "success": "1", 12867 - "error": { 12868 - "code": "", 12869 - "message": "" 12870 - } 12871 - }, 12872 - "Transactions": { 12873 - "Id": "1234", 12874 - "UserId": 1845775, 12875 - "TermId": 447, 12876 - "TransactionDate": "20231211", 12877 - "TransactionTime": "09:34:26", 12878 - "RequestDate": "20231211", 12879 - "UserIP": "192.168.0.1", 12880 - "SubscriptionType": "n", 12881 - "ProductId": 599, 12882 - "Source": 83, 12883 - "ProductStatus": 2, 12884 - "MediaFilePath": "", 12885 - "Amount": "0.00" 12886 - } 12887 -} 12888 -{{/code}} 12889 - 12890 12890 \\ 12891 12891 12892 -=== **COMPONENT: Engagements** === 12893 - 12894 -(% class="western" %) 12895 -Engagement can be added, updated and searched for using the engagements resource from the api. 12896 - 12897 -(% class="western" %) 12898 12898 \\ 12899 12899 12900 -(% class="wrapped" %) 12901 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12902 -((( 12903 -(% class="western" %) 12904 -**Method** 12905 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12906 -((( 12907 -(% class="western" %) 12908 -**Url** 12909 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12910 -((( 12911 -(% class="western" %) 12912 -**Action** 12913 -))) 12914 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12915 -((( 12916 -(% class="western" %) 12917 -GET 12918 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12919 -((( 12920 -(% class="western" %) 12921 -/(% style="color: rgb(33,33,33);" %)engagements 12922 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12923 -((( 12924 -(% class="western" %) 12925 -Get engagement data limiting 25. 12926 -))) 12927 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12928 -((( 12929 -(% class="western" %) 12930 -GET 12931 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12932 -((( 12933 -(% class="western" %) 12934 -/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id> 12935 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12936 -((( 12937 -(% class="western" %) 12938 -Get data for engagement id. The engagement id is a string 12939 -))) 12940 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12941 -((( 12942 -(% class="western" %) 12943 -POST 12944 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12945 -((( 12946 -(% class="western" %) 12947 -/(% style="color: rgb(33,33,33);" %)engagements 12948 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12949 -((( 12950 -(% class="western" %) 12951 -Create a new engagement 12952 - 12953 -(% class="western" %) 12954 -Parameters required to create the engagement needs to be sent as post data in JSON format. 12955 -))) 12956 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12957 -((( 12958 -(% class="western" %) 12959 -PUT 12960 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12961 -((( 12962 -(% class="western" %) 12963 -/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id> 12964 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12965 -((( 12966 -(% class="western" %) 12967 -Update engagement by engagement id. The engagement id string 12968 - 12969 -(% class="western" %) 12970 -Parameters required to update the engagement needs to be sent as post data in JSON format. 12971 -))) 12972 -|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12973 -((( 12974 -(% class="western" %) 12975 -POST 12976 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12977 -((( 12978 -(% class="western" %) 12979 -(% style="color: rgb(33,33,33);" %)/engagements/addUser 12980 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12981 -((( 12982 -(% class="western" %) 12983 -Add user to engagement 12984 - 12985 -(% class="western" %) 12986 -Parameters required to add user to the engagement needs to be sent as post data in JSON format. 12987 -))) 12988 - 12989 12989 \\ 12990 12990 12991 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12992 -== (% 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(%%) == 12993 - 12994 ----- 12995 - 12996 ----- 12997 - 12998 -{{panel bgColor="#D3D3D3" width="100%"}} 12999 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements 13000 -{{/panel}} 13001 - 13002 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13003 - 13004 ----- 13005 - 13006 -(% 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}} 13007 - 13008 -==== Example ==== 13009 - 13010 ----- 13011 - 13012 -(% style="color: rgb(107,107,107);" %)Request 13013 - 13014 -{{code language="php" theme="RDark" title="Get All Engagement Request"}} 13015 -<?php 13016 - 13017 -$curl = curl_init(); 13018 - 13019 -curl_setopt_array($curl, array( 13020 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements', 13021 - CURLOPT_RETURNTRANSFER => true, 13022 - CURLOPT_ENCODING => '', 13023 - CURLOPT_MAXREDIRS => 10, 13024 - CURLOPT_TIMEOUT => 0, 13025 - CURLOPT_FOLLOWLOCATION => true, 13026 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13027 - CURLOPT_CUSTOMREQUEST => 'GET', 13028 - CURLOPT_HTTPHEADER => array( 13029 - 'Appkey: {{ONECOUNT API KEY}}' 13030 - ), 13031 -)); 13032 - 13033 -$response = curl_exec($curl); 13034 - 13035 -curl_close($curl); 13036 -echo $response; 13037 - 13038 - 13039 -{{/code}} 13040 - 13041 13041 \\ 13042 13042 13043 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13044 - 13045 -{{code language="yml" theme="RDark" title="Get all engagements Response" collapse="true"}} 13046 - { 13047 - "result": { 13048 - "success": "1", 13049 - "error": { 13050 - "code": "", 13051 - "message": "" 13052 - } 13053 - }, 13054 - "Engagements": [ 13055 - { 13056 - "Id": "048d38e9-d6c3-432e-9671-3f31809d48b3", 13057 - "Name": "Test Engagement 1", 13058 - "Engagement Fields": [ 13059 - { 13060 - "Name": "id", 13061 - "Type": "text" 13062 - }, 13063 - { 13064 - "Name": "activity_time", 13065 - "Type": "text" 13066 - }, 13067 - { 13068 - "Name": "Name", 13069 - "Type": "text" 13070 - }, 13071 - { 13072 - "Name": "Test Field", 13073 - "Type": "select", 13074 - "Values": [ 13075 - { 13076 - "text": "Test 1", 13077 - "value": "Test1" 13078 - } 13079 - ] 13080 - } 13081 - ] 13082 - } 13083 - ] 13084 -} 13085 -{{/code}} 13086 - 13087 13087 \\ 13088 13088 13089 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13090 -== (% 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(%%) == 13091 - 13092 ----- 13093 - 13094 ----- 13095 - 13096 -{{panel bgColor="#D3D3D3" width="100%"}} 13097 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement ID}} 13098 -{{/panel}} 13099 - 13100 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13101 - 13102 ----- 13103 - 13104 -(% 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}} 13105 - 13106 -==== Example ==== 13107 - 13108 ----- 13109 - 13110 -(% style="color: rgb(107,107,107);" %)Request 13111 - 13112 -{{code language="php" theme="RDark" title="Get Specific Engagement Request"}} 13113 -<?php 13114 - 13115 -$curl = curl_init(); 13116 - 13117 -curl_setopt_array($curl, array( 13118 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement ID}}', 13119 - CURLOPT_RETURNTRANSFER => true, 13120 - CURLOPT_ENCODING => '', 13121 - CURLOPT_MAXREDIRS => 10, 13122 - CURLOPT_TIMEOUT => 0, 13123 - CURLOPT_FOLLOWLOCATION => true, 13124 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13125 - CURLOPT_CUSTOMREQUEST => 'GET', 13126 - CURLOPT_HTTPHEADER => array( 13127 - 'Appkey: {{ONECOUNT API KEY}}' 13128 - ), 13129 -)); 13130 - 13131 -$response = curl_exec($curl); 13132 - 13133 -curl_close($curl); 13134 -echo $response; 13135 - 13136 - 13137 -{{/code}} 13138 - 13139 13139 \\ 13140 13140 13141 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13142 - 13143 -{{code language="yml" theme="RDark" title="Get specific engagement Response" collapse="true"}} 13144 - { 13145 - "result": { 13146 - "success": "1", 13147 - "error": { 13148 - "code": "", 13149 - "message": "" 13150 - } 13151 - }, 13152 - "Engagements": [ 13153 - { 13154 - "Id": "048d38e9-d6c3-432e-9671-3f31809d48b3", 13155 - "Name": "Test Engagement 1", 13156 - "Engagement Fields": [ 13157 - { 13158 - "Name": "id", 13159 - "Type": "text" 13160 - }, 13161 - { 13162 - "Name": "activity_time", 13163 - "Type": "text" 13164 - }, 13165 - { 13166 - "Name": "Name", 13167 - "Type": "text" 13168 - }, 13169 - { 13170 - "Name": "Test Field", 13171 - "Type": "select", 13172 - "Values": [ 13173 - { 13174 - "text": "Test 1", 13175 - "value": "Test1" 13176 - } 13177 - ] 13178 - } 13179 - ] 13180 - } 13181 - ] 13182 -} 13183 -{{/code}} 13184 - 13185 13185 \\ 13186 13186 13187 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13188 -== (% 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(%%) == 13189 - 13190 ----- 13191 - 13192 -{{panel bgColor="#D3D3D3" width="100%"}} 13193 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements 13194 -{{/panel}} 13195 - 13196 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13197 - 13198 ----- 13199 - 13200 -(% 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}} 13201 - 13202 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13203 - 13204 ----- 13205 - 13206 -{{code language="yml" theme="RDark" title="Body"}} 13207 -{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13208 - {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"}, 13209 - {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"}, 13210 - {"Price":[],"Type": "numeric"}, 13211 - {"Transaction Date":[],"Type": "date"} 13212 -]} 13213 -{{/code}} 13214 - 13215 -==== Example ==== 13216 - 13217 ----- 13218 - 13219 -(% style="color: rgb(107,107,107);" %)Request 13220 - 13221 -{{code language="php" theme="RDark" title="Create Engagement Request"}} 13222 -<?php 13223 - 13224 -$curl = curl_init(); 13225 - 13226 -curl_setopt_array($curl, array( 13227 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements', 13228 - CURLOPT_RETURNTRANSFER => true, 13229 - CURLOPT_ENCODING => '', 13230 - CURLOPT_MAXREDIRS => 10, 13231 - CURLOPT_TIMEOUT => 0, 13232 - CURLOPT_FOLLOWLOCATION => true, 13233 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13234 - CURLOPT_CUSTOMREQUEST => 'POST', 13235 - CURLOPT_POSTFIELDS =>'{"Name":"Test engagement 2", "Description":"Test engagement 2", "Metrics":[ 13236 - {"Name":[{"text":"Webinar 1","value":"Webinar_1"},{"text":"Webinar 2","value":"Webinar_2"}],"Type": "select"}, 13237 - {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"}, 13238 - {"Price":[],"Type": "numeric"}, 13239 - {"Transaction Date":[],"Type": "text"} 13240 -]}', 13241 - CURLOPT_HTTPHEADER => array( 13242 - 'Appkey: {{ONECOUNT API KEY}}', 13243 - 'Content-Type: application/json' 13244 - ), 13245 -)); 13246 - 13247 -$response = curl_exec($curl); 13248 - 13249 -curl_close($curl); 13250 -echo $response; 13251 - 13252 - 13253 -{{/code}} 13254 - 13255 13255 \\ 13256 13256 13257 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13258 - 13259 -{{code language="yml" theme="RDark" title="Create Engagement Response" collapse="true"}} 13260 - { 13261 - "result": { 13262 - "success": "1", 13263 - "error": { 13264 - "code": "", 13265 - "message": "" 13266 - } 13267 - }, 13268 - "Engagements": [ 13269 - { 13270 - "Id": "71c1115f-e5bb-470a-bedf-6940f5ac8565", 13271 - "Name": "Test engagement 2", 13272 - "Metrics": [ 13273 - { 13274 - "Name": "Name", 13275 - "Type": "select", 13276 - "Values": [ 13277 - { 13278 - "text": "Webinar 1", 13279 - "value": "Webinar_1" 13280 - }, 13281 - { 13282 - "text": "Webinar 2", 13283 - "value": "Webinar_2" 13284 - } 13285 - ] 13286 - }, 13287 - { 13288 - "Name": "Attendance Status", 13289 - "Type": "select", 13290 - "Values": [ 13291 - { 13292 - "text": "Attended", 13293 - "value": "attended" 13294 - }, 13295 - { 13296 - "text": "Not Attended", 13297 - "value": "not_attended" 13298 - } 13299 - ] 13300 - }, 13301 - { 13302 - "Name": "Price", 13303 - "Type": "numeric" 13304 - }, 13305 - { 13306 - "Name": "Transaction Date", 13307 - "Type": "text" 13308 - }, 13309 - { 13310 - "Name": "id", 13311 - "Type": "text" 13312 - }, 13313 - { 13314 - "Name": "activity_time", 13315 - "Type": "text" 13316 - } 13317 - ] 13318 - } 13319 - ] 13320 -} 13321 -{{/code}} 13322 - 13323 13323 \\ 13324 13324 13325 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13326 -== (% 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(%%) == 13327 - 13328 ----- 13329 - 13330 -{{panel bgColor="#D3D3D3" width="100%"}} 13331 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement Id}} 13332 -{{/panel}} 13333 - 13334 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13335 - 13336 ----- 13337 - 13338 -(% 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}} 13339 - 13340 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13341 - 13342 ----- 13343 - 13344 -{{code language="yml" theme="RDark" title="Body"}} 13345 -{"Name":"Test engagement 3", "Metrics":[ 13346 - {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"}, 13347 - {"Price":[],"Type": "text"} 13348 - ]} 13349 -{{/code}} 13350 - 13351 -==== Example ==== 13352 - 13353 ----- 13354 - 13355 -(% style="color: rgb(107,107,107);" %)Request 13356 - 13357 -{{code language="php" theme="RDark" title="Update Engagement Request"}} 13358 - <?php 13359 - 13360 -$curl = curl_init(); 13361 - 13362 -curl_setopt_array($curl, array( 13363 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement Id}}', 13364 - CURLOPT_RETURNTRANSFER => true, 13365 - CURLOPT_ENCODING => '', 13366 - CURLOPT_MAXREDIRS => 10, 13367 - CURLOPT_TIMEOUT => 0, 13368 - CURLOPT_FOLLOWLOCATION => true, 13369 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13370 - CURLOPT_CUSTOMREQUEST => 'PUT', 13371 - CURLOPT_POSTFIELDS =>'{"Name":"Test engagement 3", "Metrics":[ 13372 - {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"}, 13373 - {"Price":[],"Type": "text"} 13374 - ]}', 13375 - CURLOPT_HTTPHEADER => array( 13376 - 'Appkey: {{ONECOUNT API KEY}}', 13377 - 'Content-Type: application/json' 13378 - ), 13379 -)); 13380 - 13381 -$response = curl_exec($curl); 13382 - 13383 -curl_close($curl); 13384 -echo $response; 13385 - 13386 -{{/code}} 13387 - 13388 13388 \\ 13389 13389 13390 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13391 - 13392 -{{code language="yml" theme="RDark" title="Update Engagement Response" collapse="true"}} 13393 -{ 13394 - "result": { 13395 - "success": "1", 13396 - "error": { 13397 - "code": "", 13398 - "message": "" 13399 - } 13400 - }, 13401 - "Engagements": [ 13402 - { 13403 - "Id": "e0e816ec-77ba-4db1-bfc0-22d340337357", 13404 - "Name": "Test engagement 3", 13405 - "Metrics": [ 13406 - { 13407 - "Name": "Attendance Status", 13408 - "Type": "select", 13409 - "Values": [ 13410 - { 13411 - "text": "Attended", 13412 - "value": "attended" 13413 - }, 13414 - { 13415 - "text": "Not Attended", 13416 - "value": "not_attended" 13417 - } 13418 - ] 13419 - }, 13420 - { 13421 - "Name": "Price", 13422 - "Type": "text" 13423 - }, 13424 - { 13425 - "Name": "Name", 13426 - "Type": "select", 13427 - "Values": [ 13428 - { 13429 - "text": "Webinar 1", 13430 - "value": "Webinar_1" 13431 - }, 13432 - { 13433 - "text": "Webinar 2", 13434 - "value": "Webinar_2" 13435 - } 13436 - ] 13437 - }, 13438 - { 13439 - "Name": "Transaction Date", 13440 - "Type": "text" 13441 - }, 13442 - { 13443 - "Name": "id", 13444 - "Type": "text" 13445 - }, 13446 - { 13447 - "Name": "activity_time", 13448 - "Type": "text" 13449 - } 13450 - ] 13451 - } 13452 - ] 13453 -} 13454 -{{/code}} 13455 - 13456 13456 \\ 13457 13457 13458 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13459 -== (% 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(%%) == 13460 - 13461 ----- 13462 - 13463 -{{panel bgColor="#D3D3D3" width="100%"}} 13464 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/addUser 13465 -{{/panel}} 13466 - 13467 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13468 - 13469 ----- 13470 - 13471 -(% 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}} 13472 - 13473 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13474 - 13475 ----- 13476 - 13477 -{{code language="yml" theme="RDark" title="Body"}} 13478 -{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357","show id":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}} 13479 -{{/code}} 13480 - 13481 -==== Example ==== 13482 - 13483 ----- 13484 - 13485 -(% style="color: rgb(107,107,107);" %)Request 13486 - 13487 -{{code language="php" theme="RDark" title="Add User to Engagement Request"}} 13488 - <?php 13489 - 13490 -$curl = curl_init(); 13491 - 13492 -curl_setopt_array($curl, array( 13493 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/addUser', 13494 - CURLOPT_RETURNTRANSFER => true, 13495 - CURLOPT_ENCODING => '', 13496 - CURLOPT_MAXREDIRS => 10, 13497 - CURLOPT_TIMEOUT => 0, 13498 - CURLOPT_FOLLOWLOCATION => true, 13499 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13500 - CURLOPT_CUSTOMREQUEST => 'POST', 13501 - CURLOPT_POSTFIELDS =>'{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357","show id":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}}', 13502 - CURLOPT_HTTPHEADER => array( 13503 - 'Appkey: {{ONECOUNT API KEY}}' 13504 - ), 13505 -)); 13506 - 13507 -$response = curl_exec($curl); 13508 - 13509 -curl_close($curl); 13510 -echo $response; 13511 -{{/code}} 13512 - 13513 13513 \\ 13514 13514 13515 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13516 - 13517 -{{code language="yml" theme="RDark" title="Add Users to Engagement Response" collapse="true"}} 13518 - { 13519 - "result": { 13520 - "success": "1", 13521 - "error": { 13522 - "code": "", 13523 - "message": "" 13524 - } 13525 - }, 13526 - "Users": { 13527 - "ocid": 1845775, 13528 - "uuid": { 13529 - "type": { 13530 - "name": "uuid" 13531 - }, 13532 - "uuid": "a1425a04-4c0c-4790-bcd6-425bc7729fd7", 13533 - "version": 4 13534 - }, 13535 - "blacklisted": null, 13536 - "demo": { 13537 - "1": "rayaan@one-count.com", 13538 - "2": "user_1701788987", 13539 - "3": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5" 13540 - }, 13541 - "email": "rayaan@one-count.com", 13542 - "espid": null, 13543 - "known": { 13544 - "type": { 13545 - "name": "smallint" 13546 - }, 13547 - "value": "1" 13548 - }, 13549 - "ocid_hash": "57b81cf5536171c84e6e8a0b762251ee7819737b2e95f1390fed97acc11a277b", 13550 - "partners_hash": null, 13551 - "password": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5", 13552 - "payment_cc_exp": null, 13553 - "payment_vendor_token": null, 13554 - "products": { 13555 - "599": "447" 13556 - }, 13557 - "remarks": null, 13558 - "resources": null, 13559 - "smartlink_hash": null, 13560 - "subscription_active_resource_info": null, 13561 - "subscription_active_term_info": { 13562 - "447": "{\"renewed\":1,\"expiration_month\":202512,\"product_status\":\"2\",\"expiration_date\":20251211}" 13563 - }, 13564 - "subscription_log": { 13565 - "type": { 13566 - "valueType": { 13567 - "name": "varchar" 13568 - } 13569 - }, 13570 - "values": [ 13571 - "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:09:01\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702303741,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}", 13572 - "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:20:49\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702304449,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}", 13573 - "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:34:26\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702305266,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}" 13574 - ] 13575 - }, 13576 - "subscription_log_by_resource": null, 13577 - "subscription_source_code": [ 13578 - "83" 13579 - ], 13580 - "targets": null, 13581 - "timestamp": { 13582 - "type": { 13583 - "name": "bigint" 13584 - }, 13585 - "value": "1701788987" 13586 - }, 13587 - "unconfirmed": null, 13588 - "update_time": null, 13589 - "username": "user_1701788987", 13590 - "vendor_blacklisted": null, 13591 - "vendor_esp": null, 13592 - "vendor_unconfirmed": null 13593 - } 13594 -} 13595 -{{/code}} 13596 - 13597 13597 \\ 13598 13598 13599 -(% class="western" %) 13600 -=== **COMPONENT: Segments 13601 -** === 13602 - 13603 -(% class="western" %) 13604 -This resource is for manipulating segment for a resource. A segment can be searched (or) add users to segment (or) get all segment for a user. 13605 - 13606 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13607 -((( 13608 -(% class="western" %) 13609 -**Method** 13610 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13611 -((( 13612 -(% class="western" %) 13613 -**Url** 13614 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13615 -((( 13616 -(% class="western" %) 13617 -**Action** 13618 -))) 13619 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13620 -((( 13621 -(% class="western" %) 13622 -GET 13623 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13624 -((( 13625 -(% class="western" %) 13626 -/(% style="color: rgb(33,33,33);" %)segments 13627 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13628 -((( 13629 -(% class="western" %) 13630 -Get all segments. 13631 -))) 13632 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13633 -((( 13634 -(% class="western" %) 13635 -GET 13636 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13637 -((( 13638 -(% class="western" %) 13639 -/(% style="color: rgb(33,33,33);" %)segments(%%)/(% class="resolvedVariable" style="text-decoration: none;" %)~{~{Segment id}} 13640 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13641 -((( 13642 -(% class="western" %) 13643 -Get specific segment based on segment id. 13644 -))) 13645 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13646 -((( 13647 -(% class="western" %) 13648 -POST 13649 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13650 -((( 13651 -(% class="western" %) 13652 -/(% style="color: rgb(33,33,33);" %)segments/addUsers 13653 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13654 -((( 13655 -(% class="western" %) 13656 -Add users to segment. 13657 -))) 13658 -(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13659 -((( 13660 -(% class="western" %) 13661 -GET 13662 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13663 -((( 13664 -(% class="western" %) 13665 -/(% style="color: rgb(33,33,33);" %)segments/users/(% class="resolvedVariable" style="text-decoration: none;" %)~{~{ocid}} 13666 -)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 13667 -((( 13668 -(% class="western" %) 13669 -Get all segment user has be subscribed based on user id. 13670 -))) 13671 - 13672 13672 \\ 13673 13673 13674 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13675 -== (% 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 Segments(%%) == 13676 - 13677 ----- 13678 - 13679 ----- 13680 - 13681 -{{panel bgColor="#D3D3D3" width="100%"}} 13682 -(% class="nolink nolink" %)https:~/~/api.onecount.net/v2(% class="nolink" style="color: rgb(33,33,33);" %)/segments 13683 -{{/panel}} 13684 - 13685 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13686 - 13687 ----- 13688 - 13689 -(% 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}} 13690 - 13691 -==== Example ==== 13692 - 13693 ----- 13694 - 13695 -(% style="color: rgb(107,107,107);" %)Request 13696 - 13697 -{{code language="php" theme="RDark" title="Get All Segments Request"}} 13698 -<?php 13699 - 13700 -$curl = curl_init(); 13701 - 13702 -curl_setopt_array($curl, array( 13703 - CURLOPT_URL => 'https://api.onecount.net/v2/segments', 13704 - CURLOPT_RETURNTRANSFER => true, 13705 - CURLOPT_ENCODING => '', 13706 - CURLOPT_MAXREDIRS => 10, 13707 - CURLOPT_TIMEOUT => 0, 13708 - CURLOPT_FOLLOWLOCATION => true, 13709 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13710 - CURLOPT_CUSTOMREQUEST => 'GET', 13711 - CURLOPT_HTTPHEADER => array( 13712 - 'Appkey: {{ONECOUNT API KEY}}' 13713 - ), 13714 -)); 13715 - 13716 -$response = curl_exec($curl); 13717 - 13718 -curl_close($curl); 13719 -echo $response; 13720 -{{/code}} 13721 - 13722 13722 \\ 13723 13723 13724 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13725 - 13726 -{{code language="yml" theme="RDark" title="Get All Segments Response" collapse="true"}} 13727 - { 13728 - "result": { 13729 - "success": "1", 13730 - "error": { 13731 - "code": "", 13732 - "message": "" 13733 - } 13734 - }, 13735 - "Segments": [ 13736 - { 13737 - "Id": "891aa4b6-9e0e-4706-b08a-e7acb54e7e43", 13738 - "Name": "2022 Use Cases PDF Download" 13739 - }, 13740 - { 13741 - "Id": "a639cb1f-6509-447b-a1d7-93a8e8ef61b1", 13742 - "Name": "58-percent conversion-rate" 13743 - }, 13744 - { 13745 - "Id": "43eefdc6-89ab-4472-88c3-e16fb9619138", 13746 - "Name": "Audience Marketing Pop-Up" 13747 - }, 13748 - { 13749 - "Id": "68219b37-c155-4459-a5ce-497261286ffe", 13750 - "Name": "Bold Minds Reminders" 13751 - }, 13752 - { 13753 - "Id": "6450defc-7658-4182-9c2a-a8f8420f801e", 13754 - "Name": "Demo - Aviator's Guide - NL Popup" 13755 - }, 13756 - { 13757 - "Id": "28774f7c-9fd3-4dff-a42e-683460f437c0", 13758 - "Name": "Getting 80-Percent Conversion Rates Pop-up" 13759 - }, 13760 - { 13761 - "Id": "71b655e6-a11a-46af-bed5-b9eb1d6ac3aa", 13762 - "Name": "Holiday Special Offer - 3 mo. Pilot" 13763 - }, 13764 - { 13765 - "Id": "16305ad0-8e65-4085-942e-04d99fd39207", 13766 - "Name": "Identity Resolution Test II" 13767 - }, 13768 - { 13769 - "Id": "fcdfa9cb-baa2-4cc8-86b3-8f604471f2f3", 13770 - "Name": "Live ONEcount Popup Example Segment" 13771 - }, 13772 - { 13773 - "Id": "2463b0a3-1e22-4fd0-97b2-bbdae30e585a", 13774 - "Name": "Live webinar - June 15 - Accelerate Revenue" 13775 - }, 13776 - { 13777 - "Id": "d8d1bc9d-ede2-4c82-a747-10ab9fb979de", 13778 - "Name": "LIVE WEBINAR ONEcount BI Pop-up Campaign" 13779 - }, 13780 - { 13781 - "Id": "d883ecdb-5307-416d-9558-c196472021c9", 13782 - "Name": "New Year - Increase Revenue 30-Percent" 13783 - }, 13784 - { 13785 - "Id": "08abbc5b-aafe-4834-90f5-ac45fe025d73", 13786 - "Name": "OC Test" 13787 - }, 13788 - { 13789 - "Id": "24cf72e9-ad71-489c-89ef-b80d0c42e2e2", 13790 - "Name": "Something big" 13791 - }, 13792 - { 13793 - "Id": "0d37c79e-deb2-4287-9444-ae4812a9d8f0", 13794 - "Name": "Something No Other Platform Has" 13795 - }, 13796 - { 13797 - "Id": "5eaa0345-a825-4ba0-a787-336312a77744", 13798 - "Name": "Something Revolutionary" 13799 - }, 13800 - { 13801 - "Id": "c905d313-8d5e-45c1-aaab-7f8c8adc2bea", 13802 - "Name": "Something that will change your life" 13803 - }, 13804 - { 13805 - "Id": "1bfb1c06-4b26-4ac3-a616-eb6b225e5f0e", 13806 - "Name": "Something You Have Always Wanted" 13807 - }, 13808 - { 13809 - "Id": "28361c73-e253-49bb-a791-5481be2070a0", 13810 - "Name": "Something You Never Thought Possible" 13811 - }, 13812 - { 13813 - "Id": "86e7129a-a538-4c56-a731-7e9c08fa8814", 13814 - "Name": "Test behaviour " 13815 - }, 13816 - { 13817 - "Id": "e5e53cd4-bbd0-465b-b426-e267964fd0b4", 13818 - "Name": "Test behaviour banner segment" 13819 - }, 13820 - { 13821 - "Id": "78ffd6d7-0b40-4e5a-8f32-622a04fb5561", 13822 - "Name": "Test behaviour combo" 13823 - }, 13824 - { 13825 - "Id": "0022394d-7901-4aff-98c2-0c8c04fcb27a", 13826 - "Name": "Test behaviour content" 13827 - }, 13828 - { 13829 - "Id": "89424642-1363-476e-9842-4f0a2544151f", 13830 - "Name": "Test behaviour email" 13831 - }, 13832 - { 13833 - "Id": "ca848e53-3f3e-43c6-ae61-f331f3135c6c", 13834 - "Name": "Test demographic segments" 13835 - }, 13836 - { 13837 - "Id": "e11d11fa-7603-4dee-a361-c6e909249ecd", 13838 - "Name": "Test with unknown only selecting all filters" 13839 - } 13840 - ] 13841 -} 13842 -{{/code}} 13843 - 13844 13844 \\ 13845 13845 13846 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13847 -== (% 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 Segments(%%) == 13848 - 13849 ----- 13850 - 13851 -{{panel bgColor="#D3D3D3" width="100%"}} 13852 - (% class="nolink nolink" %)https:~/~/api.onecount.net/v2(% class="nolink" style="color: rgb(33,33,33);" %)/segments/~{~{segment id}} 13853 -{{/panel}} 13854 - 13855 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13856 - 13857 ----- 13858 - 13859 -(% 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}} 13860 - 13861 -==== Example ==== 13862 - 13863 ----- 13864 - 13865 -(% style="color: rgb(107,107,107);" %)Request 13866 - 13867 -{{code language="php" theme="RDark" title="Get specific Segment Request"}} 13868 - <?php 13869 - 13870 -$curl = curl_init(); 13871 - 13872 -curl_setopt_array($curl, array( 13873 - CURLOPT_URL => 'https://api.onecount.net/v2/segments/{{segment id}}', 13874 - CURLOPT_RETURNTRANSFER => true, 13875 - CURLOPT_ENCODING => '', 13876 - CURLOPT_MAXREDIRS => 10, 13877 - CURLOPT_TIMEOUT => 0, 13878 - CURLOPT_FOLLOWLOCATION => true, 13879 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13880 - CURLOPT_CUSTOMREQUEST => 'GET', 13881 - CURLOPT_HTTPHEADER => array( 13882 - 'Appkey: {{ONECOUNT API KEY}}' 13883 - ), 13884 -)); 13885 - 13886 -$response = curl_exec($curl); 13887 - 13888 -curl_close($curl); 13889 -echo $response; 13890 -{{/code}} 13891 - 13892 13892 \\ 13893 13893 13894 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13895 - 13896 -{{code language="yml" theme="RDark" title="Get specific Segments Response" collapse="true"}} 13897 - { 13898 - "result": { 13899 - "success": "1", 13900 - "error": { 13901 - "code": "", 13902 - "message": "" 13903 - } 13904 - }, 13905 - "Segments": { 13906 - "Id": "e5e53cd4-bbd0-465b-b426-e267964fd0b4", 13907 - "Demos": { 13908 - "_empty_": [], 13909 - "type": "" 13910 - }, 13911 - "Description": "", 13912 - "Action": { 13913 - "action": {} 13914 - }, 13915 - "Name": "Test behaviour banner segment", 13916 - "Behaviours": [ 13917 - { 13918 - "end_date": "05/26/2022", 13919 - "date_type": "Future", 13920 - "sub_category_values": [], 13921 - "sub_category": "clicked", 13922 - "category": "1", 13923 - "targets": [ 13924 - "all" 13925 - ], 13926 - "joining_logic": "AND", 13927 - "frequency": "1", 13928 - "start_date": "04/26/2022", 13929 - "day_count": "100" 13930 - } 13931 - ], 13932 - "Accounts": [] 13933 - } 13934 -} 13935 -{{/code}} 13936 - 13937 13937 \\ 13938 13938 13939 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13940 -== (% 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 users to segments(%%) == 13941 - 13942 ----- 13943 - 13944 -{{panel bgColor="#D3D3D3" width="100%"}} 13945 -(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/segments/addUsers 13946 -{{/panel}} 13947 - 13948 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13949 - 13950 ----- 13951 - 13952 -(% 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}} 13953 - 13954 -=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13955 - 13956 ----- 13957 - 13958 -{{code language="yml" theme="RDark" title="Body"}} 13959 -{"Id":"78ffd6d7-0b40-4e5a-8f32-622a04fb5561","Users":[164499,676172,2134321]} 13960 -{{/code}} 13961 - 13962 -==== Example ==== 13963 - 13964 ----- 13965 - 13966 -(% style="color: rgb(107,107,107);" %)Request 13967 - 13968 -{{code language="php" theme="RDark" title="Add users to Segment Request"}} 13969 -<?php 13970 - 13971 -$curl = curl_init(); 13972 - 13973 -curl_setopt_array($curl, array( 13974 - CURLOPT_URL => 'https://api.onecount.net/v2/segments/addUsers', 13975 - CURLOPT_RETURNTRANSFER => true, 13976 - CURLOPT_ENCODING => '', 13977 - CURLOPT_MAXREDIRS => 10, 13978 - CURLOPT_TIMEOUT => 0, 13979 - CURLOPT_FOLLOWLOCATION => true, 13980 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13981 - CURLOPT_CUSTOMREQUEST => 'POST', 13982 - CURLOPT_POSTFIELDS =>'{"Id":"78ffd6d7-0b40-4e5a-8f32-622a04fb5561","Users":[164499,676172,2134321]}', 13983 - CURLOPT_HTTPHEADER => array( 13984 - 'Appkey: {{ONECOUNT API KEY}}', 13985 - 'Content-Type: application/json' 13986 - ), 13987 -)); 13988 - 13989 -$response = curl_exec($curl); 13990 - 13991 -curl_close($curl); 13992 -echo $response; 13993 -{{/code}} 13994 - 13995 13995 \\ 13996 13996 13997 -(% style="color: rgb(107,107,107);" %)Response 200 OK 13998 - 13999 -{{code language="yml" theme="RDark" title="Add users to segment Response" collapse="true"}} 14000 -{ 14001 - "result": { 14002 - "success": "1", 14003 - "error": { 14004 - "code": "", 14005 - "message": "" 14006 - } 14007 - }, 14008 - "Segments": { 14009 - "Error user ids": [ 14010 - 676172, 14011 - 2134321 14012 - ], 14013 - "Inserted user ids": [ 14014 - 164499 14015 - ] 14016 - } 14017 -} 14018 -{{/code}} 14019 - 14020 14020 \\ 14021 14021 14022 -(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 14023 -== (% 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 segments for a User(%%) == 14024 - 14025 ----- 14026 - 14027 -{{panel bgColor="#D3D3D3" width="100%"}} 14028 - (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/segments/users/(% class="nolink resolvedVariable" style="text-decoration: none;" %)~{~{ocid}} 14029 -{{/panel}} 14030 - 14031 -=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 14032 - 14033 ----- 14034 - 14035 -(% 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}} 14036 - 14037 -==== Example ==== 14038 - 14039 ----- 14040 - 14041 -(% style="color: rgb(107,107,107);" %)Request 14042 - 14043 -{{code language="php" theme="RDark" title="Get all segments for a user Request"}} 14044 -<?php 14045 - 14046 -$curl = curl_init(); 14047 - 14048 -curl_setopt_array($curl, array( 14049 - CURLOPT_URL => 'rayaan.onecount.net/api/v2/segments/users/••••••', 14050 - CURLOPT_RETURNTRANSFER => true, 14051 - CURLOPT_ENCODING => '', 14052 - CURLOPT_MAXREDIRS => 10, 14053 - CURLOPT_TIMEOUT => 0, 14054 - CURLOPT_FOLLOWLOCATION => true, 14055 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 14056 - CURLOPT_CUSTOMREQUEST => 'GET', 14057 - CURLOPT_HTTPHEADER => array( 14058 - 'Appkey: {{ONECOUNT API KEY}}' 14059 - ), 14060 -)); 14061 - 14062 -$response = curl_exec($curl); 14063 - 14064 -curl_close($curl); 14065 -echo $response; 14066 -{{/code}} 14067 - 14068 14068 \\ 14069 14069 14070 -(% style="color: rgb(107,107,107);" %)Response 200 OK 14071 - 14072 -{{code language="yml" theme="RDark" title="Get all Segments for a user Response" collapse="true"}} 14073 -{ 14074 - "result": { 14075 - "success": "1", 14076 - "error": { 14077 - "code": "", 14078 - "message": "" 14079 - } 14080 - }, 14081 - "Segments": [ 14082 - "0d37c79e-deb2-4287-9444-ae4812a9d8f0", 14083 - "1bfb1c06-4b26-4ac3-a616-eb6b225e5f0e", 14084 - "24cf72e9-ad71-489c-89ef-b80d0c42e2e2", 14085 - "28361c73-e253-49bb-a791-5481be2070a0", 14086 - "28774f7c-9fd3-4dff-a42e-683460f437c0", 14087 - "5eaa0345-a825-4ba0-a787-336312a77744", 14088 - "71b655e6-a11a-46af-bed5-b9eb1d6ac3aa", 14089 - "a639cb1f-6509-447b-a1d7-93a8e8ef61b1", 14090 - "bcb403a2-c0a1-414f-90c1-277a41009c97", 14091 - "c905d313-8d5e-45c1-aaab-7f8c8adc2bea", 14092 - "d883ecdb-5307-416d-9558-c196472021c9", 14093 - "d8d1bc9d-ede2-4c82-a747-10ab9fb979de" 14094 - ] 14095 -} 14096 -{{/code}} 14097 - 14098 14098 \\ 14099 14099 14100 14100 (% class="western" %) 14101 - ===**COMPONENT: Leads14102 -** ===11905 +**COMPONENT: Leads 11906 +** 14103 14103 14104 14104 (% class="western" %) 14105 14105 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. ... ... @@ -14284,6 +14284,14 @@ 14284 14284 14285 14285 \\ 14286 14286 12091 +\\ 12092 + 12093 +\\ 12094 + 12095 +\\ 12096 + 12097 +\\ 12098 + 14287 14287 (% class="western" %) 14288 14288 **API REFERENCE** 14289 14289
- Screen Shot 2020-02-26 at 11.14.29 AM.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -397.9 KB - Content
- Screen Shot 2020-02-26 at 11.15.52 AM.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -50.1 KB - Content
- Screen Shot 2020-02-26 at 11.22.13 AM.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -159.8 KB - Content
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -1082654 771 +108265481 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/1082654 77/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/108265481/ONEcount API Documentation