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
-
... ... @@ -115,7 +115,7 @@ 115 115 (% class="western" %) 116 116 API will output the response in a JSON format discussed below. 117 117 118 -{{code language="yml" theme="RDark" title="Response" collapse="true"}}118 +{{code language="yml" theme="RDark" title="Response"}} 119 119 { 120 120 "result": { 121 121 "success": "1", ... ... @@ -335,7 +335,7 @@ 335 335 336 336 (% style="color: rgb(107,107,107);" %)Request 337 337 338 -{{code language="php" theme="RDark" title="Get All Users Request" collapse="true"}}338 +{{code language="php" theme="RDark" title="Get All Users Request"}} 339 339 <?php 340 340 341 341 $curl = curl_init(); ... ... @@ -364,7 +364,7 @@ 364 364 365 365 \\ 366 366 367 -(% style="color: rgb(107,107,107);" %)Response 367 +(% style="color: rgb(107,107,107);" %)Response 200 OK 368 368 369 369 {{code language="yml" theme="RDark" title="Get All Users Response" collapse="true"}} 370 370 { ... ... @@ -875,7 +875,7 @@ 875 875 876 876 (% style="color: rgb(107,107,107);" %)Request 877 877 878 -{{code language="php" theme="RDark" title="Get specific User Request" collapse="true"}}878 +{{code language="php" theme="RDark" title="Get specific User Request"}} 879 879 <?php 880 880 881 881 $curl = curl_init(); ... ... @@ -902,7 +902,7 @@ 902 902 903 903 \\ 904 904 905 -(% style="color: rgb(107,107,107);" %)Response 905 +(% style="color: rgb(107,107,107);" %)Response 200 OK 906 906 907 907 {{code language="yml" theme="RDark" title="Get specific user Response" collapse="true"}} 908 908 { ... ... @@ -973,7 +973,7 @@ 973 973 974 974 ---- 975 975 976 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}976 +{{code language="yml" theme="RDark" title="Body"}} 977 977 {"e":"rayaan@one-count.com","p":"12345"} 978 978 {{/code}} 979 979 ... ... @@ -983,7 +983,7 @@ 983 983 984 984 (% style="color: rgb(107,107,107);" %)Request 985 985 986 -{{code language="php" theme="RDark" title="User login Request" collapse="true"}}986 +{{code language="php" theme="RDark" title="User login Request"}} 987 987 <?php 988 988 989 989 $curl = curl_init(); ... ... @@ -1011,7 +1011,7 @@ 1011 1011 1012 1012 \\ 1013 1013 1014 -(% style="color: rgb(107,107,107);" %)Response 1014 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1015 1015 1016 1016 {{code language="yml" theme="RDark" title="Login user Response" collapse="true"}} 1017 1017 { ... ... @@ -1058,7 +1058,7 @@ 1058 1058 1059 1059 (% style="color: rgb(107,107,107);" %)Request 1060 1060 1061 -{{code language="php" theme="RDark" title="Lookup user Request" collapse="true"}}1061 +{{code language="php" theme="RDark" title="Lookup user Request"}} 1062 1062 <?php 1063 1063 1064 1064 $curl = curl_init(); ... ... @@ -1085,7 +1085,7 @@ 1085 1085 1086 1086 \\ 1087 1087 1088 -(% style="color: rgb(107,107,107);" %)Response 1088 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1089 1089 1090 1090 {{code language="yml" theme="RDark" title="Lookup user Response" collapse="true"}} 1091 1091 { ... ... @@ -1246,7 +1246,7 @@ 1246 1246 1247 1247 ---- 1248 1248 1249 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}1249 +{{code language="yml" theme="RDark" title="Body"}} 1250 1250 {"Users":{"PartnerId":1,"Demo":{"1":"testApirayaan7@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[]} 1251 1251 {{/code}} 1252 1252 ... ... @@ -1256,7 +1256,7 @@ 1256 1256 1257 1257 (% style="color: rgb(107,107,107);" %)Request 1258 1258 1259 -{{code language="php" theme="RDark" title="Create User Request" collapse="true"}}1259 +{{code language="php" theme="RDark" title="Create User Request"}} 1260 1260 <?php 1261 1261 1262 1262 $curl = curl_init(); ... ... @@ -1284,7 +1284,7 @@ 1284 1284 1285 1285 \\ 1286 1286 1287 -(% style="color: rgb(107,107,107);" %)Response 1287 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1288 1288 1289 1289 {{code language="yml" theme="RDark" title="Create user Response" collapse="true"}} 1290 1290 { ... ... @@ -1410,7 +1410,7 @@ 1410 1410 1411 1411 ---- 1412 1412 1413 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}1413 +{{code language="yml" theme="RDark" title="Body"}} 1414 1414 {"Users":{"Demo":{"6":"title1"}}} 1415 1415 {{/code}} 1416 1416 ... ... @@ -1420,7 +1420,7 @@ 1420 1420 1421 1421 (% style="color: rgb(107,107,107);" %)Request 1422 1422 1423 -{{code language="php" theme="RDark" title="Update User Request" collapse="true"}}1423 +{{code language="php" theme="RDark" title="Update User Request"}} 1424 1424 <?php 1425 1425 1426 1426 $curl = curl_init(); ... ... @@ -1450,7 +1450,7 @@ 1450 1450 1451 1451 \\ 1452 1452 1453 -(% style="color: rgb(107,107,107);" %)Response 1453 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1454 1454 1455 1455 {{code language="yml" theme="RDark" title="Update user Response" collapse="true"}} 1456 1456 { ... ... @@ -1474,7 +1474,7 @@ 1474 1474 \\ 1475 1475 1476 1476 (% class="western" %) 1477 -**COMPONENT: Questions** 1477 +=== **COMPONENT: Questions** === 1478 1478 1479 1479 (% class="western" %) 1480 1480 All data fields in ONEcount are made up of questions. Questions are configurable on a per-client basis, and no two customer installations will have the same question (ie., field) layout. Therefore, before querying or updating any ONEcount installation, you'll need to get an understanding of the question layout of the installation. This API segment will allow you to query ONEcount to determine the question layout for the installation. It will also allow you to create new questions within the system. This resource does not allow you to update the data for a specific user (see User section). ... ... @@ -1664,7 +1664,7 @@ 1664 1664 1665 1665 (% style="color: rgb(107,107,107);" %)Request 1666 1666 1667 -{{code language="php" theme="RDark" title="Get All Questions Request" collapse="true"}}1667 +{{code language="php" theme="RDark" title="Get All Questions Request"}} 1668 1668 <?php 1669 1669 1670 1670 $curl = curl_init(); ... ... @@ -1694,7 +1694,7 @@ 1694 1694 1695 1695 \\ 1696 1696 1697 -(% style="color: rgb(107,107,107);" %)Response 1697 +(% style="color: rgb(107,107,107);" %)Response 200 OK 1698 1698 1699 1699 {{code language="yml" theme="RDark" title="Get All Questions Response" collapse="true"}} 1700 1700 { ... ... @@ -3805,7 +3805,7 @@ 3805 3805 3806 3806 (% style="color: rgb(107,107,107);" %)Request 3807 3807 3808 -{{code language="php" theme="RDark" title="Get specific Question Request" collapse="true"}}3808 +{{code language="php" theme="RDark" title="Get specific Question Request"}} 3809 3809 <?php 3810 3810 3811 3811 $curl = curl_init(); ... ... @@ -3832,7 +3832,7 @@ 3832 3832 3833 3833 \\ 3834 3834 3835 -(% style="color: rgb(107,107,107);" %)Response 3835 +(% style="color: rgb(107,107,107);" %)Response 200 OK 3836 3836 3837 3837 {{code language="yml" theme="RDark" title="Get specific question Response" collapse="true"}} 3838 3838 { ... ... @@ -3884,7 +3884,7 @@ 3884 3884 3885 3885 (% style="color: rgb(107,107,107);" %)Request 3886 3886 3887 -{{code language="php" theme="RDark" title="Lookup question by text Request" collapse="true"}}3887 +{{code language="php" theme="RDark" title="Lookup question by text Request"}} 3888 3888 <?php 3889 3889 3890 3890 $curl = curl_init(); ... ... @@ -3911,7 +3911,7 @@ 3911 3911 3912 3912 \\ 3913 3913 3914 -(% style="color: rgb(107,107,107);" %)Response 3914 +(% style="color: rgb(107,107,107);" %)Response 200 OK 3915 3915 3916 3916 {{code language="yml" theme="RDark" title="Lookup question by title Response" collapse="true"}} 3917 3917 { ... ... @@ -5330,7 +5330,7 @@ 5330 5330 5331 5331 (% style="color: rgb(107,107,107);" %)Request 5332 5332 5333 -{{code language="php" theme="RDark" title="Lookup question by Type Request" collapse="true"}}5333 +{{code language="php" theme="RDark" title="Lookup question by Type Request"}} 5334 5334 <?php 5335 5335 5336 5336 $curl = curl_init(); ... ... @@ -5357,7 +5357,7 @@ 5357 5357 5358 5358 \\ 5359 5359 5360 -(% style="color: rgb(107,107,107);" %)Response 5360 +(% style="color: rgb(107,107,107);" %)Response 200 OK 5361 5361 5362 5362 {{code language="yml" theme="RDark" title="Lookup question by type Response" collapse="true"}} 5363 5363 { ... ... @@ -8027,7 +8027,7 @@ 8027 8027 8028 8028 ---- 8029 8029 8030 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}8030 +{{code language="yml" theme="RDark" title="Body"}} 8031 8031 {"Text":"Test from API 3","Type":0,"Alias":"Test from API 3"} 8032 8032 {{/code}} 8033 8033 ... ... @@ -8037,7 +8037,7 @@ 8037 8037 8038 8038 (% style="color: rgb(107,107,107);" %)Request 8039 8039 8040 -{{code language="php" theme="RDark" title="Create Question Request" collapse="true"}}8040 +{{code language="php" theme="RDark" title="Create Question Request"}} 8041 8041 <?php 8042 8042 8043 8043 $curl = curl_init(); ... ... @@ -8065,7 +8065,7 @@ 8065 8065 8066 8066 \\ 8067 8067 8068 -(% style="color: rgb(107,107,107);" %)Response 8068 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8069 8069 8070 8070 {{code language="yml" theme="RDark" title="Create question Response" collapse="true"}} 8071 8071 { ... ... @@ -8105,7 +8105,7 @@ 8105 8105 8106 8106 ---- 8107 8107 8108 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}8108 +{{code language="yml" theme="RDark" title="Body"}} 8109 8109 {"Text":"Test from API 6","Type":4,"Alias":"Test from API 6", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]} 8110 8110 {{/code}} 8111 8111 ... ... @@ -8115,7 +8115,7 @@ 8115 8115 8116 8116 (% style="color: rgb(107,107,107);" %)Request 8117 8117 8118 -{{code language="php" theme="RDark" title="Create Question Request" collapse="true"}}8118 +{{code language="php" theme="RDark" title="Create Question Request"}} 8119 8119 <?php 8120 8120 8121 8121 $curl = curl_init(); ... ... @@ -8143,7 +8143,7 @@ 8143 8143 8144 8144 \\ 8145 8145 8146 -(% style="color: rgb(107,107,107);" %)Response 8146 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8147 8147 8148 8148 {{code language="yml" theme="RDark" title="Create question Response" collapse="true"}} 8149 8149 { ... ... @@ -8183,7 +8183,7 @@ 8183 8183 8184 8184 ---- 8185 8185 8186 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}8186 +{{code language="yml" theme="RDark" title="Body"}} 8187 8187 {"Text":"Test from API 6 changed","Type":4,"Alias":"Test from API 6 changed", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]} 8188 8188 {{/code}} 8189 8189 ... ... @@ -8193,7 +8193,7 @@ 8193 8193 8194 8194 (% style="color: rgb(107,107,107);" %)Request 8195 8195 8196 -{{code language="php" theme="RDark" title="Update Question Request" collapse="true"}}8196 +{{code language="php" theme="RDark" title="Update Question Request"}} 8197 8197 <?php 8198 8198 8199 8199 $curl = curl_init(); ... ... @@ -8223,7 +8223,7 @@ 8223 8223 8224 8224 \\ 8225 8225 8226 -(% style="color: rgb(107,107,107);" %)Response 8226 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8227 8227 8228 8228 {{code language="yml" theme="RDark" title="Update Question Response" collapse="true"}} 8229 8229 { ... ... @@ -8246,7 +8246,7 @@ 8246 8246 \\ 8247 8247 8248 8248 (% class="western" %) 8249 -**COMPONENT: Products** 8249 +=== **COMPONENT: Products** === 8250 8250 8251 8251 (% class="western" %) 8252 8252 This resource is for manipulating products resource. A product can be created, updated or searched. ... ... @@ -8378,7 +8378,7 @@ 8378 8378 8379 8379 (% style="color: rgb(107,107,107);" %)Request 8380 8380 8381 -{{code language="php" theme="RDark" title="Get All Products Request" collapse="true"}}8381 +{{code language="php" theme="RDark" title="Get All Products Request"}} 8382 8382 <?php 8383 8383 8384 8384 $curl = curl_init(); ... ... @@ -8407,7 +8407,7 @@ 8407 8407 8408 8408 \\ 8409 8409 8410 -(% style="color: rgb(107,107,107);" %)Response 8410 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8411 8411 8412 8412 {{code language="yml" theme="RDark" title="Get All Products Response" collapse="true"}} 8413 8413 { ... ... @@ -8666,7 +8666,7 @@ 8666 8666 8667 8667 (% style="color: rgb(107,107,107);" %)Request 8668 8668 8669 -{{code language="php" theme="RDark" title="Get specific Product Request" collapse="true"}}8669 +{{code language="php" theme="RDark" title="Get specific Product Request"}} 8670 8670 <?php 8671 8671 8672 8672 $curl = curl_init(); ... ... @@ -8693,7 +8693,7 @@ 8693 8693 8694 8694 \\ 8695 8695 8696 -(% style="color: rgb(107,107,107);" %)Response 8696 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8697 8697 8698 8698 {{code language="yml" theme="RDark" title="Get specific Product Response" collapse="true"}} 8699 8699 { ... ... @@ -8756,7 +8756,7 @@ 8756 8756 8757 8757 (% style="color: rgb(107,107,107);" %)Request 8758 8758 8759 -{{code language="php" theme="RDark" title="Lookup Product Request" collapse="true"}}8759 +{{code language="php" theme="RDark" title="Lookup Product Request"}} 8760 8760 <?php 8761 8761 8762 8762 $curl = curl_init(); ... ... @@ -8783,7 +8783,7 @@ 8783 8783 8784 8784 \\ 8785 8785 8786 -(% style="color: rgb(107,107,107);" %)Response 8786 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8787 8787 8788 8788 {{code language="yml" theme="RDark" title="Lookup Product Response" collapse="true"}} 8789 8789 { ... ... @@ -8834,7 +8834,7 @@ 8834 8834 8835 8835 ---- 8836 8836 8837 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}8837 +{{code language="yml" theme="RDark" title="Body"}} 8838 8838 {"Title":"Test API package creation 2","Description": "Test API package creation 2","Terms":{"Name":"Test term for API 2"},"PrimaryFormId":0} 8839 8839 {{/code}} 8840 8840 ... ... @@ -8844,7 +8844,7 @@ 8844 8844 8845 8845 (% style="color: rgb(107,107,107);" %)Request 8846 8846 8847 -{{code language="php" theme="RDark" title="Create Product Request" collapse="true"}}8847 +{{code language="php" theme="RDark" title="Create Product Request"}} 8848 8848 <?php 8849 8849 8850 8850 $curl = curl_init(); ... ... @@ -8872,7 +8872,7 @@ 8872 8872 8873 8873 \\ 8874 8874 8875 -(% style="color: rgb(107,107,107);" %)Response 8875 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8876 8876 8877 8877 {{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}} 8878 8878 { ... ... @@ -8912,7 +8912,7 @@ 8912 8912 8913 8913 ---- 8914 8914 8915 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}8915 +{{code language="yml" theme="RDark" title="Body"}} 8916 8916 {"Title":"Test API package 23","Description": "Test API package 23","PrimaryFormId":0} 8917 8917 {{/code}} 8918 8918 ... ... @@ -8922,7 +8922,7 @@ 8922 8922 8923 8923 (% style="color: rgb(107,107,107);" %)Request 8924 8924 8925 -{{code language="php" theme="RDark" title="Update Product Request" collapse="true"}}8925 +{{code language="php" theme="RDark" title="Update Product Request"}} 8926 8926 <?php 8927 8927 8928 8928 $curl = curl_init(); ... ... @@ -8951,7 +8951,7 @@ 8951 8951 8952 8952 \\ 8953 8953 8954 -(% style="color: rgb(107,107,107);" %)Response 8954 +(% style="color: rgb(107,107,107);" %)Response 200 OK 8955 8955 8956 8956 {{code language="yml" theme="RDark" title="Update Product Response" collapse="true"}} 8957 8957 { ... ... @@ -8974,8 +8974,80 @@ 8974 8974 8975 8975 \\ 8976 8976 8977 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8978 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Attach Resource to Product(%%) == 8979 + 8980 +---- 8981 + 8982 +{{panel bgColor="#D3D3D3" width="100%"}} 8983 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/products/attachResource 8984 +{{/panel}} 8985 + 8986 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 8987 + 8988 +---- 8989 + 8990 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 8991 + 8992 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 8993 + 8994 +---- 8995 + 8996 +{{code language="yml" theme="RDark" title="Body"}} 8997 +{"ProductID":"599","ResourceID":"903"} 8998 +{{/code}} 8999 + 9000 +==== Example ==== 9001 + 9002 +---- 9003 + 9004 +(% style="color: rgb(107,107,107);" %)Request 9005 + 9006 +{{code language="php" theme="RDark" title="Attach Resource to Product Request"}} 9007 + <?php 9008 + 9009 +$curl = curl_init(); 9010 + 9011 +curl_setopt_array($curl, array( 9012 + CURLOPT_URL => 'https://api.onecount.net/v2/products/attachResource', 9013 + CURLOPT_RETURNTRANSFER => true, 9014 + CURLOPT_ENCODING => '', 9015 + CURLOPT_MAXREDIRS => 10, 9016 + CURLOPT_TIMEOUT => 0, 9017 + CURLOPT_FOLLOWLOCATION => true, 9018 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 9019 + CURLOPT_CUSTOMREQUEST => 'POST', 9020 + CURLOPT_POSTFIELDS =>'{"ProductID":"599","ResourceID":"903"}', 9021 + CURLOPT_HTTPHEADER => array( 9022 + 'Appkey: {{ONECOUNT API KEY}}' 9023 + ), 9024 +)); 9025 + 9026 +$response = curl_exec($curl); 9027 + 9028 +curl_close($curl); 9029 +echo $response; 9030 +{{/code}} 9031 + 9032 +\\ 9033 + 9034 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9035 + 9036 +{{code language="yml" theme="RDark" title="Create Product Response" collapse="true"}} 9037 + { 9038 + "result": { 9039 + "success": "1", 9040 + "error": { 9041 + "code": "", 9042 + "message": "" 9043 + } 9044 + }, 9045 + "Products": "599" 9046 +} 9047 +{{/code}} 9048 + 8977 8977 (% class="western" %) 8978 -**COMPONENT: Terms** 9050 +=== **COMPONENT: Terms** === 8979 8979 8980 8980 (% class="western" %) 8981 8981 This resource is for manipulating terms resource. A term can be created, updated or searched. ... ... @@ -9072,7 +9072,7 @@ 9072 9072 9073 9073 (% style="color: rgb(107,107,107);" %)Request 9074 9074 9075 -{{code language="php" theme="RDark" title="Get All Terms Request" collapse="true"}}9147 +{{code language="php" theme="RDark" title="Get All Terms Request"}} 9076 9076 <?php 9077 9077 9078 9078 $curl = curl_init(); ... ... @@ -9099,7 +9099,7 @@ 9099 9099 9100 9100 \\ 9101 9101 9102 -(% style="color: rgb(107,107,107);" %)Response 9174 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9103 9103 9104 9104 {{code language="yml" theme="RDark" title="Get All Terms Response" collapse="true"}} 9105 9105 { ... ... @@ -9255,7 +9255,7 @@ 9255 9255 9256 9256 (% style="color: rgb(107,107,107);" %)Request 9257 9257 9258 -{{code language="php" theme="RDark" title="Get specific Term Request" collapse="true"}}9330 +{{code language="php" theme="RDark" title="Get specific Term Request"}} 9259 9259 <?php 9260 9260 9261 9261 $curl = curl_init(); ... ... @@ -9282,7 +9282,7 @@ 9282 9282 9283 9283 \\ 9284 9284 9285 -(% style="color: rgb(107,107,107);" %)Response 9357 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9286 9286 9287 9287 {{code language="yml" theme="RDark" title="Get specific Term Response" collapse="true"}} 9288 9288 { ... ... @@ -9336,7 +9336,7 @@ 9336 9336 9337 9337 (% style="color: rgb(107,107,107);" %)Request 9338 9338 9339 -{{code language="php" theme="RDark" title="Lookup Term Request" collapse="true"}}9411 +{{code language="php" theme="RDark" title="Lookup Term Request"}} 9340 9340 <?php 9341 9341 9342 9342 $curl = curl_init(); ... ... @@ -9363,7 +9363,7 @@ 9363 9363 9364 9364 \\ 9365 9365 9366 -(% style="color: rgb(107,107,107);" %)Response 9438 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9367 9367 9368 9368 {{code language="yml" theme="RDark" title="Lookup Term Response" collapse="true"}} 9369 9369 { ... ... @@ -9409,7 +9409,7 @@ 9409 9409 9410 9410 ---- 9411 9411 9412 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}9484 +{{code language="yml" theme="RDark" title="Body"}} 9413 9413 {"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599} 9414 9414 {{/code}} 9415 9415 ... ... @@ -9419,7 +9419,7 @@ 9419 9419 9420 9420 (% style="color: rgb(107,107,107);" %)Request 9421 9421 9422 -{{code language="php" theme="RDark" title="Create Term Request" collapse="true"}}9494 +{{code language="php" theme="RDark" title="Create Term Request"}} 9423 9423 <?php 9424 9424 9425 9425 $curl = curl_init(); ... ... @@ -9451,7 +9451,7 @@ 9451 9451 9452 9452 \\ 9453 9453 9454 -(% style="color: rgb(107,107,107);" %)Response 9526 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9455 9455 9456 9456 {{code language="yml" theme="RDark" title="Create Term Response" collapse="true"}} 9457 9457 { ... ... @@ -9491,7 +9491,7 @@ 9491 9491 9492 9492 ---- 9493 9493 9494 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}9566 +{{code language="yml" theme="RDark" title="Body"}} 9495 9495 {"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599} 9496 9496 {{/code}} 9497 9497 ... ... @@ -9501,7 +9501,7 @@ 9501 9501 9502 9502 (% style="color: rgb(107,107,107);" %)Request 9503 9503 9504 -{{code language="php" theme="RDark" title="Update Term Request" collapse="true"}}9576 +{{code language="php" theme="RDark" title="Update Term Request"}} 9505 9505 <?php 9506 9506 9507 9507 $curl = curl_init(); ... ... @@ -9529,7 +9529,7 @@ 9529 9529 9530 9530 \\ 9531 9531 9532 -(% style="color: rgb(107,107,107);" %)Response 9604 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9533 9533 9534 9534 {{code language="yml" theme="RDark" title="Update Term Response" collapse="true"}} 9535 9535 { ... ... @@ -9557,7 +9557,7 @@ 9557 9557 \\ 9558 9558 9559 9559 (% class="western" %) 9560 -**COMPONENT: Resources** 9632 +=== **COMPONENT: Resources** === 9561 9561 9562 9562 (% class="western" %) 9563 9563 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. ... ... @@ -9689,7 +9689,7 @@ 9689 9689 9690 9690 (% style="color: rgb(107,107,107);" %)Request 9691 9691 9692 -{{code language="php" theme="RDark" title="Get All Resource Request" collapse="true"}}9764 +{{code language="php" theme="RDark" title="Get All Resource Request"}} 9693 9693 <?php 9694 9694 9695 9695 $curl = curl_init(); ... ... @@ -9716,7 +9716,7 @@ 9716 9716 9717 9717 \\ 9718 9718 9719 -(% style="color: rgb(107,107,107);" %)Response 9791 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9720 9720 9721 9721 {{code language="yml" theme="RDark" title="Get All Resource Response" collapse="true"}} 9722 9722 { ... ... @@ -9835,7 +9835,7 @@ 9835 9835 9836 9836 (% style="color: rgb(107,107,107);" %)Request 9837 9837 9838 -{{code language="php" theme="RDark" title="Get specific Resource Request" collapse="true"}}9910 +{{code language="php" theme="RDark" title="Get specific Resource Request"}} 9839 9839 <?php 9840 9840 9841 9841 $curl = curl_init(); ... ... @@ -9862,7 +9862,7 @@ 9862 9862 9863 9863 \\ 9864 9864 9865 -(% style="color: rgb(107,107,107);" %)Response 9937 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9866 9866 9867 9867 {{code language="yml" theme="RDark" title="Get specific Resource Response" collapse="true"}} 9868 9868 { ... ... @@ -9915,7 +9915,7 @@ 9915 9915 9916 9916 (% style="color: rgb(107,107,107);" %)Request 9917 9917 9918 -{{code language="php" theme="RDark" title="Lookup Resource Request" collapse="true"}}9990 +{{code language="php" theme="RDark" title="Lookup Resource Request"}} 9919 9919 <?php 9920 9920 9921 9921 $curl = curl_init(); ... ... @@ -9942,7 +9942,7 @@ 9942 9942 9943 9943 \\ 9944 9944 9945 -(% style="color: rgb(107,107,107);" %)Response 10017 +(% style="color: rgb(107,107,107);" %)Response 200 OK 9946 9946 9947 9947 {{code language="yml" theme="RDark" title="Lookup Resource Response" collapse="true"}} 9948 9948 { ... ... @@ -9987,7 +9987,7 @@ 9987 9987 9988 9988 ---- 9989 9989 9990 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}10062 +{{code language="yml" theme="RDark" title="Body"}} 9991 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 9992 {{/code}} 9993 9993 ... ... @@ -9997,7 +9997,7 @@ 9997 9997 9998 9998 (% style="color: rgb(107,107,107);" %)Request 9999 9999 10000 -{{code language="php" theme="RDark" title="Create Resource Request" collapse="true"}}10072 +{{code language="php" theme="RDark" title="Create Resource Request"}} 10001 10001 <?php 10002 10002 10003 10003 $curl = curl_init(); ... ... @@ -10025,7 +10025,7 @@ 10025 10025 10026 10026 \\ 10027 10027 10028 -(% style="color: rgb(107,107,107);" %)Response 10100 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10029 10029 10030 10030 {{code language="yml" theme="RDark" title="Create Resource Response" collapse="true"}} 10031 10031 { ... ... @@ -10070,7 +10070,7 @@ 10070 10070 10071 10071 ---- 10072 10072 10073 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}10145 +{{code language="yml" theme="RDark" title="Body"}} 10074 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 10075 {{/code}} 10076 10076 ... ... @@ -10080,7 +10080,7 @@ 10080 10080 10081 10081 (% style="color: rgb(107,107,107);" %)Request 10082 10082 10083 -{{code language="php" theme="RDark" title="Update Resource Request" collapse="true"}}10155 +{{code language="php" theme="RDark" title="Update Resource Request"}} 10084 10084 <?php 10085 10085 10086 10086 $curl = curl_init(); ... ... @@ -10108,7 +10108,7 @@ 10108 10108 10109 10109 \\ 10110 10110 10111 -(% style="color: rgb(107,107,107);" %)Response 10183 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10112 10112 10113 10113 {{code language="yml" theme="RDark" title="Update Resource Response" collapse="true"}} 10114 10114 { ... ... @@ -10144,8 +10144,8 @@ 10144 10144 \\ 10145 10145 10146 10146 (% class="western" %) 10147 -**COMPONENT: Source Codes 10148 -** 10219 +=== **COMPONENT: Source Codes 10220 +** === 10149 10149 10150 10150 (% class="western" %) 10151 10151 This resource is for manipulating source code for a resource. A source code can be created, updated or searched. ... ... @@ -10242,7 +10242,7 @@ 10242 10242 10243 10243 (% style="color: rgb(107,107,107);" %)Request 10244 10244 10245 -{{code language="php" theme="RDark" title="Get All Source code Request" collapse="true"}}10317 +{{code language="php" theme="RDark" title="Get All Source code Request"}} 10246 10246 <?php 10247 10247 10248 10248 $curl = curl_init(); ... ... @@ -10269,7 +10269,7 @@ 10269 10269 10270 10270 \\ 10271 10271 10272 -(% style="color: rgb(107,107,107);" %)Response 10344 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10273 10273 10274 10274 {{code language="yml" theme="RDark" title="Get All Source code Response" collapse="true"}} 10275 10275 { ... ... @@ -10458,7 +10458,7 @@ 10458 10458 10459 10459 (% style="color: rgb(107,107,107);" %)Request 10460 10460 10461 -{{code language="php" theme="RDark" title="Get specific Source Request" collapse="true"}}10533 +{{code language="php" theme="RDark" title="Get specific Source Request"}} 10462 10462 <?php 10463 10463 10464 10464 $curl = curl_init(); ... ... @@ -10485,7 +10485,7 @@ 10485 10485 10486 10486 \\ 10487 10487 10488 -(% style="color: rgb(107,107,107);" %)Response 10560 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10489 10489 10490 10490 {{code language="yml" theme="RDark" title="Get specific Source Response" collapse="true"}} 10491 10491 { ... ... @@ -10536,7 +10536,7 @@ 10536 10536 10537 10537 (% style="color: rgb(107,107,107);" %)Request 10538 10538 10539 -{{code language="php" theme="RDark" title="Lookup Source code Request" collapse="true"}}10611 +{{code language="php" theme="RDark" title="Lookup Source code Request"}} 10540 10540 <?php 10541 10541 10542 10542 $curl = curl_init(); ... ... @@ -10563,7 +10563,7 @@ 10563 10563 10564 10564 \\ 10565 10565 10566 -(% style="color: rgb(107,107,107);" %)Response 10638 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10567 10567 10568 10568 {{code language="yml" theme="RDark" title="Lookup Source code Response" collapse="true"}} 10569 10569 { ... ... @@ -10606,7 +10606,7 @@ 10606 10606 10607 10607 ---- 10608 10608 10609 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}10681 +{{code language="yml" theme="RDark" title="Body"}} 10610 10610 {"Source":"Test source code from API"} 10611 10611 {{/code}} 10612 10612 ... ... @@ -10616,7 +10616,7 @@ 10616 10616 10617 10617 (% style="color: rgb(107,107,107);" %)Request 10618 10618 10619 -{{code language="php" theme="RDark" title="Create Source code Request" collapse="true"}}10691 +{{code language="php" theme="RDark" title="Create Source code Request"}} 10620 10620 <?php 10621 10621 10622 10622 $curl = curl_init(); ... ... @@ -10644,7 +10644,7 @@ 10644 10644 10645 10645 \\ 10646 10646 10647 -(% style="color: rgb(107,107,107);" %)Response 10719 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10648 10648 10649 10649 {{code language="yml" theme="RDark" title="Create Source code Response" collapse="true"}} 10650 10650 { ... ... @@ -10687,7 +10687,7 @@ 10687 10687 10688 10688 ---- 10689 10689 10690 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}10762 +{{code language="yml" theme="RDark" title="Body"}} 10691 10691 {"Source":"Test API","Parent":215} 10692 10692 {{/code}} 10693 10693 ... ... @@ -10697,7 +10697,7 @@ 10697 10697 10698 10698 (% style="color: rgb(107,107,107);" %)Request 10699 10699 10700 -{{code language="php" theme="RDark" title="Update Source code Request" collapse="true"}}10772 +{{code language="php" theme="RDark" title="Update Source code Request"}} 10701 10701 <?php 10702 10702 10703 10703 $curl = curl_init(); ... ... @@ -10725,7 +10725,7 @@ 10725 10725 10726 10726 \\ 10727 10727 10728 -(% style="color: rgb(107,107,107);" %)Response 10800 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10729 10729 10730 10730 {{code language="yml" theme="RDark" title="Update Source code Response" collapse="true"}} 10731 10731 { ... ... @@ -10751,7 +10751,7 @@ 10751 10751 \\ 10752 10752 10753 10753 (% class="western" %) 10754 -**COMPONENT: Transactions** 10826 +=== **COMPONENT: Transactions** === 10755 10755 10756 10756 (% class="western" %) 10757 10757 This resource is for manipulating transactions resource. A transaction can be created or searched. ... ... @@ -10835,7 +10835,7 @@ 10835 10835 10836 10836 (% style="color: rgb(107,107,107);" %)Request 10837 10837 10838 -{{code language="php" theme="RDark" title="Get All Transaction Request" collapse="true"}}10910 +{{code language="php" theme="RDark" title="Get All Transaction Request"}} 10839 10839 <?php 10840 10840 10841 10841 $curl = curl_init(); ... ... @@ -10862,7 +10862,7 @@ 10862 10862 10863 10863 \\ 10864 10864 10865 -(% style="color: rgb(107,107,107);" %)Response 10937 +(% style="color: rgb(107,107,107);" %)Response 200 OK 10866 10866 10867 10867 {{code language="yml" theme="RDark" title="Get All Transaction Response" collapse="true"}} 10868 10868 { ... ... @@ -12401,7 +12401,7 @@ 12401 12401 12402 12402 (% style="color: rgb(107,107,107);" %)Request 12403 12403 12404 -{{code language="php" theme="RDark" title="Get specific Transaction Request" collapse="true"}}12476 +{{code language="php" theme="RDark" title="Get specific Transaction Request"}} 12405 12405 <?php 12406 12406 12407 12407 $curl = curl_init(); ... ... @@ -12428,7 +12428,7 @@ 12428 12428 12429 12429 \\ 12430 12430 12431 -(% style="color: rgb(107,107,107);" %)Response 12503 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12432 12432 12433 12433 {{code language="yml" theme="RDark" title="Get specific Transaction Response" collapse="true"}} 12434 12434 { ... ... @@ -12488,7 +12488,7 @@ 12488 12488 12489 12489 (% style="color: rgb(107,107,107);" %)Request 12490 12490 12491 -{{code language="php" theme="RDark" title="Lookup Transaction Request" collapse="true"}}12563 +{{code language="php" theme="RDark" title="Lookup Transaction Request"}} 12492 12492 <?php 12493 12493 12494 12494 $curl = curl_init(); ... ... @@ -12515,7 +12515,7 @@ 12515 12515 12516 12516 \\ 12517 12517 12518 -(% style="color: rgb(107,107,107);" %)Response 12590 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12519 12519 12520 12520 {{code language="yml" theme="RDark" title="Lookup Transaction Response" collapse="true"}} 12521 12521 { ... ... @@ -12743,7 +12743,7 @@ 12743 12743 12744 12744 ---- 12745 12745 12746 -{{code language="yml" theme="RDark" title="Body" collapse="true"}}12818 +{{code language="yml" theme="RDark" title="Body"}} 12747 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 12748 {{/code}} 12749 12749 ... ... @@ -12753,7 +12753,7 @@ 12753 12753 12754 12754 (% style="color: rgb(107,107,107);" %)Request 12755 12755 12756 -{{code language="php" theme="RDark" title="Create Transaction Request" collapse="true"}}12828 +{{code language="php" theme="RDark" title="Create Transaction Request"}} 12757 12757 <?php 12758 12758 12759 12759 $curl = curl_init(); ... ... @@ -12781,7 +12781,7 @@ 12781 12781 12782 12782 \\ 12783 12783 12784 -(% style="color: rgb(107,107,107);" %)Response 12856 +(% style="color: rgb(107,107,107);" %)Response 200 OK 12785 12785 12786 12786 {{code language="yml" theme="RDark" title="Create Transaction Response" collapse="true"}} 12787 12787 { ... ... @@ -12812,57 +12812,397 @@ 12812 12812 12813 12813 \\ 12814 12814 12815 - \\12887 +=== **COMPONENT: Engagements** === 12816 12816 12817 -\\ 12889 +(% class="western" %) 12890 +Engagement can be added, updated and searched for using the engagements resource from the api. 12818 12818 12892 +(% class="western" %) 12819 12819 \\ 12820 12820 12821 -\\ 12895 +(% class="wrapped" %) 12896 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12897 +((( 12898 +(% class="western" %) 12899 +**Method** 12900 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12901 +((( 12902 +(% class="western" %) 12903 +**Url** 12904 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12905 +((( 12906 +(% class="western" %) 12907 +**Action** 12908 +))) 12909 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12910 +((( 12911 +(% class="western" %) 12912 +GET 12913 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12914 +((( 12915 +(% class="western" %) 12916 +/(% style="color: rgb(33,33,33);" %)engagements 12917 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12918 +((( 12919 +(% class="western" %) 12920 +Get engagement data limiting 25. 12921 +))) 12922 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12923 +((( 12924 +(% class="western" %) 12925 +GET 12926 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12927 +((( 12928 +(% class="western" %) 12929 +/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id> 12930 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12931 +((( 12932 +(% class="western" %) 12933 +Get data for engagement id. The engagement id is a string 12934 +))) 12935 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12936 +((( 12937 +(% class="western" %) 12938 +POST 12939 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12940 +((( 12941 +(% class="western" %) 12942 +/(% style="color: rgb(33,33,33);" %)engagements 12943 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12944 +((( 12945 +(% class="western" %) 12946 +Create a new engagement 12822 12822 12823 -\\ 12948 +(% class="western" %) 12949 +Parameters required to create the engagement needs to be sent as post data in JSON format. 12950 +))) 12951 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12952 +((( 12953 +(% class="western" %) 12954 +PUT 12955 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12956 +((( 12957 +(% class="western" %) 12958 +/(% style="color: rgb(33,33,33);" %)engagements(%%)/<engagement id> 12959 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12960 +((( 12961 +(% class="western" %) 12962 +Update engagement by engagement id. The engagement id string 12824 12824 12825 -\\ 12964 +(% class="western" %) 12965 +Parameters required to update the engagement needs to be sent as post data in JSON format. 12966 +))) 12967 +|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12968 +((( 12969 +(% class="western" %) 12970 +POST 12971 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12972 +((( 12973 +(% class="western" %) 12974 +(% style="color: rgb(33,33,33);" %)/engagements/addUser 12975 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %) 12976 +((( 12977 +(% class="western" %) 12978 +Add user to engagement 12826 12826 12827 -\\ 12980 +(% class="western" %) 12981 +Parameters required to add user to the engagement needs to be sent as post data in JSON format. 12982 +))) 12828 12828 12829 12829 \\ 12830 12830 12831 -\\ 12986 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12987 +== (% class="sc-fzoaKM imuBmi" style="color: rgb(0,127,49);" %)GET (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)All Engagements(%%) == 12832 12832 12833 - \\12989 +---- 12834 12834 12835 - \\12991 +---- 12836 12836 12837 -\\ 12993 +{{panel bgColor="#D3D3D3" width="100%"}} 12994 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements 12995 +{{/panel}} 12838 12838 12839 - \\12997 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 12840 12840 12841 - \\12999 +---- 12842 12842 12843 - \\13001 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 12844 12844 12845 - \\13003 +==== Example ==== 12846 12846 12847 - \\13005 +---- 12848 12848 12849 - \\13007 +(% style="color: rgb(107,107,107);" %)Request 12850 12850 12851 -\\ 13009 +{{code language="php" theme="RDark" title="Get All Engagement Request"}} 13010 +<?php 12852 12852 12853 - \\13012 +$curl = curl_init(); 12854 12854 13014 +curl_setopt_array($curl, array( 13015 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements', 13016 + CURLOPT_RETURNTRANSFER => true, 13017 + CURLOPT_ENCODING => '', 13018 + CURLOPT_MAXREDIRS => 10, 13019 + CURLOPT_TIMEOUT => 0, 13020 + CURLOPT_FOLLOWLOCATION => true, 13021 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13022 + CURLOPT_CUSTOMREQUEST => 'GET', 13023 + CURLOPT_HTTPHEADER => array( 13024 + 'Appkey: {{ONECOUNT API KEY}}' 13025 + ), 13026 +)); 13027 + 13028 +$response = curl_exec($curl); 13029 + 13030 +curl_close($curl); 13031 +echo $response; 13032 + 13033 + 13034 +{{/code}} 13035 + 12855 12855 \\ 12856 12856 13038 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13039 +== (% class="sc-fzoaKM imuBmi" style="color: rgb(0,127,49);" %)GET (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Specific Engagement(%%) == 13040 + 13041 +---- 13042 + 13043 +---- 13044 + 13045 +{{panel bgColor="#D3D3D3" width="100%"}} 13046 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement ID}} 13047 +{{/panel}} 13048 + 13049 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13050 + 13051 +---- 13052 + 13053 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 13054 + 13055 +==== Example ==== 13056 + 13057 +---- 13058 + 13059 +(% style="color: rgb(107,107,107);" %)Request 13060 + 13061 +{{code language="php" theme="RDark" title="Get Specific Engagement Request"}} 13062 +<?php 13063 + 13064 +$curl = curl_init(); 13065 + 13066 +curl_setopt_array($curl, array( 13067 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement ID}}', 13068 + CURLOPT_RETURNTRANSFER => true, 13069 + CURLOPT_ENCODING => '', 13070 + CURLOPT_MAXREDIRS => 10, 13071 + CURLOPT_TIMEOUT => 0, 13072 + CURLOPT_FOLLOWLOCATION => true, 13073 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13074 + CURLOPT_CUSTOMREQUEST => 'GET', 13075 + CURLOPT_HTTPHEADER => array( 13076 + 'Appkey: {{ONECOUNT API KEY}}' 13077 + ), 13078 +)); 13079 + 13080 +$response = curl_exec($curl); 13081 + 13082 +curl_close($curl); 13083 +echo $response; 13084 + 13085 + 13086 +{{/code}} 13087 + 12857 12857 \\ 12858 12858 13090 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13091 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Create Engagement(%%) == 13092 + 13093 +---- 13094 + 13095 +{{panel bgColor="#D3D3D3" width="100%"}} 13096 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements 13097 +{{/panel}} 13098 + 13099 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13100 + 13101 +---- 13102 + 13103 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 13104 + 13105 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13106 + 13107 +---- 13108 + 13109 +{{code language="yml" theme="RDark" title="Body"}} 13110 +{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13111 + {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"}, 13112 + {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"}, 13113 + {"Price":[],"Type": "numeric"}, 13114 + {"Transaction Date":[],"Type": "date"} 13115 +]} 13116 +{{/code}} 13117 + 13118 +==== Example ==== 13119 + 13120 +---- 13121 + 13122 +(% style="color: rgb(107,107,107);" %)Request 13123 + 13124 +{{code language="php" theme="RDark" title="Create Engagement Request"}} 13125 + <?php 13126 + 13127 +$curl = curl_init(); 13128 + 13129 +curl_setopt_array($curl, array( 13130 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements', 13131 + CURLOPT_RETURNTRANSFER => true, 13132 + CURLOPT_ENCODING => '', 13133 + CURLOPT_MAXREDIRS => 10, 13134 + CURLOPT_TIMEOUT => 0, 13135 + CURLOPT_FOLLOWLOCATION => true, 13136 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13137 + CURLOPT_CUSTOMREQUEST => 'POST', 13138 + CURLOPT_POSTFIELDS =>'{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13139 + {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"}, 13140 + {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"}, 13141 + {"Price":[],"Type": "numeric"}, 13142 + {"Transaction Date":[],"Type": "date"} 13143 +]}', 13144 + CURLOPT_HTTPHEADER => array( 13145 + 'Appkey: {{ONECOUNT API KEY}}' 13146 + ), 13147 +)); 13148 + 13149 +$response = curl_exec($curl); 13150 + 13151 +curl_close($curl); 13152 +echo $response; 13153 +{{/code}} 13154 + 12859 12859 \\ 12860 12860 13157 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13158 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(0, 83, 184)" %)PUT (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %)Update Engagement(%%) == 13159 + 13160 +---- 13161 + 13162 +{{panel bgColor="#D3D3D3" width="100%"}} 13163 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/~{~{Engagement Id}} 13164 +{{/panel}} 13165 + 13166 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13167 + 13168 +---- 13169 + 13170 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 13171 + 13172 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13173 + 13174 +---- 13175 + 13176 +{{code language="yml" theme="RDark" title="Body"}} 13177 +{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13178 + {"Name":[{"webinar ID 5":"Webinar 5"},{"webinar ID 4":"Webinar 4"}],"Type": "select"}, 13179 + {"Price":[],"Type": "text"} 13180 +]} 13181 +{{/code}} 13182 + 13183 +==== Example ==== 13184 + 13185 +---- 13186 + 13187 +(% style="color: rgb(107,107,107);" %)Request 13188 + 13189 +{{code language="php" theme="RDark" title="Update Engagement Request"}} 13190 + <?php 13191 + 13192 +$curl = curl_init(); 13193 + 13194 +curl_setopt_array($curl, array( 13195 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement Id}}', 13196 + CURLOPT_RETURNTRANSFER => true, 13197 + CURLOPT_ENCODING => '', 13198 + CURLOPT_MAXREDIRS => 10, 13199 + CURLOPT_TIMEOUT => 0, 13200 + CURLOPT_FOLLOWLOCATION => true, 13201 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13202 + CURLOPT_CUSTOMREQUEST => 'PUT', 13203 + CURLOPT_POSTFIELDS =>'{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[ 13204 + {"Name":[{"webinar ID 5":"Webinar 5"},{"webinar ID 4":"Webinar 4"}],"Type": "select"}, 13205 + {"Price":[],"Type": "text"} 13206 +]}', 13207 + CURLOPT_HTTPHEADER => array( 13208 + 'Appkey: {{ONECOUNT API KEY}}' 13209 + ), 13210 +)); 13211 + 13212 +$response = curl_exec($curl); 13213 + 13214 +curl_close($curl); 13215 +echo $response; 13216 +{{/code}} 13217 + 12861 12861 \\ 12862 12862 13220 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13221 +== (% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33, 33, 33); color: rgb(173, 122, 3)" %)POST(% class="sc-fzomuh jbmEtY documentation-core-item-request-name" style="color: rgb(33,33,33);" %) Add User to Engagement(%%) == 13222 + 13223 +---- 13224 + 13225 +{{panel bgColor="#D3D3D3" width="100%"}} 13226 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/engagements/addUser 13227 +{{/panel}} 13228 + 13229 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) === 13230 + 13231 +---- 13232 + 13233 +(% class="Text__TextContainer-sc-1kqigik-0 iauueY sc-fznXWL cEvDCP item-key" style="color: rgb(33,33,33);" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color: rgb(33,33,33);" %)~{~{ONECOUNT API KEY}} 13234 + 13235 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) === 13236 + 13237 +---- 13238 + 13239 +{{code language="yml" theme="RDark" title="Body"}} 13240 +{"Engagement id":"073b3a98-129b-440e-90b1-57957215ca67","Vendor id":1, "Engagement show id":"webinar ID 4","User id":"3143231","timestamp":1702319997, "data":{"Attendance Status":"not_attended","Price":10.00},"segment":["segment id 1"]} 13241 +{{/code}} 13242 + 13243 +==== Example ==== 13244 + 13245 +---- 13246 + 13247 +(% style="color: rgb(107,107,107);" %)Request 13248 + 13249 +{{code language="php" theme="RDark" title="Add User to Engagement Request"}} 13250 + <?php 13251 + 13252 +$curl = curl_init(); 13253 + 13254 +curl_setopt_array($curl, array( 13255 + CURLOPT_URL => 'https://api.onecount.net/v2/engagements/addUser', 13256 + CURLOPT_RETURNTRANSFER => true, 13257 + CURLOPT_ENCODING => '', 13258 + CURLOPT_MAXREDIRS => 10, 13259 + CURLOPT_TIMEOUT => 0, 13260 + CURLOPT_FOLLOWLOCATION => true, 13261 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13262 + CURLOPT_CUSTOMREQUEST => 'POST', 13263 + CURLOPT_POSTFIELDS =>'{"Engagement id":"073b3a98-129b-440e-90b1-57957215ca67","Vendor id":1, "Engagement show id":"webinar ID 4","User id":"3143231","timestamp":1702319997, "data":{"Attendance Status":"not_attended","Price":10.00},"segment":["segment id 1"]}', 13264 + CURLOPT_HTTPHEADER => array( 13265 + 'Appkey: {{ONECOUNT API KEY}}' 13266 + ), 13267 +)); 13268 + 13269 +$response = curl_exec($curl); 13270 + 13271 +curl_close($curl); 13272 +echo $response; 13273 +{{/code}} 13274 + 12863 12863 (% class="western" %) 12864 -**COMPONENT: Leads 12865 -** 13276 +=== **COMPONENT: Leads 13277 +** === 12866 12866 12867 12867 (% class="western" %) 12868 12868 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. ... ... @@ -13047,14 +13047,6 @@ 13047 13047 13048 13048 \\ 13049 13049 13050 -\\ 13051 - 13052 -\\ 13053 - 13054 -\\ 13055 - 13056 -\\ 13057 - 13058 13058 (% class="western" %) 13059 13059 **API REFERENCE** 13060 13060
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -10 82654831 +110231560 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://info.onecount.net//wiki/spaces/OD/pages/10 8265483/ONEcount API Documentation1 +https://info.onecount.net//wiki/spaces/OD/pages/110231560/ONEcount API Documentation