Changes for page ONEcount API Documentation
Last modified by Rayaan Ahmed on 2025/02/09 22:20
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, ... ... @@ -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, ... ... @@ -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,104 +8811,165 @@ 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 -\\ 8899 - 8900 -\\ 8901 - 8902 -\\ 8903 - 8904 -\\ 8905 - 8906 -\\ 8907 - 8908 -\\ 8909 - 8910 -\\ 8911 - 8912 8912 (% class="western" %) 8913 8913 **COMPONENT: Terms** 8914 8914 ... ... @@ -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',9081 + 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}}',9264 + 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}}9345 + 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,16 +9300,195 @@ 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"/}} 9368 +{{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"}} 9369 +{ 9370 + "result": { 9371 + "success": "1", 9372 + "error": { 9373 + "code": "", 9374 + "message": "" 9375 + } 9376 + }, 9377 + "Terms": [ 9378 + { 9379 + "Id": 431, 9380 + "Name": "Test term for API 1", 9381 + "Description": null, 9382 + "Duration": 0, 9383 + "DurationUnit": "", 9384 + "Price": "0.00", 9385 + "ProductId": 599 9386 + } 9387 + ] 9388 +} 9389 +{{/code}} 9304 9304 9305 9305 \\ 9306 9306 9393 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9394 +== (% 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(%%) == 9395 + 9396 +---- 9397 + 9398 +{{panel bgColor="#D3D3D3" width="100%"}} 9399 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms 9400 +{{/panel}} 9401 + 9402 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9403 + 9404 +---- 9405 + 9406 +(% 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}} 9407 + 9408 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9409 + 9410 +---- 9411 + 9412 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 9413 +{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9414 +{{/code}} 9415 + 9416 +==== Example ==== 9417 + 9418 +---- 9419 + 9420 +(% style="color: rgb(107,107,107);" %)Request 9421 + 9422 +{{code language="php" theme="RDark" title="Create Term Request" collapse="true"}} 9423 +<?php 9424 + 9425 +$curl = curl_init(); 9426 + 9427 +curl_setopt_array($curl, array( 9428 + CURLOPT_URL => 'https://api.onecount.net/v2/terms', 9429 + CURLOPT_RETURNTRANSFER => true, 9430 + CURLOPT_ENCODING => '', 9431 + CURLOPT_MAXREDIRS => 10, 9432 + CURLOPT_TIMEOUT => 0, 9433 + CURLOPT_FOLLOWLOCATION => true, 9434 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9435 + CURLOPT_CUSTOMREQUEST => 'POST', 9436 + CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9437 + 9438 +', 9439 + CURLOPT_HTTPHEADER => array( 9440 + 'Appkey: {{ONECOUNT API KEY}}' 9441 + ), 9442 +)); 9443 + 9444 +$response = curl_exec($curl); 9445 + 9446 +curl_close($curl); 9447 +echo $response; 9448 + 9449 + 9450 +{{/code}} 9451 + 9307 9307 \\ 9308 9308 9454 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9455 + 9456 +{{code language="yml" theme="RDark" title="Create Term Response" collapse="true"}} 9457 +{ 9458 + "result": { 9459 + "success": "1", 9460 + "error": { 9461 + "code": "", 9462 + "message": "" 9463 + } 9464 + }, 9465 + "Terms": [ 9466 + { 9467 + "Id": 447 9468 + } 9469 + ] 9470 +} 9471 +{{/code}} 9472 + 9309 9309 \\ 9310 9310 9475 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9476 +== (% 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(%%) == 9477 + 9478 +---- 9479 + 9480 +{{panel bgColor="#D3D3D3" width="100%"}} 9481 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/terms/~{~{Term Id}} 9482 +{{/panel}} 9483 + 9484 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9485 + 9486 +---- 9487 + 9488 +(% 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}} 9489 + 9490 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9491 + 9492 +---- 9493 + 9494 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 9495 +{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599} 9496 +{{/code}} 9497 + 9498 +==== Example ==== 9499 + 9500 +---- 9501 + 9502 +(% style="color: rgb(107,107,107);" %)Request 9503 + 9504 +{{code language="php" theme="RDark" title="Update Term Request" collapse="true"}} 9505 + <?php 9506 + 9507 +$curl = curl_init(); 9508 + 9509 +curl_setopt_array($curl, array( 9510 + CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}', 9511 + CURLOPT_RETURNTRANSFER => true, 9512 + CURLOPT_ENCODING => '', 9513 + CURLOPT_MAXREDIRS => 10, 9514 + CURLOPT_TIMEOUT => 0, 9515 + CURLOPT_FOLLOWLOCATION => true, 9516 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9517 + CURLOPT_CUSTOMREQUEST => 'PUT', 9518 + CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}', 9519 + CURLOPT_HTTPHEADER => array( 9520 + 'Appkey: {{ONECOUNT API KEY}}' 9521 + ), 9522 +)); 9523 + 9524 +$response = curl_exec($curl); 9525 + 9526 +curl_close($curl); 9527 +echo $response; 9528 +{{/code}} 9529 + 9311 9311 \\ 9312 9312 9532 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9533 + 9534 +{{code language="yml" theme="RDark" title="Update Term Response" collapse="true"}} 9535 + { 9536 + "result": { 9537 + "success": "1", 9538 + "error": { 9539 + "code": "", 9540 + "message": "" 9541 + } 9542 + }, 9543 + "Terms": [ 9544 + { 9545 + "Id": 447, 9546 + "Name": "Test API term creation update", 9547 + "Description": "Test API term creation update", 9548 + "Duration": 10, 9549 + "DurationUnit": "", 9550 + "Price": "0.00", 9551 + "ProductId": 599 9552 + } 9553 + ] 9554 +} 9555 +{{/code}} 9556 + 9313 9313 \\ 9314 9314 9315 9315 (% class="western" %) ... ... @@ -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',9698 + 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}}',9844 + 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,49897 +(% 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 9910 +(% 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,24 +9672,231 @@ 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"/}} 9918 +{{code language="php" theme="RDark" title="Lookup Resource Request" collapse="true"}} 9919 + <?php 9676 9676 9921 +$curl = curl_init(); 9922 + 9923 +curl_setopt_array($curl, array( 9924 + CURLOPT_URL => 'https://api.onecount.net/v2/resources/lookup?Name={{Resource Name}}', 9925 + CURLOPT_RETURNTRANSFER => true, 9926 + CURLOPT_ENCODING => '', 9927 + CURLOPT_MAXREDIRS => 10, 9928 + CURLOPT_TIMEOUT => 0, 9929 + CURLOPT_FOLLOWLOCATION => true, 9930 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9931 + CURLOPT_CUSTOMREQUEST => 'GET', 9932 + CURLOPT_HTTPHEADER => array( 9933 + 'Appkey: {{ONECOUNT API KEY}}' 9934 + ), 9935 +)); 9936 + 9937 +$response = curl_exec($curl); 9938 + 9939 +curl_close($curl); 9940 +echo $response; 9941 +{{/code}} 9942 + 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"/}} 9947 +{{code language="yml" theme="RDark" title="Lookup Resource Response" collapse="true"}} 9948 + { 9949 + "result": { 9950 + "success": "1", 9951 + "error": { 9952 + "code": "", 9953 + "message": "" 9954 + } 9955 + }, 9956 + "Resources": [ 9957 + { 9958 + "Id": 479, 9959 + "Name": "Virtualization Review", 9960 + "Description": "", 9961 + "Type": "0", 9962 + "Value": "", 9963 + "FreePass": 0 9964 + } 9965 + ] 9966 +} 9967 +{{/code}} 9682 9682 9683 9683 \\ 9684 9684 9685 -\\ 9971 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9972 +== (% 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 9974 +---- 9975 + 9976 +{{panel bgColor="#D3D3D3" width="100%"}} 9977 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources 9978 +{{/panel}} 9979 + 9980 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 9981 + 9982 +---- 9983 + 9984 +(% 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}} 9985 + 9986 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 9987 + 9988 +---- 9989 + 9990 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 9991 +{"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} 9992 +{{/code}} 9993 + 9994 +==== Example ==== 9995 + 9996 +---- 9997 + 9998 +(% style="color: rgb(107,107,107);" %)Request 9999 + 10000 +{{code language="php" theme="RDark" title="Create Resource Request" collapse="true"}} 10001 + <?php 10002 + 10003 +$curl = curl_init(); 10004 + 10005 +curl_setopt_array($curl, array( 10006 + CURLOPT_URL => 'https://api.onecount.net/v2/resources', 10007 + CURLOPT_RETURNTRANSFER => true, 10008 + CURLOPT_ENCODING => '', 10009 + CURLOPT_MAXREDIRS => 10, 10010 + CURLOPT_TIMEOUT => 0, 10011 + CURLOPT_FOLLOWLOCATION => true, 10012 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10013 + CURLOPT_CUSTOMREQUEST => 'POST', 10014 + 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}', 10015 + CURLOPT_HTTPHEADER => array( 10016 + 'Appkey: {{ONECOUNT API KEY}}' 10017 + ), 10018 +)); 10019 + 10020 +$response = curl_exec($curl); 10021 + 10022 +curl_close($curl); 10023 +echo $response; 10024 +{{/code}} 10025 + 9687 9687 \\ 9688 9688 10028 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10029 + 10030 +{{code language="yml" theme="RDark" title="Create Resource Response" collapse="true"}} 10031 + { 10032 + "result": { 10033 + "success": "1", 10034 + "error": { 10035 + "code": "", 10036 + "message": "" 10037 + } 10038 + }, 10039 + "Resources": [ 10040 + { 10041 + "Id": 871, 10042 + "Name": "Test API product creation 21", 10043 + "Description": "Test API product creation 21", 10044 + "Type": "3", 10045 + "Value": "http://one-count.com", 10046 + "FreePass": 1 10047 + } 10048 + ] 10049 +} 10050 +{{/code}} 10051 + 9689 9689 \\ 9690 9690 10054 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10055 +== (% 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(%%) == 10056 + 10057 +---- 10058 + 10059 +{{panel bgColor="#D3D3D3" width="100%"}} 10060 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/resources/~{~{resource id}} 10061 +{{/panel}} 10062 + 10063 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10064 + 10065 +---- 10066 + 10067 +(% 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}} 10068 + 10069 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10070 + 10071 +---- 10072 + 10073 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10074 +{"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} 10075 +{{/code}} 10076 + 10077 +==== Example ==== 10078 + 10079 +---- 10080 + 10081 +(% style="color: rgb(107,107,107);" %)Request 10082 + 10083 +{{code language="php" theme="RDark" title="Update Resource Request" collapse="true"}} 10084 + <?php 10085 + 10086 +$curl = curl_init(); 10087 + 10088 +curl_setopt_array($curl, array( 10089 + CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{resource id}}', 10090 + CURLOPT_RETURNTRANSFER => true, 10091 + CURLOPT_ENCODING => '', 10092 + CURLOPT_MAXREDIRS => 10, 10093 + CURLOPT_TIMEOUT => 0, 10094 + CURLOPT_FOLLOWLOCATION => true, 10095 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10096 + CURLOPT_CUSTOMREQUEST => 'PUT', 10097 + 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}', 10098 + CURLOPT_HTTPHEADER => array( 10099 + 'Appkey: {{ONECOUNT API KEY}}' 10100 + ), 10101 +)); 10102 + 10103 +$response = curl_exec($curl); 10104 + 10105 +curl_close($curl); 10106 +echo $response; 10107 +{{/code}} 10108 + 9691 9691 \\ 9692 9692 10111 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10112 + 10113 +{{code language="yml" theme="RDark" title="Update Resource Response" collapse="true"}} 10114 + { 10115 + "result": { 10116 + "success": "1", 10117 + "error": { 10118 + "code": "", 10119 + "message": "" 10120 + } 10121 + }, 10122 + "Resources": [ 10123 + { 10124 + "Id": 903, 10125 + "Name": "Test API product creation 23", 10126 + "Description": "Test API product creation 23", 10127 + "Type": "3", 10128 + "Value": "http://one-count.com", 10129 + "FreePass": 1 10130 + }, 10131 + { 10132 + "Id": 903, 10133 + "Name": "Test API product creation 23", 10134 + "Description": "Test API product creation 23", 10135 + "Type": "3", 10136 + "Value": "onecount.net", 10137 + "FreePass": 1 10138 + } 10139 + ] 10140 +} 10141 +{{/code}} 10142 + 9693 9693 (% class="western" %) 9694 9694 \\ 9695 9695 ... ... @@ -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',10251 + 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}}',10467 + 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,410518 +(% 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 10531 +(% 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,22 +10087,217 @@ 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"/}} 10539 +{{code language="php" theme="RDark" title="Lookup Source code Request" collapse="true"}} 10540 + <?php 10091 10091 10542 +$curl = curl_init(); 10543 + 10544 +curl_setopt_array($curl, array( 10545 + CURLOPT_URL => 'https://api.onecount.net/v2/sources/lookup?Source={{Source code Name}}', 10546 + CURLOPT_RETURNTRANSFER => true, 10547 + CURLOPT_ENCODING => '', 10548 + CURLOPT_MAXREDIRS => 10, 10549 + CURLOPT_TIMEOUT => 0, 10550 + CURLOPT_FOLLOWLOCATION => true, 10551 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10552 + CURLOPT_CUSTOMREQUEST => 'GET', 10553 + CURLOPT_HTTPHEADER => array( 10554 + 'Appkey: {{ONECOUNT API KEY}}' 10555 + ), 10556 +)); 10557 + 10558 +$response = curl_exec($curl); 10559 + 10560 +curl_close($curl); 10561 +echo $response; 10562 +{{/code}} 10563 + 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"/}} 10568 +{{code language="yml" theme="RDark" title="Lookup Source code Response" collapse="true"}} 10569 + { 10570 + "result": { 10571 + "success": "1", 10572 + "error": { 10573 + "code": "", 10574 + "message": "" 10575 + } 10576 + }, 10577 + "Sources": [ 10578 + { 10579 + "Id": 26, 10580 + "Source": "GCN-Member", 10581 + "Description": "Uploaded from Reston VA", 10582 + "Parent": 0 10583 + } 10584 + ] 10585 +} 10586 +{{/code}} 10097 10097 10098 10098 \\ 10099 10099 10590 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10591 +== (% 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(%%) == 10592 + 10593 +---- 10594 + 10595 +{{panel bgColor="#D3D3D3" width="100%"}} 10596 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources 10597 +{{/panel}} 10598 + 10599 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10600 + 10601 +---- 10602 + 10603 +(% 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}} 10604 + 10605 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10606 + 10607 +---- 10608 + 10609 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10610 +{"Source":"Test source code from API"} 10611 +{{/code}} 10612 + 10613 +==== Example ==== 10614 + 10615 +---- 10616 + 10617 +(% style="color: rgb(107,107,107);" %)Request 10618 + 10619 +{{code language="php" theme="RDark" title="Create Source code Request" collapse="true"}} 10620 + <?php 10621 + 10622 +$curl = curl_init(); 10623 + 10624 +curl_setopt_array($curl, array( 10625 + CURLOPT_URL => 'https://api.onecount.net/v2/sources', 10626 + CURLOPT_RETURNTRANSFER => true, 10627 + CURLOPT_ENCODING => '', 10628 + CURLOPT_MAXREDIRS => 10, 10629 + CURLOPT_TIMEOUT => 0, 10630 + CURLOPT_FOLLOWLOCATION => true, 10631 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10632 + CURLOPT_CUSTOMREQUEST => 'POST', 10633 + CURLOPT_POSTFIELDS =>'{"Source":"Test source code from API"}', 10634 + CURLOPT_HTTPHEADER => array( 10635 + 'Appkey: {{ONECOUNT API KEY}}' 10636 + ), 10637 +)); 10638 + 10639 +$response = curl_exec($curl); 10640 + 10641 +curl_close($curl); 10642 +echo $response; 10643 +{{/code}} 10644 + 10100 10100 \\ 10101 10101 10647 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10648 + 10649 +{{code language="yml" theme="RDark" title="Create Source code Response" collapse="true"}} 10650 + { 10651 + "result": { 10652 + "success": "1", 10653 + "error": { 10654 + "code": "", 10655 + "message": "" 10656 + } 10657 + }, 10658 + "Sources": [ 10659 + { 10660 + "Id": 223, 10661 + "Source": "Test source code from API", 10662 + "Description": "", 10663 + "Parent": 0 10664 + } 10665 + ] 10666 +} 10667 +{{/code}} 10668 + 10102 10102 \\ 10103 10103 10671 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10672 +== (% 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(%%) == 10673 + 10674 +---- 10675 + 10676 +{{panel bgColor="#D3D3D3" width="100%"}} 10677 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/sources/~{~{source code id}} 10678 +{{/panel}} 10679 + 10680 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 10681 + 10682 +---- 10683 + 10684 +(% 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}} 10685 + 10686 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 10687 + 10688 +---- 10689 + 10690 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 10691 +{"Source":"Test API","Parent":215} 10692 +{{/code}} 10693 + 10694 +==== Example ==== 10695 + 10696 +---- 10697 + 10698 +(% style="color: rgb(107,107,107);" %)Request 10699 + 10700 +{{code language="php" theme="RDark" title="Update Source code Request" collapse="true"}} 10701 + <?php 10702 + 10703 +$curl = curl_init(); 10704 + 10705 +curl_setopt_array($curl, array( 10706 + CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}', 10707 + CURLOPT_RETURNTRANSFER => true, 10708 + CURLOPT_ENCODING => '', 10709 + CURLOPT_MAXREDIRS => 10, 10710 + CURLOPT_TIMEOUT => 0, 10711 + CURLOPT_FOLLOWLOCATION => true, 10712 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 10713 + CURLOPT_CUSTOMREQUEST => 'PUT', 10714 + CURLOPT_POSTFIELDS =>'{"Source":"Test API","Parent":215}', 10715 + CURLOPT_HTTPHEADER => array( 10716 + 'Appkey: {{ONECOUNT API KEY}}' 10717 + ), 10718 +)); 10719 + 10720 +$response = curl_exec($curl); 10721 + 10722 +curl_close($curl); 10723 +echo $response; 10724 +{{/code}} 10725 + 10104 10104 \\ 10105 10105 10728 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10729 + 10730 +{{code language="yml" theme="RDark" title="Update Source code Response" collapse="true"}} 10731 + { 10732 + "result": { 10733 + "success": "1", 10734 + "error": { 10735 + "code": "", 10736 + "message": "" 10737 + } 10738 + }, 10739 + "Sources": [ 10740 + { 10741 + "Id": 223, 10742 + "Source": "Test API", 10743 + "Description": "", 10744 + "Parent": 215 10745 + } 10746 + ] 10747 +} 10748 +{{/code}} 10749 + 10106 10106 (% class="western" %) 10107 10107 \\ 10108 10108 ... ... @@ -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',10844 + 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}}',12410 + 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,412470 +(% 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 12483 +(% 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,18 +11845,328 @@ 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"/}} 12491 +{{code language="php" theme="RDark" title="Lookup Transaction Request" collapse="true"}} 12492 + <?php 11849 11849 12494 +$curl = curl_init(); 12495 + 12496 +curl_setopt_array($curl, array( 12497 + CURLOPT_URL => 'https://api.onecount.net/v2/transactions/lookup?UserId={{OCID}}', 12498 + CURLOPT_RETURNTRANSFER => true, 12499 + CURLOPT_ENCODING => '', 12500 + CURLOPT_MAXREDIRS => 10, 12501 + CURLOPT_TIMEOUT => 0, 12502 + CURLOPT_FOLLOWLOCATION => true, 12503 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 12504 + CURLOPT_CUSTOMREQUEST => 'GET', 12505 + CURLOPT_HTTPHEADER => array( 12506 + 'Appkey: {{ONECOUNT API KEY}}' 12507 + ), 12508 +)); 12509 + 12510 +$response = curl_exec($curl); 12511 + 12512 +curl_close($curl); 12513 +echo $response; 12514 +{{/code}} 12515 + 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"/}} 12520 +{{code language="yml" theme="RDark" title="Lookup Transaction Response" collapse="true"}} 12521 + { 12522 + "result": { 12523 + "success": "1", 12524 + "error": { 12525 + "code": "", 12526 + "message": "" 12527 + } 12528 + }, 12529 + "Transactions": [ 12530 + { 12531 + "Id": 52494786, 12532 + "UserId": 1234, 12533 + "TermId": 34, 12534 + "TransactionDate": "2016-01-19", 12535 + "TransactionTime": "15:30:04", 12536 + "RequestDate": "2016-01-19", 12537 + "UserIP": "12.226.247.2", 12538 + "SubscriptionType": "u", 12539 + "ProductId": 34, 12540 + "Source": 0, 12541 + "ProductStatus": 0, 12542 + "MediaFilePath": "", 12543 + "Amount": "" 12544 + }, 12545 + { 12546 + "Id": 42654041, 12547 + "UserId": 1234, 12548 + "TermId": 34, 12549 + "TransactionDate": "2015-09-09", 12550 + "TransactionTime": "11:20:39", 12551 + "RequestDate": "2015-09-09", 12552 + "UserIP": "24.187.236.98", 12553 + "SubscriptionType": "n", 12554 + "ProductId": 34, 12555 + "Source": 0, 12556 + "ProductStatus": 2, 12557 + "MediaFilePath": "", 12558 + "Amount": "" 12559 + }, 12560 + { 12561 + "Id": 97251022, 12562 + "UserId": 1234, 12563 + "TermId": 34, 12564 + "TransactionDate": "2015-06-04", 12565 + "TransactionTime": "14:59:42", 12566 + "RequestDate": "2015-06-04", 12567 + "UserIP": "12.226.247.2", 12568 + "SubscriptionType": "u", 12569 + "ProductId": 34, 12570 + "Source": 0, 12571 + "ProductStatus": 0, 12572 + "MediaFilePath": "", 12573 + "Amount": "" 12574 + }, 12575 + { 12576 + "Id": 55492559, 12577 + "UserId": 1234, 12578 + "TermId": 34, 12579 + "TransactionDate": "2015-04-03", 12580 + "TransactionTime": "16:32:04", 12581 + "RequestDate": "2015-04-03", 12582 + "UserIP": "24.187.236.98", 12583 + "SubscriptionType": "r", 12584 + "ProductId": 34, 12585 + "Source": 58, 12586 + "ProductStatus": 106, 12587 + "MediaFilePath": "", 12588 + "Amount": "" 12589 + }, 12590 + { 12591 + "Id": 98173391, 12592 + "UserId": 1234, 12593 + "TermId": 34, 12594 + "TransactionDate": "2015-04-03", 12595 + "TransactionTime": "15:50:45", 12596 + "RequestDate": "2014-08-19", 12597 + "UserIP": "24.187.236.98", 12598 + "SubscriptionType": "n", 12599 + "ProductId": 34, 12600 + "Source": 34, 12601 + "ProductStatus": 106, 12602 + "MediaFilePath": "", 12603 + "Amount": "" 12604 + }, 12605 + { 12606 + "Id": 91711793, 12607 + "UserId": 1234, 12608 + "TermId": 18, 12609 + "TransactionDate": "2015-04-27", 12610 + "TransactionTime": "14:24:51", 12611 + "RequestDate": "2015-04-27", 12612 + "UserIP": "24.187.236.98", 12613 + "SubscriptionType": "u", 12614 + "ProductId": 18, 12615 + "Source": 0, 12616 + "ProductStatus": 106, 12617 + "MediaFilePath": "", 12618 + "Amount": "" 12619 + }, 12620 + { 12621 + "Id": 74936400, 12622 + "UserId": 1234, 12623 + "TermId": 18, 12624 + "TransactionDate": "2015-04-27", 12625 + "TransactionTime": "12:35:18", 12626 + "RequestDate": "2015-04-27", 12627 + "UserIP": "68.196.187.74", 12628 + "SubscriptionType": "n", 12629 + "ProductId": 18, 12630 + "Source": 34, 12631 + "ProductStatus": 106, 12632 + "MediaFilePath": "", 12633 + "Amount": "" 12634 + }, 12635 + { 12636 + "Id": 21664714, 12637 + "UserId": 1234, 12638 + "TermId": 18, 12639 + "TransactionDate": "2015-04-03", 12640 + "TransactionTime": "15:50:46", 12641 + "RequestDate": "2015-04-03", 12642 + "UserIP": "24.187.236.98", 12643 + "SubscriptionType": "u", 12644 + "ProductId": 18, 12645 + "Source": 0, 12646 + "ProductStatus": 2, 12647 + "MediaFilePath": "", 12648 + "Amount": "" 12649 + }, 12650 + { 12651 + "Id": 81129263, 12652 + "UserId": 1234, 12653 + "TermId": 18, 12654 + "TransactionDate": "2014-08-19", 12655 + "TransactionTime": "11:18:55", 12656 + "RequestDate": "2014-08-19", 12657 + "UserIP": "74.201.38.1", 12658 + "SubscriptionType": "n", 12659 + "ProductId": 18, 12660 + "Source": 34, 12661 + "ProductStatus": 2, 12662 + "MediaFilePath": "", 12663 + "Amount": "" 12664 + }, 12665 + { 12666 + "Id": 30461748, 12667 + "UserId": 1234, 12668 + "ResourceId": 459, 12669 + "TransactionDate": "2023-03-15", 12670 + "TransactionTime": "12:07:55", 12671 + "RequestDate": "2023-03-15", 12672 + "UserIP": "74.201.38.12", 12673 + "SubscriptionType": "n", 12674 + "SourceCode": 0, 12675 + "ProductStatus": 0, 12676 + "MediaFilePath": "", 12677 + "Amount": "" 12678 + }, 12679 + { 12680 + "Id": 25858253, 12681 + "UserId": 1234, 12682 + "ResourceId": 451, 12683 + "TransactionDate": "2023-03-15", 12684 + "TransactionTime": "11:45:19", 12685 + "RequestDate": "2023-03-15", 12686 + "UserIP": "74.201.38.12", 12687 + "SubscriptionType": "n", 12688 + "SourceCode": 0, 12689 + "ProductStatus": 0, 12690 + "MediaFilePath": "", 12691 + "Amount": "" 12692 + }, 12693 + { 12694 + "Id": 69453260, 12695 + "UserId": 1234, 12696 + "ResourceId": 411, 12697 + "TransactionDate": "2022-06-07", 12698 + "TransactionTime": "17:03:14", 12699 + "RequestDate": "2022-06-07", 12700 + "UserIP": "74.201.38.12", 12701 + "SubscriptionType": "n", 12702 + "SourceCode": 0, 12703 + "ProductStatus": 0, 12704 + "MediaFilePath": "", 12705 + "Amount": "" 12706 + }, 12707 + { 12708 + "Id": 51354425, 12709 + "UserId": 1234, 12710 + "ResourceId": 355, 12711 + "TransactionDate": "2020-04-06", 12712 + "TransactionTime": "12:24:08", 12713 + "RequestDate": "2020-04-06", 12714 + "UserIP": "74.201.38.12", 12715 + "SubscriptionType": "n", 12716 + "SourceCode": 0, 12717 + "ProductStatus": 0, 12718 + "MediaFilePath": "", 12719 + "Amount": "" 12720 + } 12721 + ] 12722 +} 12723 +{{/code}} 11855 11855 11856 11856 \\ 11857 11857 12727 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12728 +== (% 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(%%) == 12729 + 12730 +---- 12731 + 12732 +{{panel bgColor="#D3D3D3" width="100%"}} 12733 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/transactions 12734 +{{/panel}} 12735 + 12736 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 12737 + 12738 +---- 12739 + 12740 +(% 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}} 12741 + 12742 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 12743 + 12744 +---- 12745 + 12746 +{{code language="yml" theme="RDark" title="Body" collapse="true"}} 12747 +{"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" } 12748 +{{/code}} 12749 + 12750 +==== Example ==== 12751 + 12752 +---- 12753 + 12754 +(% style="color: rgb(107,107,107);" %)Request 12755 + 12756 +{{code language="php" theme="RDark" title="Create Transaction Request" collapse="true"}} 12757 + <?php 12758 + 12759 +$curl = curl_init(); 12760 + 12761 +curl_setopt_array($curl, array( 12762 + CURLOPT_URL => 'https://api.onecount.net/v2/transactions', 12763 + CURLOPT_RETURNTRANSFER => true, 12764 + CURLOPT_ENCODING => '', 12765 + CURLOPT_MAXREDIRS => 10, 12766 + CURLOPT_TIMEOUT => 0, 12767 + CURLOPT_FOLLOWLOCATION => true, 12768 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 12769 + CURLOPT_CUSTOMREQUEST => 'POST', 12770 + 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" }', 12771 + CURLOPT_HTTPHEADER => array( 12772 + 'Appkey: {{ONECOUNT API KEY}}' 12773 + ), 12774 +)); 12775 + 12776 +$response = curl_exec($curl); 12777 + 12778 +curl_close($curl); 12779 +echo $response; 12780 +{{/code}} 12781 + 11858 11858 \\ 11859 11859 12784 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12785 + 12786 +{{code language="yml" theme="RDark" title="Create Transaction Response" collapse="true"}} 12787 + { 12788 + "result": { 12789 + "success": "1", 12790 + "error": { 12791 + "code": "", 12792 + "message": "" 12793 + } 12794 + }, 12795 + "Transactions": { 12796 + "Id": "1234", 12797 + "UserId": 1845775, 12798 + "TermId": 447, 12799 + "TransactionDate": "20231211", 12800 + "TransactionTime": "09:34:26", 12801 + "RequestDate": "20231211", 12802 + "UserIP": "192.168.0.1", 12803 + "SubscriptionType": "n", 12804 + "ProductId": 599, 12805 + "Source": 83, 12806 + "ProductStatus": 2, 12807 + "MediaFilePath": "", 12808 + "Amount": "0.00" 12809 + } 12810 +} 12811 +{{/code}} 12812 + 11860 11860 \\ 11861 11861 11862 11862 \\ ... ... @@ -11901,6 +11901,12 @@ 11901 11901 11902 11902 \\ 11903 11903 12857 +\\ 12858 + 12859 +\\ 12860 + 12861 +\\ 12862 + 11904 11904 (% class="western" %) 11905 11905 **COMPONENT: Leads 11906 11906 **
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -10826548 11 +108265483 - 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/108265483/ONEcount API Documentation