Changes for page ONEcount API Documentation
Last modified by Rayaan Ahmed on 2025/02/09 22:20
From version 11.1
edited by Rayaan Ahmed
on 2024/02/29 16:10
on 2024/02/29 16:10
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -10169,7 +10169,7 @@ 10169 10169 (% id="HCOMPONENT:SourceCodes" class="western" %) 10170 10170 === **COMPONENT: Source Codes** === 10171 10171 10172 -* 10172 +* 10173 10173 ** === 10174 10174 10175 10175 (% class="western" %) ... ... @@ -12895,12 +12895,7 @@ 12895 12895 (% class="western" %) 12896 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. 12903 -))) 12898 +|(% style="text-align:left; vertical-align:top" %)POST|(% style="text-align:left; vertical-align:top" %) |(% style="text-align:left; vertical-align:top" %) 12904 12904 |(% style="text-align:left; vertical-align:top" %)(% style="text-align: left;vertical-align: top;" %) 12905 12905 ((( 12906 12906 (% class="western" %) ... ... @@ -13377,149 +13377,6 @@ 13377 13377 {{/code}} 13378 13378 13379 13379 13380 -(% id="HPUTUpdateEngagement" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13381 -== (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" id="cke_bm_7146126S" style="color:#0053b8; display:none" %) (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#ad7a03" %)POST(% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#0053b8" %) (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %)Add options to metric(%%) == 13382 - 13383 ----- 13384 - 13385 -{{panel bgColor="#D3D3D3" width="100%"}} 13386 - (% class="nolink" %)https:~/~/api.onecount.net/v2(%%)/engagements/metric/(% style="color:#212121" %)~{~{Engagement Id}} 13387 -{{/panel}} 13388 - 13389 -=== (% class="core-title" style="color:#212121" %)Request Headers(%%) === 13390 - 13391 ----- 13392 - 13393 -(% class="Text__TextContainer-sc-1kqigik-0 cEvDCP iauueY item-key sc-fznXWL" style="color:#212121" %)Appkey (% class="Text__TextContainer-sc-1kqigik-0 iYynAw" style="color:#212121" %)~{~{ONECOUNT API KEY}} 13394 - 13395 -=== (% style="color:#212121" %)Body (% style="color:#6b6b6b" %)raw (json)(%%) === 13396 - 13397 ----- 13398 - 13399 -{{code language="yml" title="Body"}} 13400 -{"Metrics":[ 13401 - {"Attendance Status":[{"text":"checks","value":"checks"},{"text":"c","value":"c"}]}, 13402 - {"lagacy status":[{"text":"c","value":"c"}]} 13403 - ]} 13404 -{{/code}} 13405 - 13406 -==== Example ==== 13407 - 13408 ----- 13409 - 13410 -(% style="color:#6b6b6b" %)Request 13411 - 13412 -{{code language="php" title="(% class=~"documentation-core-item-request-name jbmEtY sc-fzomuh~" style=~"color:#212121~" %)Add options to metric"}} 13413 - <?php 13414 - 13415 -$curl = curl_init(); 13416 - 13417 -curl_setopt_array($curl, array( 13418 - CURLOPT_URL => 'https://api.onecount.net/v2/engagements/metric/{{Engagement Id}}', 13419 - CURLOPT_RETURNTRANSFER => true, 13420 - CURLOPT_ENCODING => '', 13421 - CURLOPT_MAXREDIRS => 10, 13422 - CURLOPT_TIMEOUT => 0, 13423 - CURLOPT_FOLLOWLOCATION => true, 13424 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 13425 - CURLOPT_CUSTOMREQUEST => 'PUT', 13426 - CURLOPT_POSTFIELDS =>'{"Metrics":[ 13427 - {"Attendance Status":[{"text":"checks","value":"checks"},{"text":"c","value":"c"}]}, 13428 - {"lagacy status":[{"text":"c","value":"c"}]} 13429 - ]}', 13430 - CURLOPT_HTTPHEADER => array( 13431 - 'Appkey: {{ONECOUNT API KEY}}', 13432 - 'Content-Type: application/json' 13433 - ), 13434 -)); 13435 - 13436 -$response = curl_exec($curl); 13437 - 13438 -curl_close($curl); 13439 -echo $response; 13440 - 13441 -{{/code}} 13442 - 13443 - 13444 -(% style="color:#6b6b6b" %)Response 200 OK 13445 - 13446 -{{code language="yml" title="(% class=~"documentation-core-item-request-name jbmEtY sc-fzomuh~" style=~"color:#212121~" %)Add options to metric"}} 13447 -{ 13448 - "result": { 13449 - "success": "1", 13450 - "error": { 13451 - "code": "", 13452 - "message": "" 13453 - } 13454 - }, 13455 - "Engagements": [ 13456 - { 13457 - "Id": "e0e816ec-77ba-4db1-bfc0-22d340337357", 13458 - "Name": "Test engagement 3", 13459 - "Metrics": [ 13460 - { 13461 - "Name": "Attendance Status", 13462 - "Type": "select", 13463 - "Values": [ 13464 - { 13465 - "text": "Attended", 13466 - "value": "attended" 13467 - }, 13468 - { 13469 - "text": "Not Attended", 13470 - "value": "not_attended" 13471 - }, 13472 - { 13473 - "text":"checks", 13474 - "value":"checks" 13475 - }, 13476 - { 13477 - "text":"c", 13478 - "value":"c" 13479 - } 13480 - ] 13481 - }, 13482 - { 13483 - "Name": "Price", 13484 - "Type": "text" 13485 - }, 13486 - { 13487 - "Name": "Name", 13488 - "Type": "select", 13489 - "Values": [ 13490 - { 13491 - "text": "Webinar 1", 13492 - "value": "Webinar_1" 13493 - }, 13494 - { 13495 - "text": "Webinar 2", 13496 - "value": "Webinar_2" 13497 - } 13498 - ] 13499 - }, 13500 - { 13501 - "Name": "Transaction Date", 13502 - "Type": "text" 13503 - }, 13504 - { 13505 - "Name": "id", 13506 - "Type": "text" 13507 - }, 13508 - { 13509 - "Name": "activity_time", 13510 - "Type": "text" 13511 - } 13512 - ] 13513 - } 13514 - ] 13515 -} 13516 -{{/code}} 13517 - 13518 - 13519 - 13520 - 13521 - 13522 - 13523 13523 (% id="HPOSTAddUsertoEngagement" style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %) 13524 13524 == (% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#ad7a03" %)POST(% class="documentation-core-item-request-name jbmEtY sc-fzomuh" style="color:#212121" %) Add User to Engagement(%%) == 13525 13525 ... ... @@ -13662,7 +13662,7 @@ 13662 13662 (% id="HCOMPONENT:Segments" class="western" %) 13663 13663 === **COMPONENT: Segments** === 13664 13664 13665 -* 13517 +* 13666 13666 ** === 13667 13667 13668 13668 (% class="western" %) ... ... @@ -14155,7 +14155,7 @@ 14155 14155 (% id="HCOMPONENT:Leads" class="western" %) 14156 14156 === **COMPONENT: Leads** === 14157 14157 14158 -* 14010 +* 14159 14159 ** === 14160 14160 14161 14161 (% class="western" %)