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

From version 6.1
edited by rayaan@one-count_com
on 2023/12/12 08:01
Change comment: There is no comment for this version
To version 7.1
edited by rayaan@one-count_com
on 2024/01/10 14:19
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -59,6 +59,11 @@
59 59  11. Create Engagements
60 60  11. Update Engagements
61 61  11. Add users data to Engagement
62 +1. Segments\\
63 +11. Get all Segments
64 +11. Get specific segment by segment id
65 +11. Add users to segment
66 +11. Get all segment ids for a user
62 62  
63 63  \\
64 64  
... ... @@ -13035,6 +13035,52 @@
13035 13035  
13036 13036  \\
13037 13037  
13043 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13044 +
13045 +{{code language="yml" theme="RDark" title="Get all engagements Response" collapse="true"}}
13046 + {
13047 + "result": {
13048 + "success": "1",
13049 + "error": {
13050 + "code": "",
13051 + "message": ""
13052 + }
13053 + },
13054 + "Engagements": [
13055 + {
13056 + "Id": "048d38e9-d6c3-432e-9671-3f31809d48b3",
13057 + "Name": "Test Engagement 1",
13058 + "Engagement Fields": [
13059 + {
13060 + "Name": "id",
13061 + "Type": "text"
13062 + },
13063 + {
13064 + "Name": "activity_time",
13065 + "Type": "text"
13066 + },
13067 + {
13068 + "Name": "Name",
13069 + "Type": "text"
13070 + },
13071 + {
13072 + "Name": "Test Field",
13073 + "Type": "select",
13074 + "Values": [
13075 + {
13076 + "text": "Test 1",
13077 + "value": "Test1"
13078 + }
13079 + ]
13080 + }
13081 + ]
13082 + }
13083 + ]
13084 +}
13085 +{{/code}}
13086 +
13087 +\\
13088 +
13038 13038  (% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13039 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 13040  
... ... @@ -13087,6 +13087,52 @@
13087 13087  
13088 13088  \\
13089 13089  
13141 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13142 +
13143 +{{code language="yml" theme="RDark" title="Get specific engagement Response" collapse="true"}}
13144 + {
13145 + "result": {
13146 + "success": "1",
13147 + "error": {
13148 + "code": "",
13149 + "message": ""
13150 + }
13151 + },
13152 + "Engagements": [
13153 + {
13154 + "Id": "048d38e9-d6c3-432e-9671-3f31809d48b3",
13155 + "Name": "Test Engagement 1",
13156 + "Engagement Fields": [
13157 + {
13158 + "Name": "id",
13159 + "Type": "text"
13160 + },
13161 + {
13162 + "Name": "activity_time",
13163 + "Type": "text"
13164 + },
13165 + {
13166 + "Name": "Name",
13167 + "Type": "text"
13168 + },
13169 + {
13170 + "Name": "Test Field",
13171 + "Type": "select",
13172 + "Values": [
13173 + {
13174 + "text": "Test 1",
13175 + "value": "Test1"
13176 + }
13177 + ]
13178 + }
13179 + ]
13180 + }
13181 + ]
13182 +}
13183 +{{/code}}
13184 +
13185 +\\
13186 +
13090 13090  (% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13091 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 13092  
... ... @@ -13122,7 +13122,7 @@
13122 13122  (% style="color: rgb(107,107,107);" %)Request
13123 13123  
13124 13124  {{code language="php" theme="RDark" title="Create Engagement Request"}}
13125 - <?php
13222 +<?php
13126 13126  
13127 13127  $curl = curl_init();
13128 13128  
... ... @@ -13135,14 +13135,15 @@
13135 13135   CURLOPT_FOLLOWLOCATION => true,
13136 13136   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13137 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"},
13235 + CURLOPT_POSTFIELDS =>'{"Name":"Test engagement 2", "Description":"Test engagement 2", "Metrics":[
13236 + {"Name":[{"text":"Webinar 1","value":"Webinar_1"},{"text":"Webinar 2","value":"Webinar_2"}],"Type": "select"},
13237 + {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"},
13141 13141   {"Price":[],"Type": "numeric"},
13142 - {"Transaction Date":[],"Type": "date"}
13239 + {"Transaction Date":[],"Type": "text"}
13143 13143  ]}',
13144 13144   CURLOPT_HTTPHEADER => array(
13145 - 'Appkey: {{ONECOUNT API KEY}}'
13242 + 'Appkey: {{ONECOUNT API KEY}}',
13243 + 'Content-Type: application/json'
13146 13146   ),
13147 13147  ));
13148 13148  
... ... @@ -13150,10 +13150,80 @@
13150 13150  
13151 13151  curl_close($curl);
13152 13152  echo $response;
13251 +
13252 +
13153 13153  {{/code}}
13154 13154  
13155 13155  \\
13156 13156  
13257 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13258 +
13259 +{{code language="yml" theme="RDark" title="Create Engagement Response" collapse="true"}}
13260 + {
13261 + "result": {
13262 + "success": "1",
13263 + "error": {
13264 + "code": "",
13265 + "message": ""
13266 + }
13267 + },
13268 + "Engagements": [
13269 + {
13270 + "Id": "71c1115f-e5bb-470a-bedf-6940f5ac8565",
13271 + "Name": "Test engagement 2",
13272 + "Metrics": [
13273 + {
13274 + "Name": "Name",
13275 + "Type": "select",
13276 + "Values": [
13277 + {
13278 + "text": "Webinar 1",
13279 + "value": "Webinar_1"
13280 + },
13281 + {
13282 + "text": "Webinar 2",
13283 + "value": "Webinar_2"
13284 + }
13285 + ]
13286 + },
13287 + {
13288 + "Name": "Attendance Status",
13289 + "Type": "select",
13290 + "Values": [
13291 + {
13292 + "text": "Attended",
13293 + "value": "attended"
13294 + },
13295 + {
13296 + "text": "Not Attended",
13297 + "value": "not_attended"
13298 + }
13299 + ]
13300 + },
13301 + {
13302 + "Name": "Price",
13303 + "Type": "numeric"
13304 + },
13305 + {
13306 + "Name": "Transaction Date",
13307 + "Type": "text"
13308 + },
13309 + {
13310 + "Name": "id",
13311 + "Type": "text"
13312 + },
13313 + {
13314 + "Name": "activity_time",
13315 + "Type": "text"
13316 + }
13317 + ]
13318 + }
13319 + ]
13320 +}
13321 +{{/code}}
13322 +
13323 +\\
13324 +
13157 13157  (% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13158 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 13159  
... ... @@ -13174,10 +13174,10 @@
13174 13174  ----
13175 13175  
13176 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"},
13345 +{"Name":"Test engagement 3", "Metrics":[
13346 + {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"},
13179 13179   {"Price":[],"Type": "text"}
13180 -]}
13348 + ]}
13181 13181  {{/code}}
13182 13182  
13183 13183  ==== Example ====
... ... @@ -13200,12 +13200,13 @@
13200 13200   CURLOPT_FOLLOWLOCATION => true,
13201 13201   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13202 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"},
13371 + CURLOPT_POSTFIELDS =>'{"Name":"Test engagement 3", "Metrics":[
13372 + {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"},
13205 13205   {"Price":[],"Type": "text"}
13206 -]}',
13374 + ]}',
13207 13207   CURLOPT_HTTPHEADER => array(
13208 - 'Appkey: {{ONECOUNT API KEY}}'
13376 + 'Appkey: {{ONECOUNT API KEY}}',
13377 + 'Content-Type: application/json'
13209 13209   ),
13210 13210  ));
13211 13211  
... ... @@ -13213,10 +13213,79 @@
13213 13213  
13214 13214  curl_close($curl);
13215 13215  echo $response;
13385 +
13216 13216  {{/code}}
13217 13217  
13218 13218  \\
13219 13219  
13390 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13391 +
13392 +{{code language="yml" theme="RDark" title="Update Engagement Response" collapse="true"}}
13393 +{
13394 + "result": {
13395 + "success": "1",
13396 + "error": {
13397 + "code": "",
13398 + "message": ""
13399 + }
13400 + },
13401 + "Engagements": [
13402 + {
13403 + "Id": "e0e816ec-77ba-4db1-bfc0-22d340337357",
13404 + "Name": "Test engagement 3",
13405 + "Metrics": [
13406 + {
13407 + "Name": "Attendance Status",
13408 + "Type": "select",
13409 + "Values": [
13410 + {
13411 + "text": "Attended",
13412 + "value": "attended"
13413 + },
13414 + {
13415 + "text": "Not Attended",
13416 + "value": "not_attended"
13417 + }
13418 + ]
13419 + },
13420 + {
13421 + "Name": "Price",
13422 + "Type": "text"
13423 + },
13424 + {
13425 + "Name": "Name",
13426 + "Type": "select",
13427 + "Values": [
13428 + {
13429 + "text": "Webinar 1",
13430 + "value": "Webinar_1"
13431 + },
13432 + {
13433 + "text": "Webinar 2",
13434 + "value": "Webinar_2"
13435 + }
13436 + ]
13437 + },
13438 + {
13439 + "Name": "Transaction Date",
13440 + "Type": "text"
13441 + },
13442 + {
13443 + "Name": "id",
13444 + "Type": "text"
13445 + },
13446 + {
13447 + "Name": "activity_time",
13448 + "Type": "text"
13449 + }
13450 + ]
13451 + }
13452 + ]
13453 +}
13454 +{{/code}}
13455 +
13456 +\\
13457 +
13220 13220  (% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13221 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 13222  
... ... @@ -13237,7 +13237,7 @@
13237 13237  ----
13238 13238  
13239 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"]}
13478 +{"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":{}}
13241 13241  {{/code}}
13242 13242  
13243 13243  ==== Example ====
... ... @@ -13260,7 +13260,7 @@
13260 13260   CURLOPT_FOLLOWLOCATION => true,
13261 13261   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13262 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"]}',
13501 + 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":{}}',
13264 13264   CURLOPT_HTTPHEADER => array(
13265 13265   'Appkey: {{ONECOUNT API KEY}}'
13266 13266   ),
... ... @@ -13272,6 +13272,92 @@
13272 13272  echo $response;
13273 13273  {{/code}}
13274 13274  
13513 +\\
13514 +
13515 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13516 +
13517 +{{code language="yml" theme="RDark" title="Add Users to Engagement Response" collapse="true"}}
13518 + {
13519 + "result": {
13520 + "success": "1",
13521 + "error": {
13522 + "code": "",
13523 + "message": ""
13524 + }
13525 + },
13526 + "Users": {
13527 + "ocid": 1845775,
13528 + "uuid": {
13529 + "type": {
13530 + "name": "uuid"
13531 + },
13532 + "uuid": "a1425a04-4c0c-4790-bcd6-425bc7729fd7",
13533 + "version": 4
13534 + },
13535 + "blacklisted": null,
13536 + "demo": {
13537 + "1": "rayaan@one-count.com",
13538 + "2": "user_1701788987",
13539 + "3": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5"
13540 + },
13541 + "email": "rayaan@one-count.com",
13542 + "espid": null,
13543 + "known": {
13544 + "type": {
13545 + "name": "smallint"
13546 + },
13547 + "value": "1"
13548 + },
13549 + "ocid_hash": "57b81cf5536171c84e6e8a0b762251ee7819737b2e95f1390fed97acc11a277b",
13550 + "partners_hash": null,
13551 + "password": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5",
13552 + "payment_cc_exp": null,
13553 + "payment_vendor_token": null,
13554 + "products": {
13555 + "599": "447"
13556 + },
13557 + "remarks": null,
13558 + "resources": null,
13559 + "smartlink_hash": null,
13560 + "subscription_active_resource_info": null,
13561 + "subscription_active_term_info": {
13562 + "447": "{\"renewed\":1,\"expiration_month\":202512,\"product_status\":\"2\",\"expiration_date\":20251211}"
13563 + },
13564 + "subscription_log": {
13565 + "type": {
13566 + "valueType": {
13567 + "name": "varchar"
13568 + }
13569 + },
13570 + "values": [
13571 + "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:09:01\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702303741,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}",
13572 + "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:20:49\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702304449,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}",
13573 + "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:34:26\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702305266,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}"
13574 + ]
13575 + },
13576 + "subscription_log_by_resource": null,
13577 + "subscription_source_code": [
13578 + "83"
13579 + ],
13580 + "targets": null,
13581 + "timestamp": {
13582 + "type": {
13583 + "name": "bigint"
13584 + },
13585 + "value": "1701788987"
13586 + },
13587 + "unconfirmed": null,
13588 + "update_time": null,
13589 + "username": "user_1701788987",
13590 + "vendor_blacklisted": null,
13591 + "vendor_esp": null,
13592 + "vendor_unconfirmed": null
13593 + }
13594 +}
13595 +{{/code}}
13596 +
13597 +\\
13598 +
13275 13275  (% class="western" %)
13276 13276  === **COMPONENT: Leads
13277 13277  ** ===
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -110231560
1 +110231562
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/110231560/ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/110231562/ONEcount API Documentation