Changes for page ONEcount API Documentation
Last modified by Rayaan Ahmed on 2025/06/27 12:14
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -227,7 +227,7 @@ 227 227 Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name. 228 228 229 229 (% class="western" %) 230 -Return parameter defines a csvof question id that are requested back in response.230 +Return parameter defines a CSV of question id that are requested back in response. 231 231 ))) 232 232 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 233 233 ((( ... ... @@ -341,7 +341,7 @@ 341 341 $curl = curl_init(); 342 342 343 343 curl_setopt_array($curl, array( 344 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/users',344 + CURLOPT_URL => 'https://api.onecount.net/v2/users', 345 345 CURLOPT_RETURNTRANSFER => true, 346 346 CURLOPT_ENCODING => '', 347 347 CURLOPT_MAXREDIRS => 10, ... ... @@ -881,7 +881,7 @@ 881 881 $curl = curl_init(); 882 882 883 883 curl_setopt_array($curl, array( 884 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/users/8418',884 + CURLOPT_URL => 'https://api.onecount.net/v2/users/{{OCID}}', 885 885 CURLOPT_RETURNTRANSFER => true, 886 886 CURLOPT_ENCODING => '', 887 887 CURLOPT_MAXREDIRS => 10, ... ... @@ -989,7 +989,7 @@ 989 989 $curl = curl_init(); 990 990 991 991 curl_setopt_array($curl, array( 992 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/users/login',992 + CURLOPT_URL => 'https://api.onecount.net/v2/users/login', 993 993 CURLOPT_RETURNTRANSFER => true, 994 994 CURLOPT_ENCODING => '', 995 995 CURLOPT_MAXREDIRS => 10, ... ... @@ -1064,7 +1064,7 @@ 1064 1064 $curl = curl_init(); 1065 1065 1066 1066 curl_setopt_array($curl, array( 1067 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/users/lookup?2=user_242_6298&return=1%2C2%2C3%2C4',1067 + CURLOPT_URL => 'https://api.onecount.net/v2/users/lookup?2=user_242_6298&return=1,2,3,4', 1068 1068 CURLOPT_RETURNTRANSFER => true, 1069 1069 CURLOPT_ENCODING => '', 1070 1070 CURLOPT_MAXREDIRS => 10, ... ... @@ -1141,6 +1141,7 @@ 1141 1141 (% class="western" %) 1142 1142 **POST method should be used to create users.** 1143 1143 1144 +(% class="wrapped" %) 1144 1144 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1145 1145 ((( 1146 1146 (% class="western" %) ... ... @@ -1207,6 +1207,7 @@ 1207 1207 CSV of ONEcount QuestionId's requested back in Users object in response. 1208 1208 ))) 1209 1209 1211 +(% class="wrapped" %) 1210 1210 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1211 1211 ((( 1212 1212 (% class="western" %) ... ... @@ -1260,7 +1260,7 @@ 1260 1260 $curl = curl_init(); 1261 1261 1262 1262 curl_setopt_array($curl, array( 1263 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/users',1265 + CURLOPT_URL => 'https://api.onecount.net/v2/users', 1264 1264 CURLOPT_RETURNTRANSFER => true, 1265 1265 CURLOPT_ENCODING => '', 1266 1266 CURLOPT_MAXREDIRS => 10, ... ... @@ -1316,6 +1316,7 @@ 1316 1316 (% class="western" %) 1317 1317 **PUT method should be used to update users.** 1318 1318 1321 +(% class="wrapped" %) 1319 1319 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1320 1320 ((( 1321 1321 (% class="western" %) ... ... @@ -1369,6 +1369,7 @@ 1369 1369 RequestDate to use for the demo update. If not provided current date will be used. 1370 1370 ))) 1371 1371 1375 +(% class="wrapped" %) 1372 1372 (% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 1373 1373 ((( 1374 1374 (% class="western" %) ... ... @@ -1422,7 +1422,7 @@ 1422 1422 $curl = curl_init(); 1423 1423 1424 1424 curl_setopt_array($curl, array( 1425 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/users/{{OCID}}',1429 + CURLOPT_URL => 'https://api.onecount.net/v2/users/{{OCID}}', 1426 1426 CURLOPT_RETURNTRANSFER => true, 1427 1427 CURLOPT_ENCODING => '', 1428 1428 CURLOPT_MAXREDIRS => 10, ... ... @@ -1470,7 +1470,7 @@ 1470 1470 \\ 1471 1471 1472 1472 (% class="western" %) 1473 -**COMPONENT: Questions** 1477 +=== **COMPONENT: Questions** === 1474 1474 1475 1475 (% class="western" %) 1476 1476 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). ... ... @@ -1666,7 +1666,7 @@ 1666 1666 $curl = curl_init(); 1667 1667 1668 1668 curl_setopt_array($curl, array( 1669 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions',1673 + CURLOPT_URL => 'https://api.onecount.net/v2/questions', 1670 1670 CURLOPT_RETURNTRANSFER => true, 1671 1671 CURLOPT_ENCODING => '', 1672 1672 CURLOPT_MAXREDIRS => 10, ... ... @@ -3807,7 +3807,7 @@ 3807 3807 $curl = curl_init(); 3808 3808 3809 3809 curl_setopt_array($curl, array( 3810 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions/{{QUESTION ID}}',3814 + CURLOPT_URL => 'https://api.onecount.net/v2/questions/{{QUESTION ID}}', 3811 3811 CURLOPT_RETURNTRANSFER => true, 3812 3812 CURLOPT_ENCODING => '', 3813 3813 CURLOPT_MAXREDIRS => 10, ... ... @@ -3886,7 +3886,7 @@ 3886 3886 $curl = curl_init(); 3887 3887 3888 3888 curl_setopt_array($curl, array( 3889 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions/lookup?Text=COUNTRY',3893 + CURLOPT_URL => 'https://api.onecount.net/v2/questions/lookup?Text=COUNTRY', 3890 3890 CURLOPT_RETURNTRANSFER => true, 3891 3891 CURLOPT_ENCODING => '', 3892 3892 CURLOPT_MAXREDIRS => 10, ... ... @@ -5332,7 +5332,7 @@ 5332 5332 $curl = curl_init(); 5333 5333 5334 5334 curl_setopt_array($curl, array( 5335 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions/lookup?Type=4',5339 + CURLOPT_URL => 'https://api.onecount.net/v2/questions/lookup?Type=4', 5336 5336 CURLOPT_RETURNTRANSFER => true, 5337 5337 CURLOPT_ENCODING => '', 5338 5338 CURLOPT_MAXREDIRS => 10, ... ... @@ -8039,7 +8039,7 @@ 8039 8039 $curl = curl_init(); 8040 8040 8041 8041 curl_setopt_array($curl, array( 8042 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions',8046 + CURLOPT_URL => 'https://api.onecount.net/v2/questions', 8043 8043 CURLOPT_RETURNTRANSFER => true, 8044 8044 CURLOPT_ENCODING => '', 8045 8045 CURLOPT_MAXREDIRS => 10, ... ... @@ -8117,7 +8117,7 @@ 8117 8117 $curl = curl_init(); 8118 8118 8119 8119 curl_setopt_array($curl, array( 8120 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions',8124 + CURLOPT_URL => 'https://api.onecount.net/v2/questions', 8121 8121 CURLOPT_RETURNTRANSFER => true, 8122 8122 CURLOPT_ENCODING => '', 8123 8123 CURLOPT_MAXREDIRS => 10, ... ... @@ -8195,7 +8195,7 @@ 8195 8195 $curl = curl_init(); 8196 8196 8197 8197 curl_setopt_array($curl, array( 8198 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/questions/503',8202 + CURLOPT_URL => 'https://api.onecount.net/v2/questions/{{QUESTION ID}}', 8199 8199 CURLOPT_RETURNTRANSFER => true, 8200 8200 CURLOPT_ENCODING => '', 8201 8201 CURLOPT_MAXREDIRS => 10, ... ... @@ -8242,7 +8242,7 @@ 8242 8242 \\ 8243 8243 8244 8244 (% class="western" %) 8245 -**COMPONENT: Products** 8249 +=== **COMPONENT: Products** === 8246 8246 8247 8247 (% class="western" %) 8248 8248 This resource is for manipulating products resource. A product can be created, updated or searched. ... ... @@ -8380,7 +8380,7 @@ 8380 8380 $curl = curl_init(); 8381 8381 8382 8382 curl_setopt_array($curl, array( 8383 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/products',8387 + CURLOPT_URL => 'https://api.onecount.net/v2/products', 8384 8384 CURLOPT_RETURNTRANSFER => true, 8385 8385 CURLOPT_ENCODING => '', 8386 8386 CURLOPT_MAXREDIRS => 10, ... ... @@ -8668,7 +8668,7 @@ 8668 8668 $curl = curl_init(); 8669 8669 8670 8670 curl_setopt_array($curl, array( 8671 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/products/{{Product id}}',8675 + CURLOPT_URL => 'https://api.onecount.net/v2/users/products/{{product id}}', 8672 8672 CURLOPT_RETURNTRANSFER => true, 8673 8673 CURLOPT_ENCODING => '', 8674 8674 CURLOPT_MAXREDIRS => 10, ... ... @@ -8758,7 +8758,7 @@ 8758 8758 $curl = curl_init(); 8759 8759 8760 8760 curl_setopt_array($curl, array( 8761 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/products/lookup?Title={{PackageName}}',8765 + CURLOPT_URL => 'https://api.onecount.net/v2/products/lookup?Title={{Product Name}}', 8762 8762 CURLOPT_RETURNTRANSFER => true, 8763 8763 CURLOPT_ENCODING => '', 8764 8764 CURLOPT_MAXREDIRS => 10, ... ... @@ -8811,106 +8811,239 @@ 8811 8811 8812 8812 \\ 8813 8813 8814 -\\ 8818 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8819 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Product(%%) == 8815 8815 8816 - \\8821 +---- 8817 8817 8818 -\\ 8823 +{{panel bgColor="#D3D3D3" width="100%"}} 8824 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products 8825 +{{/panel}} 8819 8819 8820 - \\8827 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 8821 8821 8822 - \\8829 +---- 8823 8823 8824 - \\8831 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 8825 8825 8826 - \\8833 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 8827 8827 8828 - \\8835 +---- 8829 8829 8830 -\\ 8837 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 8838 +{"Title":"Test API package creation 2","Description": "Test API package creation 2","Terms":{"Name":"Test term for API 2"},"PrimaryFormId":0} 8839 +{{/code}} 8831 8831 8832 - \\8841 +==== Example ==== 8833 8833 8834 - \\8843 +---- 8835 8835 8836 - \\8845 +(% style="color: rgb(107,107,107);" %)Request 8837 8837 8838 -\\ 8847 +{{code language="php" theme="RDark" title="Create Product Request" collapse="true"}} 8848 + <?php 8839 8839 8840 - \\8850 +$curl = curl_init(); 8841 8841 8842 -\\ 8852 +curl_setopt_array($curl, array( 8853 + CURLOPT_URL => 'https://api.onecount.net/v2/products', 8854 + CURLOPT_RETURNTRANSFER => true, 8855 + CURLOPT_ENCODING => '', 8856 + CURLOPT_MAXREDIRS => 10, 8857 + CURLOPT_TIMEOUT => 0, 8858 + CURLOPT_FOLLOWLOCATION => true, 8859 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 8860 + CURLOPT_CUSTOMREQUEST => 'POST', 8861 + CURLOPT_POSTFIELDS =>'{"Title":"Test API package creation 1","Description": "Test API package creation 1","Terms":{"Name":"Test term for API 1"},"PrimaryFormId":0}', 8862 + CURLOPT_HTTPHEADER => array( 8863 + 'Appkey: {{ONECOUNT API KEY}}' 8864 + ), 8865 +)); 8843 8843 8844 - \\8867 +$response = curl_exec($curl); 8845 8845 8846 -\\ 8869 +curl_close($curl); 8870 +echo $response; 8871 +{{/code}} 8847 8847 8848 8848 \\ 8849 8849 8850 - \\8875 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8851 8851 8852 -\\ 8877 +{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}} 8878 + { 8879 + "result": { 8880 + "success": "1", 8881 + "error": { 8882 + "code": "", 8883 + "message": "" 8884 + } 8885 + }, 8886 + "Products": [ 8887 + { 8888 + "ProductId": 599 8889 + } 8890 + ] 8891 +} 8892 +{{/code}} 8853 8853 8854 8854 \\ 8855 8855 8856 -\\ 8896 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8897 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Product(%%) == 8857 8857 8858 - \\8899 +---- 8859 8859 8860 -\\ 8901 +{{panel bgColor="#D3D3D3" width="100%"}} 8902 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/~{~{Product id}} 8903 +{{/panel}} 8861 8861 8862 - \\8905 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 8863 8863 8864 - \\8907 +---- 8865 8865 8866 - \\8909 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 8867 8867 8868 - \\8911 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 8869 8869 8870 - \\8913 +---- 8871 8871 8872 -\\ 8915 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 8916 +{"Title":"Test API package 23","Description": "Test API package 23","PrimaryFormId":0} 8917 +{{/code}} 8873 8873 8874 - \\8919 +==== Example ==== 8875 8875 8876 - \\8921 +---- 8877 8877 8878 - \\8923 +(% style="color: rgb(107,107,107);" %)Request 8879 8879 8880 -\\ 8925 +{{code language="php" theme="RDark" title="Update Product Request" collapse="true"}} 8926 +<?php 8881 8881 8882 - \\8928 +$curl = curl_init(); 8883 8883 8884 -\\ 8930 +curl_setopt_array($curl, array( 8931 + CURLOPT_URL => 'https://api.onecount.net/v2/products/{{Product id}}', 8932 + CURLOPT_RETURNTRANSFER => true, 8933 + CURLOPT_ENCODING => '', 8934 + CURLOPT_MAXREDIRS => 10, 8935 + CURLOPT_TIMEOUT => 0, 8936 + CURLOPT_FOLLOWLOCATION => true, 8937 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 8938 + CURLOPT_CUSTOMREQUEST => 'PUT', 8939 + CURLOPT_POSTFIELDS =>'{"Title":"Test API package 1","Description": "Test API package 1","PrimaryFormId":0}', 8940 + CURLOPT_HTTPHEADER => array( 8941 + 'Appkey: {{ONECOUNT API KEY}}' 8942 + ), 8943 +)); 8885 8885 8886 - \\8945 +$response = curl_exec($curl); 8887 8887 8888 -\\ 8947 +curl_close($curl); 8948 +echo $response; 8949 + 8950 +{{/code}} 8889 8889 8890 8890 \\ 8891 8891 8892 - \\8954 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8893 8893 8894 -\\ 8956 +{{code language="yml" theme="RDark" title="Update Product Response" collapse="true"}} 8957 + { 8958 + "result": { 8959 + "success": "1", 8960 + "error": { 8961 + "code": "", 8962 + "message": "" 8963 + } 8964 + }, 8965 + "Products": [ 8966 + { 8967 + "ProductId": 599, 8968 + "Title": "Test API package 1", 8969 + "Description": "Test API package 1" 8970 + } 8971 + ] 8972 +} 8973 +{{/code}} 8895 8895 8896 8896 \\ 8897 8897 8898 -\\ 8977 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8978 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Attach Resource to Product(%%) == 8899 8899 8900 - \\8980 +---- 8901 8901 8902 -\\ 8982 +{{panel bgColor="#D3D3D3" width="100%"}} 8983 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/attachResource 8984 +{{/panel}} 8903 8903 8904 - \\8986 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 8905 8905 8906 - \\8988 +---- 8907 8907 8908 - \\8990 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 8909 8909 8992 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 8993 + 8994 +---- 8995 + 8996 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 8997 +{"ProductID":"599","ResourceID":"903"} 8998 +{{/code}} 8999 + 9000 +==== Example ==== 9001 + 9002 +---- 9003 + 9004 +(% style="color: rgb(107,107,107);" %)Request 9005 + 9006 +{{code language="php" theme="RDark" title="Attach Resource to Product Request" collapse="true"}} 9007 + <?php 9008 + 9009 +$curl = curl_init(); 9010 + 9011 +curl_setopt_array($curl, array( 9012 + CURLOPT_URL => 'https://api.onecount.net/v2/products/attachResource', 9013 + CURLOPT_RETURNTRANSFER => true, 9014 + CURLOPT_ENCODING => '', 9015 + CURLOPT_MAXREDIRS => 10, 9016 + CURLOPT_TIMEOUT => 0, 9017 + CURLOPT_FOLLOWLOCATION => true, 9018 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9019 + CURLOPT_CUSTOMREQUEST => 'POST', 9020 + CURLOPT_POSTFIELDS =>'{"ProductID":"599","ResourceID":"903"}', 9021 + CURLOPT_HTTPHEADER => array( 9022 + 'Appkey: {{ONECOUNT API KEY}}' 9023 + ), 9024 +)); 9025 + 9026 +$response = curl_exec($curl); 9027 + 9028 +curl_close($curl); 9029 +echo $response; 9030 +{{/code}} 9031 + 8910 8910 \\ 8911 8911 9034 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9035 + 9036 +{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}} 9037 + { 9038 + "result": { 9039 + "success": "1", 9040 + "error": { 9041 + "code": "", 9042 + "message": "" 9043 + } 9044 + }, 9045 + "Products": "599" 9046 +} 9047 +{{/code}} 9048 + 8912 8912 (% class="western" %) 8913 -**COMPONENT: Terms** 9050 +=== **COMPONENT: Terms** === 8914 8914 8915 8915 (% class="western" %) 8916 8916 This resource is for manipulating terms resource. A term can be created, updated or searched. ... ... @@ -9013,7 +9013,7 @@ 9013 9013 $curl = curl_init(); 9014 9014 9015 9015 curl_setopt_array($curl, array( 9016 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/terms',9153 + CURLOPT_URL => 'https://api.onecount.net/v2/terms', 9017 9017 CURLOPT_RETURNTRANSFER => true, 9018 9018 CURLOPT_ENCODING => '', 9019 9019 CURLOPT_MAXREDIRS => 10, ... ... @@ -9196,7 +9196,7 @@ 9196 9196 $curl = curl_init(); 9197 9197 9198 9198 curl_setopt_array($curl, array( 9199 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/terms/{{Term Id}}',9336 + CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}', 9200 9200 CURLOPT_RETURNTRANSFER => true, 9201 9201 CURLOPT_ENCODING => '', 9202 9202 CURLOPT_MAXREDIRS => 10, ... ... @@ -9277,7 +9277,7 @@ 9277 9277 $curl = curl_init(); 9278 9278 9279 9279 curl_setopt_array($curl, array( 9280 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/terms/lookup?Name={{Term Name}}9417 + CURLOPT_URL => 'https://api.onecount.net/v2/terms/lookup?Name={{Term Name}}', 9281 9281 CURLOPT_RETURNTRANSFER => true, 9282 9282 CURLOPT_ENCODING => '', 9283 9283 CURLOPT_MAXREDIRS => 10, ... ... @@ -9300,20 +9300,199 @@ 9300 9300 9301 9301 (% style="color: rgb(107,107,107);" %)Response 200 OK 9302 9302 9303 -{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"/}} 9440 +{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"}} 9441 +{ 9442 + "result": { 9443 + "success": "1", 9444 + "error": { 9445 + "code": "", 9446 + "message": "" 9447 + } 9448 + }, 9449 + "Terms": [ 9450 + { 9451 + "Id": 431, 9452 + "Name": "Test term for API 1", 9453 + "Description": null, 9454 + "Duration": 0, 9455 + "DurationUnit": "", 9456 + "Price": "0.00", 9457 + "ProductId": 599 9458 + } 9459 + ] 9460 +} 9461 +{{/code}} 9304 9304 9305 9305 \\ 9306 9306 9465 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9466 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Term(%%) == 9467 + 9468 +---- 9469 + 9470 +{{panel bgColor="#D3D3D3" width="100%"}} 9471 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms 9472 +{{/panel}} 9473 + 9474 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9475 + 9476 +---- 9477 + 9478 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 9479 + 9480 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9481 + 9482 +---- 9483 + 9484 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 9485 +{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9486 +{{/code}} 9487 + 9488 +==== Example ==== 9489 + 9490 +---- 9491 + 9492 +(% style="color: rgb(107,107,107);" %)Request 9493 + 9494 +{{code language="php" theme="RDark" title="Create Term Request" collapse="true"}} 9495 +<?php 9496 + 9497 +$curl = curl_init(); 9498 + 9499 +curl_setopt_array($curl, array( 9500 + CURLOPT_URL => 'https://api.onecount.net/v2/terms', 9501 + CURLOPT_RETURNTRANSFER => true, 9502 + CURLOPT_ENCODING => '', 9503 + CURLOPT_MAXREDIRS => 10, 9504 + CURLOPT_TIMEOUT => 0, 9505 + CURLOPT_FOLLOWLOCATION => true, 9506 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9507 + CURLOPT_CUSTOMREQUEST => 'POST', 9508 + CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9509 + 9510 +', 9511 + CURLOPT_HTTPHEADER => array( 9512 + 'Appkey: {{ONECOUNT API KEY}}' 9513 + ), 9514 +)); 9515 + 9516 +$response = curl_exec($curl); 9517 + 9518 +curl_close($curl); 9519 +echo $response; 9520 + 9521 + 9522 +{{/code}} 9523 + 9307 9307 \\ 9308 9308 9526 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9527 + 9528 +{{code language="yml" theme="RDark" title="Create Term Response" collapse="true"}} 9529 +{ 9530 + "result": { 9531 + "success": "1", 9532 + "error": { 9533 + "code": "", 9534 + "message": "" 9535 + } 9536 + }, 9537 + "Terms": [ 9538 + { 9539 + "Id": 447 9540 + } 9541 + ] 9542 +} 9543 +{{/code}} 9544 + 9309 9309 \\ 9310 9310 9547 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9548 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Term(%%) == 9549 + 9550 +---- 9551 + 9552 +{{panel bgColor="#D3D3D3" width="100%"}} 9553 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms/~{~{Term Id}} 9554 +{{/panel}} 9555 + 9556 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9557 + 9558 +---- 9559 + 9560 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 9561 + 9562 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9563 + 9564 +---- 9565 + 9566 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 9567 +{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599} 9568 +{{/code}} 9569 + 9570 +==== Example ==== 9571 + 9572 +---- 9573 + 9574 +(% style="color: rgb(107,107,107);" %)Request 9575 + 9576 +{{code language="php" theme="RDark" title="Update Term Request" collapse="true"}} 9577 + <?php 9578 + 9579 +$curl = curl_init(); 9580 + 9581 +curl_setopt_array($curl, array( 9582 + CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}', 9583 + CURLOPT_RETURNTRANSFER => true, 9584 + CURLOPT_ENCODING => '', 9585 + CURLOPT_MAXREDIRS => 10, 9586 + CURLOPT_TIMEOUT => 0, 9587 + CURLOPT_FOLLOWLOCATION => true, 9588 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9589 + CURLOPT_CUSTOMREQUEST => 'PUT', 9590 + CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}', 9591 + CURLOPT_HTTPHEADER => array( 9592 + 'Appkey: {{ONECOUNT API KEY}}' 9593 + ), 9594 +)); 9595 + 9596 +$response = curl_exec($curl); 9597 + 9598 +curl_close($curl); 9599 +echo $response; 9600 +{{/code}} 9601 + 9311 9311 \\ 9312 9312 9604 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9605 + 9606 +{{code language="yml" theme="RDark" title="Update Term Response" collapse="true"}} 9607 + { 9608 + "result": { 9609 + "success": "1", 9610 + "error": { 9611 + "code": "", 9612 + "message": "" 9613 + } 9614 + }, 9615 + "Terms": [ 9616 + { 9617 + "Id": 447, 9618 + "Name": "Test API term creation update", 9619 + "Description": "Test API term creation update", 9620 + "Duration": 10, 9621 + "DurationUnit": "", 9622 + "Price": "0.00", 9623 + "ProductId": 599 9624 + } 9625 + ] 9626 +} 9627 +{{/code}} 9628 + 9313 9313 \\ 9314 9314 9315 9315 (% class="western" %) 9316 -**COMPONENT: Resources** 9632 +=== **COMPONENT: Resources** === 9317 9317 9318 9318 (% class="western" %) 9319 9319 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. ... ... @@ -9451,7 +9451,7 @@ 9451 9451 $curl = curl_init(); 9452 9452 9453 9453 curl_setopt_array($curl, array( 9454 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/resources?limit=10',9770 + CURLOPT_URL => 'https://api.onecount.net/v2/resources', 9455 9455 CURLOPT_RETURNTRANSFER => true, 9456 9456 CURLOPT_ENCODING => '', 9457 9457 CURLOPT_MAXREDIRS => 10, ... ... @@ -9597,7 +9597,7 @@ 9597 9597 $curl = curl_init(); 9598 9598 9599 9599 curl_setopt_array($curl, array( 9600 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/resources/{{Resource ID}}',9916 + CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{Resource ID}}', 9601 9601 CURLOPT_RETURNTRANSFER => true, 9602 9602 CURLOPT_ENCODING => '', 9603 9603 CURLOPT_MAXREDIRS => 10, ... ... @@ -9650,7 +9650,7 @@ 9650 9650 ---- 9651 9651 9652 9652 {{panel bgColor="#D3D3D3" width="100%"}} 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,49969 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources/lookup?Name={(%%){Resource Name}} 9654 9654 {{/panel}} 9655 9655 9656 9656 === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === ... ... @@ -9663,8 +9663,7 @@ 9663 9663 9664 9664 ---- 9665 9665 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 9982 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Name (% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" style="color: rgb(33, 33, 33); color: rgb(33, 33, 33)" %){(% style="color: rgb(33,33,33);" class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" %){Resource Name}} 9668 9668 9669 9669 ==== Example ==== 9670 9670 ... ... @@ -9672,30 +9672,237 @@ 9672 9672 9673 9673 (% style="color: rgb(107,107,107);" %)Request 9674 9674 9675 -{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}} 9990 +{{code language="php" theme="RDark" title="Lookup Resource Request" collapse="true"}} 9991 + <?php 9676 9676 9993 +$curl = curl_init(); 9994 + 9995 +curl_setopt_array($curl, array( 9996 + CURLOPT_URL => 'https://api.onecount.net/v2/resources/lookup?Name={{Resource Name}}', 9997 + CURLOPT_RETURNTRANSFER => true, 9998 + CURLOPT_ENCODING => '', 9999 + CURLOPT_MAXREDIRS => 10, 10000 + CURLOPT_TIMEOUT => 0, 10001 + CURLOPT_FOLLOWLOCATION => true, 10002 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10003 + CURLOPT_CUSTOMREQUEST => 'GET', 10004 + CURLOPT_HTTPHEADER => array( 10005 + 'Appkey: {{ONECOUNT API KEY}}' 10006 + ), 10007 +)); 10008 + 10009 +$response = curl_exec($curl); 10010 + 10011 +curl_close($curl); 10012 +echo $response; 10013 +{{/code}} 10014 + 9677 9677 \\ 9678 9678 9679 9679 (% style="color: rgb(107,107,107);" %)Response 200 OK 9680 9680 9681 -{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}} 10019 +{{code language="yml" theme="RDark" title="Lookup Resource Response" collapse="true"}} 10020 + { 10021 + "result": { 10022 + "success": "1", 10023 + "error": { 10024 + "code": "", 10025 + "message": "" 10026 + } 10027 + }, 10028 + "Resources": [ 10029 + { 10030 + "Id": 479, 10031 + "Name": "Virtualization Review", 10032 + "Description": "", 10033 + "Type": "0", 10034 + "Value": "", 10035 + "FreePass": 0 10036 + } 10037 + ] 10038 +} 10039 +{{/code}} 9682 9682 9683 9683 \\ 9684 9684 9685 -\\ 10043 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10044 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Resource(%%) == 9686 9686 10046 +---- 10047 + 10048 +{{panel bgColor="#D3D3D3" width="100%"}} 10049 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources 10050 +{{/panel}} 10051 + 10052 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10053 + 10054 +---- 10055 + 10056 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 10057 + 10058 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10059 + 10060 +---- 10061 + 10062 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10063 +{"Name":"Test API product creation 22","Description":"Test API product creation 22","Type":3,"FreePass":1,"Value":["http://one-count.com"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1} 10064 +{{/code}} 10065 + 10066 +==== Example ==== 10067 + 10068 +---- 10069 + 10070 +(% style="color: rgb(107,107,107);" %)Request 10071 + 10072 +{{code language="php" theme="RDark" title="Create Resource Request" collapse="true"}} 10073 + <?php 10074 + 10075 +$curl = curl_init(); 10076 + 10077 +curl_setopt_array($curl, array( 10078 + CURLOPT_URL => 'https://api.onecount.net/v2/resources', 10079 + CURLOPT_RETURNTRANSFER => true, 10080 + CURLOPT_ENCODING => '', 10081 + CURLOPT_MAXREDIRS => 10, 10082 + CURLOPT_TIMEOUT => 0, 10083 + CURLOPT_FOLLOWLOCATION => true, 10084 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10085 + CURLOPT_CUSTOMREQUEST => 'POST', 10086 + CURLOPT_POSTFIELDS =>'{"Name":"Test API product creation 21","Description":"Test API product creation 21","Type":3,"FreePass":1,"Value":["http://one-count.com"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}', 10087 + CURLOPT_HTTPHEADER => array( 10088 + 'Appkey: {{ONECOUNT API KEY}}' 10089 + ), 10090 +)); 10091 + 10092 +$response = curl_exec($curl); 10093 + 10094 +curl_close($curl); 10095 +echo $response; 10096 +{{/code}} 10097 + 9687 9687 \\ 9688 9688 10100 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10101 + 10102 +{{code language="yml" theme="RDark" title="Create Resource Response" collapse="true"}} 10103 + { 10104 + "result": { 10105 + "success": "1", 10106 + "error": { 10107 + "code": "", 10108 + "message": "" 10109 + } 10110 + }, 10111 + "Resources": [ 10112 + { 10113 + "Id": 871, 10114 + "Name": "Test API product creation 21", 10115 + "Description": "Test API product creation 21", 10116 + "Type": "3", 10117 + "Value": "http://one-count.com", 10118 + "FreePass": 1 10119 + } 10120 + ] 10121 +} 10122 +{{/code}} 10123 + 9689 9689 \\ 9690 9690 10126 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10127 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Resource(%%) == 10128 + 10129 +---- 10130 + 10131 +{{panel bgColor="#D3D3D3" width="100%"}} 10132 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources/~{~{resource id}} 10133 +{{/panel}} 10134 + 10135 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10136 + 10137 +---- 10138 + 10139 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 10140 + 10141 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10142 + 10143 +---- 10144 + 10145 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10146 +{"Name":"Test API product creation 23","Description":"Test API product creation 23","Type":3,"FreePass":1,"Value":["http://one-count.com","onecount.net"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1} 10147 +{{/code}} 10148 + 10149 +==== Example ==== 10150 + 10151 +---- 10152 + 10153 +(% style="color: rgb(107,107,107);" %)Request 10154 + 10155 +{{code language="php" theme="RDark" title="Update Resource Request" collapse="true"}} 10156 + <?php 10157 + 10158 +$curl = curl_init(); 10159 + 10160 +curl_setopt_array($curl, array( 10161 + CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{resource id}}', 10162 + CURLOPT_RETURNTRANSFER => true, 10163 + CURLOPT_ENCODING => '', 10164 + CURLOPT_MAXREDIRS => 10, 10165 + CURLOPT_TIMEOUT => 0, 10166 + CURLOPT_FOLLOWLOCATION => true, 10167 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10168 + CURLOPT_CUSTOMREQUEST => 'PUT', 10169 + CURLOPT_POSTFIELDS =>'{"Name":"Test API product creation 23","Description":"Test API product creation 23","Type":3,"FreePass":1,"Value":["http://one-count.com","onecount.net"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}', 10170 + CURLOPT_HTTPHEADER => array( 10171 + 'Appkey: {{ONECOUNT API KEY}}' 10172 + ), 10173 +)); 10174 + 10175 +$response = curl_exec($curl); 10176 + 10177 +curl_close($curl); 10178 +echo $response; 10179 +{{/code}} 10180 + 9691 9691 \\ 9692 9692 10183 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10184 + 10185 +{{code language="yml" theme="RDark" title="Update Resource Response" collapse="true"}} 10186 + { 10187 + "result": { 10188 + "success": "1", 10189 + "error": { 10190 + "code": "", 10191 + "message": "" 10192 + } 10193 + }, 10194 + "Resources": [ 10195 + { 10196 + "Id": 903, 10197 + "Name": "Test API product creation 23", 10198 + "Description": "Test API product creation 23", 10199 + "Type": "3", 10200 + "Value": "http://one-count.com", 10201 + "FreePass": 1 10202 + }, 10203 + { 10204 + "Id": 903, 10205 + "Name": "Test API product creation 23", 10206 + "Description": "Test API product creation 23", 10207 + "Type": "3", 10208 + "Value": "onecount.net", 10209 + "FreePass": 1 10210 + } 10211 + ] 10212 +} 10213 +{{/code}} 10214 + 9693 9693 (% class="western" %) 9694 9694 \\ 9695 9695 9696 9696 (% class="western" %) 9697 -**COMPONENT: Source Codes 9698 -** 10219 +=== **COMPONENT: Source Codes 10220 +** === 9699 9699 9700 9700 (% class="western" %) 9701 9701 This resource is for manipulating source code for a resource. A source code can be created, updated or searched. ... ... @@ -9798,7 +9798,7 @@ 9798 9798 $curl = curl_init(); 9799 9799 9800 9800 curl_setopt_array($curl, array( 9801 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/sources',10323 + CURLOPT_URL => 'https://api.onecount.net/v2/sources', 9802 9802 CURLOPT_RETURNTRANSFER => true, 9803 9803 CURLOPT_ENCODING => '', 9804 9804 CURLOPT_MAXREDIRS => 10, ... ... @@ -10014,7 +10014,7 @@ 10014 10014 $curl = curl_init(); 10015 10015 10016 10016 curl_setopt_array($curl, array( 10017 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/sources/{{source code id}}',10539 + CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}', 10018 10018 CURLOPT_RETURNTRANSFER => true, 10019 10019 CURLOPT_ENCODING => '', 10020 10020 CURLOPT_MAXREDIRS => 10, ... ... @@ -10065,7 +10065,7 @@ 10065 10065 ---- 10066 10066 10067 10067 {{panel bgColor="#D3D3D3" width="100%"}} 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,410590 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources/lookup?Source={(%%){Source code Name}} 10069 10069 {{/panel}} 10070 10070 10071 10071 === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === ... ... @@ -10078,8 +10078,7 @@ 10078 10078 10079 10079 ---- 10080 10080 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 10603 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Source (% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" style="color: rgb(33, 33, 33); color: rgb(33, 33, 33)" %){(% style="color: rgb(33,33,33);" class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" %){Source code Name}} 10083 10083 10084 10084 ==== Example ==== 10085 10085 ... ... @@ -10087,27 +10087,222 @@ 10087 10087 10088 10088 (% style="color: rgb(107,107,107);" %)Request 10089 10089 10090 -{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}} 10611 +{{code language="php" theme="RDark" title="Lookup Source code Request" collapse="true"}} 10612 + <?php 10091 10091 10614 +$curl = curl_init(); 10615 + 10616 +curl_setopt_array($curl, array( 10617 + CURLOPT_URL => 'https://api.onecount.net/v2/sources/lookup?Source={{Source code Name}}', 10618 + CURLOPT_RETURNTRANSFER => true, 10619 + CURLOPT_ENCODING => '', 10620 + CURLOPT_MAXREDIRS => 10, 10621 + CURLOPT_TIMEOUT => 0, 10622 + CURLOPT_FOLLOWLOCATION => true, 10623 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10624 + CURLOPT_CUSTOMREQUEST => 'GET', 10625 + CURLOPT_HTTPHEADER => array( 10626 + 'Appkey: {{ONECOUNT API KEY}}' 10627 + ), 10628 +)); 10629 + 10630 +$response = curl_exec($curl); 10631 + 10632 +curl_close($curl); 10633 +echo $response; 10634 +{{/code}} 10635 + 10092 10092 \\ 10093 10093 10094 10094 (% style="color: rgb(107,107,107);" %)Response 200 OK 10095 10095 10096 -{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}} 10640 +{{code language="yml" theme="RDark" title="Lookup Source code Response" collapse="true"}} 10641 + { 10642 + "result": { 10643 + "success": "1", 10644 + "error": { 10645 + "code": "", 10646 + "message": "" 10647 + } 10648 + }, 10649 + "Sources": [ 10650 + { 10651 + "Id": 26, 10652 + "Source": "GCN-Member", 10653 + "Description": "Uploaded from Reston VA", 10654 + "Parent": 0 10655 + } 10656 + ] 10657 +} 10658 +{{/code}} 10097 10097 10098 10098 \\ 10099 10099 10662 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10663 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Source code(%%) == 10664 + 10665 +---- 10666 + 10667 +{{panel bgColor="#D3D3D3" width="100%"}} 10668 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources 10669 +{{/panel}} 10670 + 10671 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10672 + 10673 +---- 10674 + 10675 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 10676 + 10677 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10678 + 10679 +---- 10680 + 10681 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10682 +{"Source":"Test source code from API"} 10683 +{{/code}} 10684 + 10685 +==== Example ==== 10686 + 10687 +---- 10688 + 10689 +(% style="color: rgb(107,107,107);" %)Request 10690 + 10691 +{{code language="php" theme="RDark" title="Create Source code Request" collapse="true"}} 10692 + <?php 10693 + 10694 +$curl = curl_init(); 10695 + 10696 +curl_setopt_array($curl, array( 10697 + CURLOPT_URL => 'https://api.onecount.net/v2/sources', 10698 + CURLOPT_RETURNTRANSFER => true, 10699 + CURLOPT_ENCODING => '', 10700 + CURLOPT_MAXREDIRS => 10, 10701 + CURLOPT_TIMEOUT => 0, 10702 + CURLOPT_FOLLOWLOCATION => true, 10703 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10704 + CURLOPT_CUSTOMREQUEST => 'POST', 10705 + CURLOPT_POSTFIELDS =>'{"Source":"Test source code from API"}', 10706 + CURLOPT_HTTPHEADER => array( 10707 + 'Appkey: {{ONECOUNT API KEY}}' 10708 + ), 10709 +)); 10710 + 10711 +$response = curl_exec($curl); 10712 + 10713 +curl_close($curl); 10714 +echo $response; 10715 +{{/code}} 10716 + 10100 10100 \\ 10101 10101 10719 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10720 + 10721 +{{code language="yml" theme="RDark" title="Create Source code Response" collapse="true"}} 10722 + { 10723 + "result": { 10724 + "success": "1", 10725 + "error": { 10726 + "code": "", 10727 + "message": "" 10728 + } 10729 + }, 10730 + "Sources": [ 10731 + { 10732 + "Id": 223, 10733 + "Source": "Test source code from API", 10734 + "Description": "", 10735 + "Parent": 0 10736 + } 10737 + ] 10738 +} 10739 +{{/code}} 10740 + 10102 10102 \\ 10103 10103 10743 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10744 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Source code(%%) == 10745 + 10746 +---- 10747 + 10748 +{{panel bgColor="#D3D3D3" width="100%"}} 10749 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources/~{~{source code id}} 10750 +{{/panel}} 10751 + 10752 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10753 + 10754 +---- 10755 + 10756 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 10757 + 10758 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10759 + 10760 +---- 10761 + 10762 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10763 +{"Source":"Test API","Parent":215} 10764 +{{/code}} 10765 + 10766 +==== Example ==== 10767 + 10768 +---- 10769 + 10770 +(% style="color: rgb(107,107,107);" %)Request 10771 + 10772 +{{code language="php" theme="RDark" title="Update Source code Request" collapse="true"}} 10773 + <?php 10774 + 10775 +$curl = curl_init(); 10776 + 10777 +curl_setopt_array($curl, array( 10778 + CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}', 10779 + CURLOPT_RETURNTRANSFER => true, 10780 + CURLOPT_ENCODING => '', 10781 + CURLOPT_MAXREDIRS => 10, 10782 + CURLOPT_TIMEOUT => 0, 10783 + CURLOPT_FOLLOWLOCATION => true, 10784 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10785 + CURLOPT_CUSTOMREQUEST => 'PUT', 10786 + CURLOPT_POSTFIELDS =>'{"Source":"Test API","Parent":215}', 10787 + CURLOPT_HTTPHEADER => array( 10788 + 'Appkey: {{ONECOUNT API KEY}}' 10789 + ), 10790 +)); 10791 + 10792 +$response = curl_exec($curl); 10793 + 10794 +curl_close($curl); 10795 +echo $response; 10796 +{{/code}} 10797 + 10104 10104 \\ 10105 10105 10800 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10801 + 10802 +{{code language="yml" theme="RDark" title="Update Source code Response" collapse="true"}} 10803 + { 10804 + "result": { 10805 + "success": "1", 10806 + "error": { 10807 + "code": "", 10808 + "message": "" 10809 + } 10810 + }, 10811 + "Sources": [ 10812 + { 10813 + "Id": 223, 10814 + "Source": "Test API", 10815 + "Description": "", 10816 + "Parent": 215 10817 + } 10818 + ] 10819 +} 10820 +{{/code}} 10821 + 10106 10106 (% class="western" %) 10107 10107 \\ 10108 10108 10109 10109 (% class="western" %) 10110 -**COMPONENT: Transactions** 10826 +=== **COMPONENT: Transactions** === 10111 10111 10112 10112 (% class="western" %) 10113 10113 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -10197,7 +10197,7 @@ 10197 10197 $curl = curl_init(); 10198 10198 10199 10199 curl_setopt_array($curl, array( 10200 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/transactions?limit=100',10916 + CURLOPT_URL => 'https://api.onecount.net/v2/transactions', 10201 10201 CURLOPT_RETURNTRANSFER => true, 10202 10202 CURLOPT_ENCODING => '', 10203 10203 CURLOPT_MAXREDIRS => 10, ... ... @@ -11763,7 +11763,7 @@ 11763 11763 $curl = curl_init(); 11764 11764 11765 11765 curl_setopt_array($curl, array( 11766 - CURLOPT_URL => ' rayaan.onecount.net/api/v2/transactions/{{Transaction id}}',12482 + CURLOPT_URL => 'https://api.onecount.net/v2/transactions/{{Transaction id}}', 11767 11767 CURLOPT_RETURNTRANSFER => true, 11768 11768 CURLOPT_ENCODING => '', 11769 11769 CURLOPT_MAXREDIRS => 10, ... ... @@ -11823,7 +11823,7 @@ 11823 11823 ---- 11824 11824 11825 11825 {{panel bgColor="#D3D3D3" width="100%"}} 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,412542 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/transactions/lookup?UserId=~{~{OCID}} 11827 11827 {{/panel}} 11828 11828 11829 11829 === (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === ... ... @@ -11836,8 +11836,7 @@ 11836 11836 11837 11837 ---- 11838 11838 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 12555 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)UserId (% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key nolink" style="color: rgb(33, 33, 33); color: rgb(33, 33, 33)" %)~{~{OCID}} 11841 11841 11842 11842 ==== Example ==== 11843 11843 ... ... @@ -11845,65 +11845,720 @@ 11845 11845 11846 11846 (% style="color: rgb(107,107,107);" %)Request 11847 11847 11848 -{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"/}} 12563 +{{code language="php" theme="RDark" title="Lookup Transaction Request" collapse="true"}} 12564 + <?php 11849 11849 12566 +$curl = curl_init(); 12567 + 12568 +curl_setopt_array($curl, array( 12569 + CURLOPT_URL => 'https://api.onecount.net/v2/transactions/lookup?UserId={{OCID}}', 12570 + CURLOPT_RETURNTRANSFER => true, 12571 + CURLOPT_ENCODING => '', 12572 + CURLOPT_MAXREDIRS => 10, 12573 + CURLOPT_TIMEOUT => 0, 12574 + CURLOPT_FOLLOWLOCATION => true, 12575 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 12576 + CURLOPT_CUSTOMREQUEST => 'GET', 12577 + CURLOPT_HTTPHEADER => array( 12578 + 'Appkey: {{ONECOUNT API KEY}}' 12579 + ), 12580 +)); 12581 + 12582 +$response = curl_exec($curl); 12583 + 12584 +curl_close($curl); 12585 +echo $response; 12586 +{{/code}} 12587 + 11850 11850 \\ 11851 11851 11852 11852 (% style="color: rgb(107,107,107);" %)Response 200 OK 11853 11853 11854 -{{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"/}} 12592 +{{code language="yml" theme="RDark" title="Lookup Transaction Response" collapse="true"}} 12593 + { 12594 + "result": { 12595 + "success": "1", 12596 + "error": { 12597 + "code": "", 12598 + "message": "" 12599 + } 12600 + }, 12601 + "Transactions": [ 12602 + { 12603 + "Id": 52494786, 12604 + "UserId": 1234, 12605 + "TermId": 34, 12606 + "TransactionDate": "2016-01-19", 12607 + "TransactionTime": "15:30:04", 12608 + "RequestDate": "2016-01-19", 12609 + "UserIP": "12.226.247.2", 12610 + "SubscriptionType": "u", 12611 + "ProductId": 34, 12612 + "Source": 0, 12613 + "ProductStatus": 0, 12614 + "MediaFilePath": "", 12615 + "Amount": "" 12616 + }, 12617 + { 12618 + "Id": 42654041, 12619 + "UserId": 1234, 12620 + "TermId": 34, 12621 + "TransactionDate": "2015-09-09", 12622 + "TransactionTime": "11:20:39", 12623 + "RequestDate": "2015-09-09", 12624 + "UserIP": "24.187.236.98", 12625 + "SubscriptionType": "n", 12626 + "ProductId": 34, 12627 + "Source": 0, 12628 + "ProductStatus": 2, 12629 + "MediaFilePath": "", 12630 + "Amount": "" 12631 + }, 12632 + { 12633 + "Id": 97251022, 12634 + "UserId": 1234, 12635 + "TermId": 34, 12636 + "TransactionDate": "2015-06-04", 12637 + "TransactionTime": "14:59:42", 12638 + "RequestDate": "2015-06-04", 12639 + "UserIP": "12.226.247.2", 12640 + "SubscriptionType": "u", 12641 + "ProductId": 34, 12642 + "Source": 0, 12643 + "ProductStatus": 0, 12644 + "MediaFilePath": "", 12645 + "Amount": "" 12646 + }, 12647 + { 12648 + "Id": 55492559, 12649 + "UserId": 1234, 12650 + "TermId": 34, 12651 + "TransactionDate": "2015-04-03", 12652 + "TransactionTime": "16:32:04", 12653 + "RequestDate": "2015-04-03", 12654 + "UserIP": "24.187.236.98", 12655 + "SubscriptionType": "r", 12656 + "ProductId": 34, 12657 + "Source": 58, 12658 + "ProductStatus": 106, 12659 + "MediaFilePath": "", 12660 + "Amount": "" 12661 + }, 12662 + { 12663 + "Id": 98173391, 12664 + "UserId": 1234, 12665 + "TermId": 34, 12666 + "TransactionDate": "2015-04-03", 12667 + "TransactionTime": "15:50:45", 12668 + "RequestDate": "2014-08-19", 12669 + "UserIP": "24.187.236.98", 12670 + "SubscriptionType": "n", 12671 + "ProductId": 34, 12672 + "Source": 34, 12673 + "ProductStatus": 106, 12674 + "MediaFilePath": "", 12675 + "Amount": "" 12676 + }, 12677 + { 12678 + "Id": 91711793, 12679 + "UserId": 1234, 12680 + "TermId": 18, 12681 + "TransactionDate": "2015-04-27", 12682 + "TransactionTime": "14:24:51", 12683 + "RequestDate": "2015-04-27", 12684 + "UserIP": "24.187.236.98", 12685 + "SubscriptionType": "u", 12686 + "ProductId": 18, 12687 + "Source": 0, 12688 + "ProductStatus": 106, 12689 + "MediaFilePath": "", 12690 + "Amount": "" 12691 + }, 12692 + { 12693 + "Id": 74936400, 12694 + "UserId": 1234, 12695 + "TermId": 18, 12696 + "TransactionDate": "2015-04-27", 12697 + "TransactionTime": "12:35:18", 12698 + "RequestDate": "2015-04-27", 12699 + "UserIP": "68.196.187.74", 12700 + "SubscriptionType": "n", 12701 + "ProductId": 18, 12702 + "Source": 34, 12703 + "ProductStatus": 106, 12704 + "MediaFilePath": "", 12705 + "Amount": "" 12706 + }, 12707 + { 12708 + "Id": 21664714, 12709 + "UserId": 1234, 12710 + "TermId": 18, 12711 + "TransactionDate": "2015-04-03", 12712 + "TransactionTime": "15:50:46", 12713 + "RequestDate": "2015-04-03", 12714 + "UserIP": "24.187.236.98", 12715 + "SubscriptionType": "u", 12716 + "ProductId": 18, 12717 + "Source": 0, 12718 + "ProductStatus": 2, 12719 + "MediaFilePath": "", 12720 + "Amount": "" 12721 + }, 12722 + { 12723 + "Id": 81129263, 12724 + "UserId": 1234, 12725 + "TermId": 18, 12726 + "TransactionDate": "2014-08-19", 12727 + "TransactionTime": "11:18:55", 12728 + "RequestDate": "2014-08-19", 12729 + "UserIP": "74.201.38.1", 12730 + "SubscriptionType": "n", 12731 + "ProductId": 18, 12732 + "Source": 34, 12733 + "ProductStatus": 2, 12734 + "MediaFilePath": "", 12735 + "Amount": "" 12736 + }, 12737 + { 12738 + "Id": 30461748, 12739 + "UserId": 1234, 12740 + "ResourceId": 459, 12741 + "TransactionDate": "2023-03-15", 12742 + "TransactionTime": "12:07:55", 12743 + "RequestDate": "2023-03-15", 12744 + "UserIP": "74.201.38.12", 12745 + "SubscriptionType": "n", 12746 + "SourceCode": 0, 12747 + "ProductStatus": 0, 12748 + "MediaFilePath": "", 12749 + "Amount": "" 12750 + }, 12751 + { 12752 + "Id": 25858253, 12753 + "UserId": 1234, 12754 + "ResourceId": 451, 12755 + "TransactionDate": "2023-03-15", 12756 + "TransactionTime": "11:45:19", 12757 + "RequestDate": "2023-03-15", 12758 + "UserIP": "74.201.38.12", 12759 + "SubscriptionType": "n", 12760 + "SourceCode": 0, 12761 + "ProductStatus": 0, 12762 + "MediaFilePath": "", 12763 + "Amount": "" 12764 + }, 12765 + { 12766 + "Id": 69453260, 12767 + "UserId": 1234, 12768 + "ResourceId": 411, 12769 + "TransactionDate": "2022-06-07", 12770 + "TransactionTime": "17:03:14", 12771 + "RequestDate": "2022-06-07", 12772 + "UserIP": "74.201.38.12", 12773 + "SubscriptionType": "n", 12774 + "SourceCode": 0, 12775 + "ProductStatus": 0, 12776 + "MediaFilePath": "", 12777 + "Amount": "" 12778 + }, 12779 + { 12780 + "Id": 51354425, 12781 + "UserId": 1234, 12782 + "ResourceId": 355, 12783 + "TransactionDate": "2020-04-06", 12784 + "TransactionTime": "12:24:08", 12785 + "RequestDate": "2020-04-06", 12786 + "UserIP": "74.201.38.12", 12787 + "SubscriptionType": "n", 12788 + "SourceCode": 0, 12789 + "ProductStatus": 0, 12790 + "MediaFilePath": "", 12791 + "Amount": "" 12792 + } 12793 + ] 12794 +} 12795 +{{/code}} 11855 11855 11856 11856 \\ 11857 11857 11858 -\\ 12799 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12800 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Transaction(%%) == 11859 11859 11860 - \\12802 +---- 11861 11861 11862 -\\ 12804 +{{panel bgColor="#D3D3D3" width="100%"}} 12805 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/transactions 12806 +{{/panel}} 11863 11863 11864 - \\12808 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 11865 11865 11866 - \\12810 +---- 11867 11867 11868 - \\12812 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 11869 11869 11870 - \\12814 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 11871 11871 11872 - \\12816 +---- 11873 11873 11874 -\\ 12818 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 12819 +{"UserId": 1845775,"TermId":447 ,"UserIP":"192.168.0.1" ,"SubscriptionType":"n" , "ProductId":599 ,"FormId": "8f93834c-adce-4dc7-acd0-f3a1e0f7c63f","Source": 83,"ProductStatus": 2,"Amount":"0.00" ,"PaypalTransId":"" , "MediaFilePath":"" ,"Remarks": "USER SUBSCRIBED","BatchId":"1234" ,"Quantity": 1, "ExpireDate":"20251211" } 12820 +{{/code}} 11875 11875 11876 - \\12822 +==== Example ==== 11877 11877 11878 - \\12824 +---- 11879 11879 11880 - \\12826 +(% style="color: rgb(107,107,107);" %)Request 11881 11881 11882 -\\ 12828 +{{code language="php" theme="RDark" title="Create Transaction Request" collapse="true"}} 12829 + <?php 11883 11883 11884 - \\12831 +$curl = curl_init(); 11885 11885 11886 -\\ 12833 +curl_setopt_array($curl, array( 12834 + CURLOPT_URL => 'https://api.onecount.net/v2/transactions', 12835 + CURLOPT_RETURNTRANSFER => true, 12836 + CURLOPT_ENCODING => '', 12837 + CURLOPT_MAXREDIRS => 10, 12838 + CURLOPT_TIMEOUT => 0, 12839 + CURLOPT_FOLLOWLOCATION => true, 12840 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 12841 + CURLOPT_CUSTOMREQUEST => 'POST', 12842 + CURLOPT_POSTFIELDS =>'{"UserId": 1845775,"TermId":447 ,"UserIP":"192.168.0.1" ,"SubscriptionType":"n" , "ProductId":599 ,"FormId": "8f93834c-adce-4dc7-acd0-f3a1e0f7c63f","Source": 83,"ProductStatus": 2,"Amount":"0.00" ,"PaypalTransId":"" , "MediaFilePath":"" ,"Remarks": "USER SUBSCRIBED","BatchId":"1234" ,"Quantity": 1, "ExpireDate":"20251211" }', 12843 + CURLOPT_HTTPHEADER => array( 12844 + 'Appkey: {{ONECOUNT API KEY}}' 12845 + ), 12846 +)); 11887 11887 12848 +$response = curl_exec($curl); 12849 + 12850 +curl_close($curl); 12851 +echo $response; 12852 +{{/code}} 12853 + 11888 11888 \\ 11889 11889 12856 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12857 + 12858 +{{code language="yml" theme="RDark" title="Create Transaction Response" collapse="true"}} 12859 + { 12860 + "result": { 12861 + "success": "1", 12862 + "error": { 12863 + "code": "", 12864 + "message": "" 12865 + } 12866 + }, 12867 + "Transactions": { 12868 + "Id": "1234", 12869 + "UserId": 1845775, 12870 + "TermId": 447, 12871 + "TransactionDate": "20231211", 12872 + "TransactionTime": "09:34:26", 12873 + "RequestDate": "20231211", 12874 + "UserIP": "192.168.0.1", 12875 + "SubscriptionType": "n", 12876 + "ProductId": 599, 12877 + "Source": 83, 12878 + "ProductStatus": 2, 12879 + "MediaFilePath": "", 12880 + "Amount": "0.00" 12881 + } 12882 +} 12883 +{{/code}} 12884 + 11890 11890 \\ 11891 11891 12887 +=== **COMPONENT: Engagements** === 12888 + 12889 +(% class="western" %) 12890 +Engagement can be added, updated and searched for using the engagements resource from the api. 12891 + 12892 +(% class="western" %) 11892 11892 \\ 11893 11893 12895 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12896 +((( 12897 +(% class="western" %) 12898 +**Method** 12899 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12900 +((( 12901 +(% class="western" %) 12902 +**Url** 12903 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12904 +((( 12905 +(% class="western" %) 12906 +**Action** 12907 +))) 12908 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12909 +((( 12910 +(% class="western" %) 12911 +GET 12912 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12913 +((( 12914 +(% class="western" %) 12915 +/(% style="color: rgb(33,33,33);" %)engagements 12916 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12917 +((( 12918 +(% class="western" %) 12919 +Get engagement data limiting 25. 12920 +))) 12921 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12922 +((( 12923 +(% class="western" %) 12924 +GET 12925 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12926 +((( 12927 +(% class="western" %) 12928 +/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id> 12929 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12930 +((( 12931 +(% class="western" %) 12932 +Get data for engagement id. The engagement id is a string 12933 +))) 12934 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12935 +((( 12936 +(% class="western" %) 12937 +POST 12938 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12939 +((( 12940 +(% class="western" %) 12941 +/(% style="color: rgb(33,33,33);" %)engagements 12942 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12943 +((( 12944 +(% class="western" %) 12945 +Create a new engagement 12946 + 12947 +(% class="western" %) 12948 +Parameters required to create the engagement needs to be sent as post data in JSON format. 12949 +))) 12950 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12951 +((( 12952 +(% class="western" %) 12953 +PUT 12954 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12955 +((( 12956 +(% class="western" %) 12957 +/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id> 12958 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12959 +((( 12960 +(% class="western" %) 12961 +Update engagement by engagement id. The engagement id string 12962 + 12963 +(% class="western" %) 12964 +Parameters required to update the engagement needs to be sent as post data in JSON format. 12965 +))) 12966 +|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12967 +((( 12968 +(% class="western" %) 12969 +POST 12970 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12971 +((( 12972 +(% class="western" %) 12973 +(% style="color: rgb(33,33,33);" %)/engagements/addUser 12974 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12975 +((( 12976 +(% class="western" %) 12977 +Add user to engagement 12978 + 12979 +(% class="western" %) 12980 +Parameters required to add user to the engagement needs to be sent as post data in JSON format. 12981 +))) 12982 + 11894 11894 \\ 11895 11895 12985 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12986 +== (% 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(%%) == 12987 + 12988 +---- 12989 + 12990 +---- 12991 + 12992 +{{panel bgColor="#D3D3D3" width="100%"}} 12993 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements 12994 +{{/panel}} 12995 + 12996 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 12997 + 12998 +---- 12999 + 13000 +(% 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}} 13001 + 13002 +==== Example ==== 13003 + 13004 +---- 13005 + 13006 +(% style="color: rgb(107,107,107);" %)Request 13007 + 13008 +{{code language="php" theme="RDark" title="Get All Engagement Request" collapse="true"}} 13009 +<?php 13010 + 13011 +$curl = curl_init(); 13012 + 13013 +curl_setopt_array($curl, array( 13014 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements', 13015 + CURLOPT_RETURNTRANSFER => true, 13016 + CURLOPT_ENCODING => '', 13017 + CURLOPT_MAXREDIRS => 10, 13018 + CURLOPT_TIMEOUT => 0, 13019 + CURLOPT_FOLLOWLOCATION => true, 13020 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13021 + CURLOPT_CUSTOMREQUEST => 'GET', 13022 + CURLOPT_HTTPHEADER => array( 13023 + 'Appkey: {{ONECOUNT API KEY}}' 13024 + ), 13025 +)); 13026 + 13027 +$response = curl_exec($curl); 13028 + 13029 +curl_close($curl); 13030 +echo $response; 13031 + 13032 + 13033 +{{/code}} 13034 + 11896 11896 \\ 11897 11897 13037 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13038 +== (% 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(%%) == 13039 + 13040 +---- 13041 + 13042 +---- 13043 + 13044 +{{panel bgColor="#D3D3D3" width="100%"}} 13045 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement ID}} 13046 +{{/panel}} 13047 + 13048 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13049 + 13050 +---- 13051 + 13052 +(% 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}} 13053 + 13054 +==== Example ==== 13055 + 13056 +---- 13057 + 13058 +(% style="color: rgb(107,107,107);" %)Request 13059 + 13060 +{{code language="php" theme="RDark" title="Get Specific Engagement Request" collapse="true"}} 13061 +<?php 13062 + 13063 +$curl = curl_init(); 13064 + 13065 +curl_setopt_array($curl, array( 13066 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement ID}}', 13067 + CURLOPT_RETURNTRANSFER => true, 13068 + CURLOPT_ENCODING => '', 13069 + CURLOPT_MAXREDIRS => 10, 13070 + CURLOPT_TIMEOUT => 0, 13071 + CURLOPT_FOLLOWLOCATION => true, 13072 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13073 + CURLOPT_CUSTOMREQUEST => 'GET', 13074 + CURLOPT_HTTPHEADER => array( 13075 + 'Appkey: {{ONECOUNT API KEY}}' 13076 + ), 13077 +)); 13078 + 13079 +$response = curl_exec($curl); 13080 + 13081 +curl_close($curl); 13082 +echo $response; 13083 + 13084 + 13085 +{{/code}} 13086 + 11898 11898 \\ 11899 11899 13089 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13090 +== (% 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(%%) == 13091 + 13092 +---- 13093 + 13094 +{{panel bgColor="#D3D3D3" width="100%"}} 13095 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements 13096 +{{/panel}} 13097 + 13098 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13099 + 13100 +---- 13101 + 13102 +(% 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}} 13103 + 13104 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13105 + 13106 +---- 13107 + 13108 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 13109 +{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13110 + {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"}, 13111 + {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"}, 13112 + {"Price":[],"Type": "numeric"}, 13113 + {"Transaction Date":[],"Type": "date"} 13114 +]} 13115 +{{/code}} 13116 + 13117 +==== Example ==== 13118 + 13119 +---- 13120 + 13121 +(% style="color: rgb(107,107,107);" %)Request 13122 + 13123 +{{code language="php" theme="RDark" title="Create Engagement Request" collapse="true"}} 13124 + <?php 13125 + 13126 +$curl = curl_init(); 13127 + 13128 +curl_setopt_array($curl, array( 13129 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements', 13130 + CURLOPT_RETURNTRANSFER => true, 13131 + CURLOPT_ENCODING => '', 13132 + CURLOPT_MAXREDIRS => 10, 13133 + CURLOPT_TIMEOUT => 0, 13134 + CURLOPT_FOLLOWLOCATION => true, 13135 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13136 + CURLOPT_CUSTOMREQUEST => 'POST', 13137 + CURLOPT_POSTFIELDS =>'{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13138 + {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"}, 13139 + {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"}, 13140 + {"Price":[],"Type": "numeric"}, 13141 + {"Transaction Date":[],"Type": "date"} 13142 +]}', 13143 + CURLOPT_HTTPHEADER => array( 13144 + 'Appkey: {{ONECOUNT API KEY}}' 13145 + ), 13146 +)); 13147 + 13148 +$response = curl_exec($curl); 13149 + 13150 +curl_close($curl); 13151 +echo $response; 13152 +{{/code}} 13153 + 11900 11900 \\ 11901 11901 13156 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13157 +== (% 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(%%) == 13158 + 13159 +---- 13160 + 13161 +{{panel bgColor="#D3D3D3" width="100%"}} 13162 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement Id}} 13163 +{{/panel}} 13164 + 13165 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13166 + 13167 +---- 13168 + 13169 +(% 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}} 13170 + 13171 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13172 + 13173 +---- 13174 + 13175 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 13176 +{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13177 + {"Name":[{"webinar ID 5":"Webinar 5"},{"webinar ID 4":"Webinar 4"}],"Type": "select"}, 13178 + {"Price":[],"Type": "text"} 13179 +]} 13180 +{{/code}} 13181 + 13182 +==== Example ==== 13183 + 13184 +---- 13185 + 13186 +(% style="color: rgb(107,107,107);" %)Request 13187 + 13188 +{{code language="php" theme="RDark" title="Update Engagement Request" collapse="true"}} 13189 + <?php 13190 + 13191 +$curl = curl_init(); 13192 + 13193 +curl_setopt_array($curl, array( 13194 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement Id}}', 13195 + CURLOPT_RETURNTRANSFER => true, 13196 + CURLOPT_ENCODING => '', 13197 + CURLOPT_MAXREDIRS => 10, 13198 + CURLOPT_TIMEOUT => 0, 13199 + CURLOPT_FOLLOWLOCATION => true, 13200 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13201 + CURLOPT_CUSTOMREQUEST => 'PUT', 13202 + CURLOPT_POSTFIELDS =>'{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13203 + {"Name":[{"webinar ID 5":"Webinar 5"},{"webinar ID 4":"Webinar 4"}],"Type": "select"}, 13204 + {"Price":[],"Type": "text"} 13205 +]}', 13206 + CURLOPT_HTTPHEADER => array( 13207 + 'Appkey: {{ONECOUNT API KEY}}' 13208 + ), 13209 +)); 13210 + 13211 +$response = curl_exec($curl); 13212 + 13213 +curl_close($curl); 13214 +echo $response; 13215 +{{/code}} 13216 + 11902 11902 \\ 11903 11903 13219 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13220 +== (% 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(%%) == 13221 + 13222 +---- 13223 + 13224 +{{panel bgColor="#D3D3D3" width="100%"}} 13225 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/addUser 13226 +{{/panel}} 13227 + 13228 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13229 + 13230 +---- 13231 + 13232 +(% 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}} 13233 + 13234 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13235 + 13236 +---- 13237 + 13238 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 13239 +{"Engagement id":"073b3a98-129b-440e-90b1-57957215ca67","Vendor id":1, "Engagement show id":"webinar ID 4","User id":"3143231","timestamp":1702319997, "data":{"Attendance Status":"not_attended","Price":10.00},"segment":["segment id 1"]} 13240 +{{/code}} 13241 + 13242 +==== Example ==== 13243 + 13244 +---- 13245 + 13246 +(% style="color: rgb(107,107,107);" %)Request 13247 + 13248 +{{code language="php" theme="RDark" title="Add User to Engagement Request" collapse="true"}} 13249 + <?php 13250 + 13251 +$curl = curl_init(); 13252 + 13253 +curl_setopt_array($curl, array( 13254 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/addUser', 13255 + CURLOPT_RETURNTRANSFER => true, 13256 + CURLOPT_ENCODING => '', 13257 + CURLOPT_MAXREDIRS => 10, 13258 + CURLOPT_TIMEOUT => 0, 13259 + CURLOPT_FOLLOWLOCATION => true, 13260 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13261 + CURLOPT_CUSTOMREQUEST => 'POST', 13262 + CURLOPT_POSTFIELDS =>'{"Engagement id":"073b3a98-129b-440e-90b1-57957215ca67","Vendor id":1, "Engagement show id":"webinar ID 4","User id":"3143231","timestamp":1702319997, "data":{"Attendance Status":"not_attended","Price":10.00},"segment":["segment id 1"]}', 13263 + CURLOPT_HTTPHEADER => array( 13264 + 'Appkey: {{ONECOUNT API KEY}}' 13265 + ), 13266 +)); 13267 + 13268 +$response = curl_exec($curl); 13269 + 13270 +curl_close($curl); 13271 +echo $response; 13272 +{{/code}} 13273 + 11904 11904 (% class="western" %) 11905 -**COMPONENT: Leads 11906 -** 13275 +=== **COMPONENT: Leads 13276 +** === 11907 11907 11908 11908 (% class="western" %) 11909 11909 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. ... ... @@ -12088,14 +12088,6 @@ 12088 12088 12089 12089 \\ 12090 12090 12091 -\\ 12092 - 12093 -\\ 12094 - 12095 -\\ 12096 - 12097 -\\ 12098 - 12099 12099 (% class="western" %) 12100 12100 **API REFERENCE** 12101 12101
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -10826548 11 +108265485 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/10826548 1/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/108265485/ONEcount API Documentation