Last modified by Rayaan Ahmed on 2025/02/09 22:20

From version 10.3
edited by Rayaan Ahmed
on 2024/02/29 15:56
Change comment: (Autosaved)
To version 9.1
edited by Rayaan Ahmed
on 2024/02/26 11:24
Change comment: There is no comment for this version

Summary

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 JSON object 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 JSON 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 +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,16 +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" %)/engagements/metric/<engagement id>|(% style="text-align:left; vertical-align:top" %)(((
12899 -Add options to specific metric in an engagement without passing all options and overriding existing options.
12900 -
12901 -Parameters required to update the engagement needs to be sent as post data in JSON format.
12902 -\\This API is used to add options only for select and checkbox metrics. If any metric does not exist
12903 -)))
12904 12904  |(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %)
12905 12905  (((
12906 12906  (% class="western" %)
... ... @@ -12918,6 +12918,7 @@
12918 12918  Parameters required to add user to the engagement needs to be sent as post data in JSON format.
12919 12919  )))
12920 12920  
12897 +
12921 12921  (% id="HGETAllEngagements" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
12922 12922  == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Engagements(%%) ==
12923 12923  
... ... @@ -13396,8 +13396,8 @@
13396 13396  
13397 13397  ----
13398 13398  
13399 -{{code language="yml" title="Body"}}
13400 -{"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":{}}
13401 13401  {{/code}}
13402 13402  
13403 13403  ==== Example ====
... ... @@ -13406,7 +13406,7 @@
13406 13406  
13407 13407  (% style="color:#6b6b6b" %)Request
13408 13408  
13409 -{{code language="php" title="Add User to Engagement Request"}}
13386 +{{code language="php" theme="RDark" title="Add User to Engagement Request"}}
13410 13410   <?php
13411 13411  
13412 13412  $curl = curl_init();
... ... @@ -13420,7 +13420,7 @@
13420 13420   CURLOPT_FOLLOWLOCATION => true,
13421 13421   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13422 13422   CURLOPT_CUSTOMREQUEST => 'POST',
13423 - 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":{}}',
13424 13424   CURLOPT_HTTPHEADER => array(
13425 13425   'Appkey: {{ONECOUNT API KEY}}'
13426 13426   ),
... ... @@ -13519,7 +13519,7 @@
13519 13519  (% id="HCOMPONENT:Segments" class="western" %)
13520 13520  === **COMPONENT: Segments** ===
13521 13521  
13522 -*
13499 +*
13523 13523  ** ===
13524 13524  
13525 13525  (% class="western" %)
... ... @@ -13591,6 +13591,7 @@
13591 13591  Get all segment user has be subscribed based on user id.
13592 13592  )))
13593 13593  
13571 +
13594 13594  (% id="HGETAllSegments" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13595 13595  == (% class="imuBmi sc-fzoaKM" style="color:#007f31" %)GET (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)All Segments(%%) ==
13596 13596  
... ... @@ -14012,7 +14012,7 @@
14012 14012  (% id="HCOMPONENT:Leads" class="western" %)
14013 14013  === **COMPONENT: Leads** ===
14014 14014  
14015 -*
13993 +*
14016 14016  ** ===
14017 14017  
14018 14018  (% class="western" %)
... ... @@ -14078,6 +14078,7 @@
14078 14078  JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent.
14079 14079  )))
14080 14080  
14059 +
14081 14081  (% class="western" %)
14082 14082  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.
14083 14083  
... ... @@ -14192,6 +14192,7 @@
14192 14192  Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format.
14193 14193  )))
14194 14194  
14174 +
14195 14195  (% class="western" %)
14196 14196  **API REFERENCE**
14197 14197  
... ... @@ -14285,6 +14285,8 @@
14285 14285  Alias for admin purpose.
14286 14286  )))
14287 14287  
14268 +
14269 +
14288 14288  (% class="western" %)
14289 14289  **Type: Choices**
14290 14290  
... ... @@ -14368,6 +14368,7 @@
14368 14368  Tied to which question id.
14369 14369  )))
14370 14370  
14353 +
14371 14371  (% class="western" %)
14372 14372  **Type: Users**
14373 14373  
... ... @@ -14438,6 +14438,7 @@
14438 14438  Request date.
14439 14439  )))
14440 14440  
14424 +
14441 14441  (% class="western" %)
14442 14442  **Type: Demo**
14443 14443  
... ... @@ -14495,6 +14495,7 @@
14495 14495  ...
14496 14496  )))
14497 14497  
14482 +
14498 14498  (% class="western" %)
14499 14499  **Type: Transactions**
14500 14500  
... ... @@ -14682,6 +14682,7 @@
14682 14682  If there is amount (USD) included in transaction.
14683 14683  )))
14684 14684  
14670 +
14685 14685  (% class="western" %)
14686 14686  **Type: Sources**
14687 14687  
... ... @@ -14752,6 +14752,7 @@
14752 14752  If this is a child source then list the parent source id.
14753 14753  )))
14754 14754  
14741 +
14755 14755  (% class="western" %)
14756 14756  **Type: Products**
14757 14757  
... ... @@ -14822,6 +14822,7 @@
14822 14822  (Array of) Terms associated with the product.
14823 14823  )))
14824 14824  
14812 +
14825 14825  (% class="western" %)
14826 14826  **Type: Terms**
14827 14827  
... ... @@ -14931,6 +14931,7 @@
14931 14931  If there is price (USD) for the term.
14932 14932  )))
14933 14933  
14922 +
14934 14934  (% class="western" %)
14935 14935  **Type: Resources**
14936 14936  
... ... @@ -15074,6 +15074,7 @@
15074 15074  Default value is 0. This parameter is used to provide access to protected content.
15075 15075  )))
15076 15076  
15066 +
15077 15077  (% class="western" %)
15078 15078  **Type: Telemarketing**
15079 15079  
... ... @@ -15189,3 +15189,5 @@
15189 15189  (% class="western" %)
15190 15190  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.
15191 15191  )))
15182 +
15183 +