Changes for page ONEcount API Documentation
Last modified by Rayaan Ahmed on 2025/02/09 22:20
To version 8.2
edited by Rayaan Ahmed
on 2024/02/26 11:24
on 2024/02/26 11:24
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -58,7 +58,6 @@ 58 58 11. Get specific engagement by engagement id 59 59 11. Create Engagements 60 60 11. Update Engagements 61 -11. Add options to metric for an engagement 62 62 11. Add users data to Engagement 63 63 1. Segments 64 64 11. Get all Segments ... ... @@ -66,6 +66,7 @@ 66 66 11. Add users to segment 67 67 11. Get all segment ids for a user 68 68 68 + 69 69 (% class="western" %) 70 70 **Accessing API** 71 71 ... ... @@ -96,6 +96,7 @@ 96 96 Any JSON data or JSON files containing information needed for requests, such as updating a record with new information. 97 97 ))) 98 98 99 + 99 99 (% class="western" %) 100 100 **General API Usage** 101 101 ... ... @@ -148,13 +148,13 @@ 148 148 === **COMPONENT: Users** === 149 149 150 150 (% class="western" %) 151 -Users means the customers of your system. Users can be added, updated and searched for using the users resource from the api. For lookup, If a return parameter is specified Users JSONobject will have those fields. If nothing is specified by default only UserId is returned.152 +Users means the customers of your system. Users can be added, updated and searched for using the users resource from the api. For lookup, If a return parameter is specified Users object will have those fields. If nothing is specified by default only UserId is returned. 152 152 153 153 (% class="western" %) 154 154 Additionally (Array of) transaction object specifying parts of the transaction to be added to the new user can be specified. UserId, TransactionId and SubscriptionType will be ignored if specified for this case. As this is new user and new transaction is being added. 155 155 156 156 (% class="western" %) 157 -In this case the provided demographic information in users JSONobject will be used to create a new user in ONEcount and then a response will be generated. Before creating a new user, a check for duplicate will be performed based on Dedupe columns and if found, and error code will be generated.158 +In this case the provided demographic information in users object will be used to create a new user in ONEcount and then a response will be generated. Before creating a new user, a check for duplicate will be performed based on Dedupe columns and if found, and error code will be generated. 158 158 159 159 (% class="western" %) 160 160 If username and password is not one of the parameters being passed, then a random username and password will be generated for the user while creating his user account in ONEcount. ... ... @@ -236,25 +236,7 @@ 236 236 Create a new users 237 237 238 238 (% class="western" %) 239 -Parameters required to create the user needs to be sent as post data in JSON format. Below is the example of data 240 -\\Example: 241 - 242 -(% class="western" %) 243 -{"Users":{"PartnerId":1,"Demo":{"1":"rayaan@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[],"Return":"4,5,1"} 244 - 245 - 246 -(% class="western" %) 247 -1) PartherId is required, this can be any integer value. 248 - 249 -(% class="western" %) 250 -2) Demo is required it contains JSON object of user demographic information key as demo id and value as actual information of user. 251 - 252 -(% class="western" %) 253 -3) DedupeColumn is required, this contains demo id as value, used to check duplicate user based on demo id. 254 - 255 -(% class="western" %) 256 -4) Transactions is required, If user does not have any transaction pass empty array if user has a transaction pass transaction JSON object. please refer transaction API body for JSON object. 257 - 240 +Parameters required to create the user needs to be sent as post data in JSON format. 258 258 ))) 259 259 |(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %) 260 260 ((( ... ... @@ -1168,7 +1168,7 @@ 1168 1168 )))|(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %) 1169 1169 ((( 1170 1170 (% class="western" %) 1171 -Users object that contains information about user to create. PartnerId Needs to be specified. PartnerId is any integer value.1154 +Users object that contains information about user to create. PartnerId Needs to be specified. 1172 1172 ))) 1173 1173 |(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %) 1174 1174 ((( ... ... @@ -1640,11 +1640,9 @@ 1640 1640 1641 1641 (% class="western" %) 1642 1642 JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update. 1643 - 1644 -(% class="western" %) 1645 -NOTE: While updating a select and checkbox type question you need to pass complete set of Choices for that question including the one which are already existing. If not the choices will be overwritten from the choices from the body. 1646 1646 ))) 1647 1647 1628 + 1648 1648 (% id="HGETAllQuestions" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 1649 1649 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Questions(%%) == 1650 1650 ... ... @@ -8158,9 +8158,8 @@ 8158 8158 (% id="HPUTUpdatequestion" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8159 8159 == (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#0053b8" %)PUT (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)Update question(%%) == 8160 8160 8142 +---- 8161 8161 8162 -NOTE: While updating a select and checkbox type question you need to pass complete set of Choices for that question including the one which are already existing. If not the choices will be overwritten from the choices from the body. 8163 - 8164 8164 {{panel bgColor="#D3D3D3" width="100%"}} 8165 8165 (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color:#212121" %)/questions/~{~{QUESTION ID}} 8166 8166 {{/panel}} ... ... @@ -8342,6 +8342,7 @@ 8342 8342 {"ProductID":"65","ResourceID":”121"} 8343 8343 ))) 8344 8344 8325 + 8345 8345 (% id="HGETAllProducts" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 8346 8346 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Products(%%) == 8347 8347 ... ... @@ -9095,6 +9095,7 @@ 9095 9095 JSON of the terms type object needs to be sent as post data. Id field is mandatory for update. 9096 9096 ))) 9097 9097 9079 + 9098 9098 (% id="HGETAllTerms" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9099 9099 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Terms(%%) == 9100 9100 ... ... @@ -9700,6 +9700,7 @@ 9700 9700 JSON of the resources type object needs to be sent as post data. Id field is mandatory for update. 9701 9701 ))) 9702 9702 9685 + 9703 9703 (% id="HGETAllResources" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 9704 9704 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Resources(%%) == 9705 9705 ... ... @@ -10169,7 +10169,7 @@ 10169 10169 (% id="HCOMPONENT:SourceCodes" class="western" %) 10170 10170 === **COMPONENT: Source Codes** === 10171 10171 10172 -* 10155 +* 10173 10173 ** === 10174 10174 10175 10175 (% class="western" %) ... ... @@ -10242,6 +10242,7 @@ 10242 10242 JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update. 10243 10243 ))) 10244 10244 10228 + 10245 10245 (% id="HGETAllSourcecodes" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10246 10246 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Source codes(%%) == 10247 10247 ... ... @@ -10822,6 +10822,7 @@ 10822 10822 JSON of the Transactions type object needs to be sent as post data. Id field should not be sent. 10823 10823 ))) 10824 10824 10809 + 10825 10825 (% id="HGETAllTransactions" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 10826 10826 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Transactions(%%) == 10827 10827 ... ... @@ -12891,11 +12891,7 @@ 12891 12891 12892 12892 (% class="western" %) 12893 12893 Parameters required to update the engagement needs to be sent as post data in JSON format. 12894 - 12895 -(% class="western" %) 12896 -NOTE: While updating a select and checkbox type question you need to pass complete set of Choices for that question including the one which are already existing. If not the choices will be overwritten from the choices from the body. 12897 12897 ))) 12898 -|(% style="text-align:left; vertical-align:top" %)POST|(% style="text-align:left; vertical-align:top" %) |(% style="text-align:left; vertical-align:top" %) 12899 12899 |(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %) 12900 12900 ((( 12901 12901 (% class="western" %) ... ... @@ -12913,6 +12913,7 @@ 12913 12913 Parameters required to add user to the engagement needs to be sent as post data in JSON format. 12914 12914 ))) 12915 12915 12897 + 12916 12916 (% id="HGETAllEngagements" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 12917 12917 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Engagements(%%) == 12918 12918 ... ... @@ -13391,8 +13391,8 @@ 13391 13391 13392 13392 ---- 13393 13393 13394 -{{code language="yml" title="Body"}} 13395 -{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357"," name":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}}13376 +{{code language="yml" theme="RDark" title="Body"}} 13377 +{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357","show id":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}} 13396 13396 {{/code}} 13397 13397 13398 13398 ==== Example ==== ... ... @@ -13401,7 +13401,7 @@ 13401 13401 13402 13402 (% style="color:#6b6b6b" %)Request 13403 13403 13404 -{{code language="php" title="Add User to Engagement Request"}} 13386 +{{code language="php" theme="RDark" title="Add User to Engagement Request"}} 13405 13405 <?php 13406 13406 13407 13407 $curl = curl_init(); ... ... @@ -13415,7 +13415,7 @@ 13415 13415 CURLOPT_FOLLOWLOCATION => true, 13416 13416 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13417 13417 CURLOPT_CUSTOMREQUEST => 'POST', 13418 - CURLOPT_POSTFIELDS =>'{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357"," name":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}}',13400 + CURLOPT_POSTFIELDS =>'{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357","show id":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}}', 13419 13419 CURLOPT_HTTPHEADER => array( 13420 13420 'Appkey: {{ONECOUNT API KEY}}' 13421 13421 ), ... ... @@ -13514,7 +13514,7 @@ 13514 13514 (% id="HCOMPONENT:Segments" class="western" %) 13515 13515 === **COMPONENT: Segments** === 13516 13516 13517 -* 13499 +* 13518 13518 ** === 13519 13519 13520 13520 (% class="western" %) ... ... @@ -13586,6 +13586,7 @@ 13586 13586 Get all segment user has be subscribed based on user id. 13587 13587 ))) 13588 13588 13571 + 13589 13589 (% id="HGETAllSegments" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13590 13590 == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Segments(%%) == 13591 13591 ... ... @@ -14007,7 +14007,7 @@ 14007 14007 (% id="HCOMPONENT:Leads" class="western" %) 14008 14008 === **COMPONENT: Leads** === 14009 14009 14010 -* 13993 +* 14011 14011 ** === 14012 14012 14013 14013 (% class="western" %) ... ... @@ -14073,6 +14073,7 @@ 14073 14073 JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent. 14074 14074 ))) 14075 14075 14059 + 14076 14076 (% class="western" %) 14077 14077 POST method can be used to create telemarketing stat. Telemarketing info needs to be sent as request and an Id will be returned when the transaction is created. 14078 14078 ... ... @@ -14187,6 +14187,7 @@ 14187 14187 Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format. 14188 14188 ))) 14189 14189 14174 + 14190 14190 (% class="western" %) 14191 14191 **API REFERENCE** 14192 14192 ... ... @@ -14280,6 +14280,8 @@ 14280 14280 Alias for admin purpose. 14281 14281 ))) 14282 14282 14268 + 14269 + 14283 14283 (% class="western" %) 14284 14284 **Type: Choices** 14285 14285 ... ... @@ -14363,6 +14363,7 @@ 14363 14363 Tied to which question id. 14364 14364 ))) 14365 14365 14353 + 14366 14366 (% class="western" %) 14367 14367 **Type: Users** 14368 14368 ... ... @@ -14433,6 +14433,7 @@ 14433 14433 Request date. 14434 14434 ))) 14435 14435 14424 + 14436 14436 (% class="western" %) 14437 14437 **Type: Demo** 14438 14438 ... ... @@ -14490,6 +14490,7 @@ 14490 14490 ... 14491 14491 ))) 14492 14492 14482 + 14493 14493 (% class="western" %) 14494 14494 **Type: Transactions** 14495 14495 ... ... @@ -14677,6 +14677,7 @@ 14677 14677 If there is amount (USD) included in transaction. 14678 14678 ))) 14679 14679 14670 + 14680 14680 (% class="western" %) 14681 14681 **Type: Sources** 14682 14682 ... ... @@ -14747,6 +14747,7 @@ 14747 14747 If this is a child source then list the parent source id. 14748 14748 ))) 14749 14749 14741 + 14750 14750 (% class="western" %) 14751 14751 **Type: Products** 14752 14752 ... ... @@ -14817,6 +14817,7 @@ 14817 14817 (Array of) Terms associated with the product. 14818 14818 ))) 14819 14819 14812 + 14820 14820 (% class="western" %) 14821 14821 **Type: Terms** 14822 14822 ... ... @@ -14926,6 +14926,7 @@ 14926 14926 If there is price (USD) for the term. 14927 14927 ))) 14928 14928 14922 + 14929 14929 (% class="western" %) 14930 14930 **Type: Resources** 14931 14931 ... ... @@ -15069,6 +15069,7 @@ 15069 15069 Default value is 0. This parameter is used to provide access to protected content. 15070 15070 ))) 15071 15071 15066 + 15072 15072 (% class="western" %) 15073 15073 **Type: Telemarketing** 15074 15074 ... ... @@ -15184,3 +15184,5 @@ 15184 15184 (% class="western" %) 15185 15185 If the page url already exists and it doesn't match with the one that is being sent then it will throw conflict error with the title in our system. 15186 15186 ))) 15182 + 15183 +