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

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

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +System Setup Detail and Technical Information
Content
... ... @@ -13597,6 +13597,507 @@
13597 13597  \\
13598 13598  
13599 13599  (% class="western" %)
13600 +=== **COMPONENT: Segments
13601 +** ===
13602 +
13603 +(% class="western" %)
13604 +This resource is for manipulating segment for a resource. A segment can be searched (or) add users to segment (or)  get all segment for a user.
13605 +
13606 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13607 +(((
13608 +(% class="western" %)
13609 +**Method**
13610 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13611 +(((
13612 +(% class="western" %)
13613 +**Url**
13614 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13615 +(((
13616 +(% class="western" %)
13617 +**Action**
13618 +)))
13619 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13620 +(((
13621 +(% class="western" %)
13622 +GET
13623 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13624 +(((
13625 +(% class="western" %)
13626 +/(% style="color: rgb(33,33,33);" %)segments
13627 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13628 +(((
13629 +(% class="western" %)
13630 +Get all segments.
13631 +)))
13632 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13633 +(((
13634 +(% class="western" %)
13635 +GET
13636 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13637 +(((
13638 +(% class="western" %)
13639 +/(% style="color: rgb(33,33,33);" %)segments(%%)/(% class="resolvedVariable" style="text-decoration: none;" %)~{~{Segment id}}
13640 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13641 +(((
13642 +(% class="western" %)
13643 +Get specific segment based on segment id.
13644 +)))
13645 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13646 +(((
13647 +(% class="western" %)
13648 +POST
13649 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13650 +(((
13651 +(% class="western" %)
13652 +/(% style="color: rgb(33,33,33);" %)segments/addUsers
13653 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13654 +(((
13655 +(% class="western" %)
13656 +Add users to segment.
13657 +)))
13658 +(% class="" %)|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13659 +(((
13660 +(% class="western" %)
13661 +GET
13662 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13663 +(((
13664 +(% class="western" %)
13665 +/(% style="color: rgb(33,33,33);" %)segments/users/(% class="resolvedVariable" style="text-decoration: none;" %)~{~{ocid}}
13666 +)))|(% style="text-align: left;vertical-align: top;" %)(% style="text-align: left;vertical-align: top;" %)
13667 +(((
13668 +(% class="western" %)
13669 +Get all segment user has be subscribed based on user id.
13670 +)))
13671 +
13672 +\\
13673 +
13674 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13675 +== (% 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 Segments(%%) ==
13676 +
13677 +----
13678 +
13679 +----
13680 +
13681 +{{panel bgColor="#D3D3D3" width="100%"}}
13682 +(% class="nolink nolink" %)https:~/~/api.onecount.net/v2(% class="nolink" style="color: rgb(33,33,33);" %)/segments
13683 +{{/panel}}
13684 +
13685 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13686 +
13687 +----
13688 +
13689 +(% 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}}
13690 +
13691 +==== Example ====
13692 +
13693 +----
13694 +
13695 +(% style="color: rgb(107,107,107);" %)Request
13696 +
13697 +{{code language="php" theme="RDark" title="Get All Segments Request"}}
13698 +<?php
13699 +
13700 +$curl = curl_init();
13701 +
13702 +curl_setopt_array($curl, array(
13703 + CURLOPT_URL => 'https://api.onecount.net/v2/segments',
13704 + CURLOPT_RETURNTRANSFER => true,
13705 + CURLOPT_ENCODING => '',
13706 + CURLOPT_MAXREDIRS => 10,
13707 + CURLOPT_TIMEOUT => 0,
13708 + CURLOPT_FOLLOWLOCATION => true,
13709 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13710 + CURLOPT_CUSTOMREQUEST => 'GET',
13711 + CURLOPT_HTTPHEADER => array(
13712 + 'Appkey: {{ONECOUNT API KEY}}'
13713 + ),
13714 +));
13715 +
13716 +$response = curl_exec($curl);
13717 +
13718 +curl_close($curl);
13719 +echo $response;
13720 +{{/code}}
13721 +
13722 +\\
13723 +
13724 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13725 +
13726 +{{code language="yml" theme="RDark" title="Get All Segments Response" collapse="true"}}
13727 + {
13728 + "result": {
13729 + "success": "1",
13730 + "error": {
13731 + "code": "",
13732 + "message": ""
13733 + }
13734 + },
13735 + "Segments": [
13736 + {
13737 + "Id": "891aa4b6-9e0e-4706-b08a-e7acb54e7e43",
13738 + "Name": "2022 Use Cases PDF Download"
13739 + },
13740 + {
13741 + "Id": "a639cb1f-6509-447b-a1d7-93a8e8ef61b1",
13742 + "Name": "58-percent conversion-rate"
13743 + },
13744 + {
13745 + "Id": "43eefdc6-89ab-4472-88c3-e16fb9619138",
13746 + "Name": "Audience Marketing Pop-Up"
13747 + },
13748 + {
13749 + "Id": "68219b37-c155-4459-a5ce-497261286ffe",
13750 + "Name": "Bold Minds Reminders"
13751 + },
13752 + {
13753 + "Id": "6450defc-7658-4182-9c2a-a8f8420f801e",
13754 + "Name": "Demo - Aviator's Guide - NL Popup"
13755 + },
13756 + {
13757 + "Id": "28774f7c-9fd3-4dff-a42e-683460f437c0",
13758 + "Name": "Getting 80-Percent Conversion Rates Pop-up"
13759 + },
13760 + {
13761 + "Id": "71b655e6-a11a-46af-bed5-b9eb1d6ac3aa",
13762 + "Name": "Holiday Special Offer - 3 mo. Pilot"
13763 + },
13764 + {
13765 + "Id": "16305ad0-8e65-4085-942e-04d99fd39207",
13766 + "Name": "Identity Resolution Test II"
13767 + },
13768 + {
13769 + "Id": "fcdfa9cb-baa2-4cc8-86b3-8f604471f2f3",
13770 + "Name": "Live ONEcount Popup Example Segment"
13771 + },
13772 + {
13773 + "Id": "2463b0a3-1e22-4fd0-97b2-bbdae30e585a",
13774 + "Name": "Live webinar - June 15 - Accelerate Revenue"
13775 + },
13776 + {
13777 + "Id": "d8d1bc9d-ede2-4c82-a747-10ab9fb979de",
13778 + "Name": "LIVE WEBINAR ONEcount BI Pop-up Campaign"
13779 + },
13780 + {
13781 + "Id": "d883ecdb-5307-416d-9558-c196472021c9",
13782 + "Name": "New Year - Increase Revenue 30-Percent"
13783 + },
13784 + {
13785 + "Id": "08abbc5b-aafe-4834-90f5-ac45fe025d73",
13786 + "Name": "OC Test"
13787 + },
13788 + {
13789 + "Id": "24cf72e9-ad71-489c-89ef-b80d0c42e2e2",
13790 + "Name": "Something big"
13791 + },
13792 + {
13793 + "Id": "0d37c79e-deb2-4287-9444-ae4812a9d8f0",
13794 + "Name": "Something No Other Platform Has"
13795 + },
13796 + {
13797 + "Id": "5eaa0345-a825-4ba0-a787-336312a77744",
13798 + "Name": "Something Revolutionary"
13799 + },
13800 + {
13801 + "Id": "c905d313-8d5e-45c1-aaab-7f8c8adc2bea",
13802 + "Name": "Something that will change your life"
13803 + },
13804 + {
13805 + "Id": "1bfb1c06-4b26-4ac3-a616-eb6b225e5f0e",
13806 + "Name": "Something You Have Always Wanted"
13807 + },
13808 + {
13809 + "Id": "28361c73-e253-49bb-a791-5481be2070a0",
13810 + "Name": "Something You Never Thought Possible"
13811 + },
13812 + {
13813 + "Id": "86e7129a-a538-4c56-a731-7e9c08fa8814",
13814 + "Name": "Test behaviour "
13815 + },
13816 + {
13817 + "Id": "e5e53cd4-bbd0-465b-b426-e267964fd0b4",
13818 + "Name": "Test behaviour banner segment"
13819 + },
13820 + {
13821 + "Id": "78ffd6d7-0b40-4e5a-8f32-622a04fb5561",
13822 + "Name": "Test behaviour combo"
13823 + },
13824 + {
13825 + "Id": "0022394d-7901-4aff-98c2-0c8c04fcb27a",
13826 + "Name": "Test behaviour content"
13827 + },
13828 + {
13829 + "Id": "89424642-1363-476e-9842-4f0a2544151f",
13830 + "Name": "Test behaviour email"
13831 + },
13832 + {
13833 + "Id": "ca848e53-3f3e-43c6-ae61-f331f3135c6c",
13834 + "Name": "Test demographic segments"
13835 + },
13836 + {
13837 + "Id": "e11d11fa-7603-4dee-a361-c6e909249ecd",
13838 + "Name": "Test with unknown only selecting all filters"
13839 + }
13840 + ]
13841 +}
13842 +{{/code}}
13843 +
13844 +\\
13845 +
13846 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13847 +== (% 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 Segments(%%) ==
13848 +
13849 +----
13850 +
13851 +{{panel bgColor="#D3D3D3" width="100%"}}
13852 + (% class="nolink nolink" %)https:~/~/api.onecount.net/v2(% class="nolink" style="color: rgb(33,33,33);" %)/segments/~{~{segment id}}
13853 +{{/panel}}
13854 +
13855 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13856 +
13857 +----
13858 +
13859 +(% 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}}
13860 +
13861 +==== Example ====
13862 +
13863 +----
13864 +
13865 +(% style="color: rgb(107,107,107);" %)Request
13866 +
13867 +{{code language="php" theme="RDark" title="Get specific Segment Request"}}
13868 + <?php
13869 +
13870 +$curl = curl_init();
13871 +
13872 +curl_setopt_array($curl, array(
13873 + CURLOPT_URL => 'https://api.onecount.net/v2/segments/{{segment id}}',
13874 + CURLOPT_RETURNTRANSFER => true,
13875 + CURLOPT_ENCODING => '',
13876 + CURLOPT_MAXREDIRS => 10,
13877 + CURLOPT_TIMEOUT => 0,
13878 + CURLOPT_FOLLOWLOCATION => true,
13879 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13880 + CURLOPT_CUSTOMREQUEST => 'GET',
13881 + CURLOPT_HTTPHEADER => array(
13882 + 'Appkey: {{ONECOUNT API KEY}}'
13883 + ),
13884 +));
13885 +
13886 +$response = curl_exec($curl);
13887 +
13888 +curl_close($curl);
13889 +echo $response;
13890 +{{/code}}
13891 +
13892 +\\
13893 +
13894 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13895 +
13896 +{{code language="yml" theme="RDark" title="Get specific Segments Response" collapse="true"}}
13897 + {
13898 + "result": {
13899 + "success": "1",
13900 + "error": {
13901 + "code": "",
13902 + "message": ""
13903 + }
13904 + },
13905 + "Segments": {
13906 + "Id": "e5e53cd4-bbd0-465b-b426-e267964fd0b4",
13907 + "Demos": {
13908 + "_empty_": [],
13909 + "type": ""
13910 + },
13911 + "Description": "",
13912 + "Action": {
13913 + "action": {}
13914 + },
13915 + "Name": "Test behaviour banner segment",
13916 + "Behaviours": [
13917 + {
13918 + "end_date": "05/26/2022",
13919 + "date_type": "Future",
13920 + "sub_category_values": [],
13921 + "sub_category": "clicked",
13922 + "category": "1",
13923 + "targets": [
13924 + "all"
13925 + ],
13926 + "joining_logic": "AND",
13927 + "frequency": "1",
13928 + "start_date": "04/26/2022",
13929 + "day_count": "100"
13930 + }
13931 + ],
13932 + "Accounts": []
13933 + }
13934 +}
13935 +{{/code}}
13936 +
13937 +\\
13938 +
13939 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
13940 +== (% 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 users to segments(%%) ==
13941 +
13942 +----
13943 +
13944 +{{panel bgColor="#D3D3D3" width="100%"}}
13945 +(% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/segments/addUsers
13946 +{{/panel}}
13947 +
13948 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
13949 +
13950 +----
13951 +
13952 +(% 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}}
13953 +
13954 +=== (% style="color: rgb(33,33,33);" %)Body (% style="color: rgb(107,107,107);" %)raw (json)(%%) ===
13955 +
13956 +----
13957 +
13958 +{{code language="yml" theme="RDark" title="Body"}}
13959 +{"Id":"78ffd6d7-0b40-4e5a-8f32-622a04fb5561","Users":[164499,676172,2134321]}
13960 +{{/code}}
13961 +
13962 +==== Example ====
13963 +
13964 +----
13965 +
13966 +(% style="color: rgb(107,107,107);" %)Request
13967 +
13968 +{{code language="php" theme="RDark" title="Add users to Segment Request"}}
13969 +<?php
13970 +
13971 +$curl = curl_init();
13972 +
13973 +curl_setopt_array($curl, array(
13974 + CURLOPT_URL => 'https://api.onecount.net/v2/segments/addUsers',
13975 + CURLOPT_RETURNTRANSFER => true,
13976 + CURLOPT_ENCODING => '',
13977 + CURLOPT_MAXREDIRS => 10,
13978 + CURLOPT_TIMEOUT => 0,
13979 + CURLOPT_FOLLOWLOCATION => true,
13980 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13981 + CURLOPT_CUSTOMREQUEST => 'POST',
13982 + CURLOPT_POSTFIELDS =>'{"Id":"78ffd6d7-0b40-4e5a-8f32-622a04fb5561","Users":[164499,676172,2134321]}',
13983 + CURLOPT_HTTPHEADER => array(
13984 + 'Appkey: {{ONECOUNT API KEY}}',
13985 + 'Content-Type: application/json'
13986 + ),
13987 +));
13988 +
13989 +$response = curl_exec($curl);
13990 +
13991 +curl_close($curl);
13992 +echo $response;
13993 +{{/code}}
13994 +
13995 +\\
13996 +
13997 +(% style="color: rgb(107,107,107);" %)Response  200 OK
13998 +
13999 +{{code language="yml" theme="RDark" title="Add users to segment Response" collapse="true"}}
14000 +{
14001 + "result": {
14002 + "success": "1",
14003 + "error": {
14004 + "code": "",
14005 + "message": ""
14006 + }
14007 + },
14008 + "Segments": {
14009 + "Error user ids": [
14010 + 676172,
14011 + 2134321
14012 + ],
14013 + "Inserted user ids": [
14014 + 164499
14015 + ]
14016 + }
14017 +}
14018 +{{/code}}
14019 +
14020 +\\
14021 +
14022 +(% style="margin-left: 0.0px;" class="sc-fznLPX cxTVKx" %)
14023 +== (% 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 segments for a User(%%) ==
14024 +
14025 +----
14026 +
14027 +{{panel bgColor="#D3D3D3" width="100%"}}
14028 + (% class="nolink" %)https:~/~/api.onecount.net/v2(% style="color: rgb(33,33,33);" %)/segments/users/(% class="nolink resolvedVariable" style="text-decoration: none;" %)~{~{ocid}}
14029 +{{/panel}}
14030 +
14031 +=== (% class="core-title" style="color: rgb(33,33,33);" %)Request Headers(%%) ===
14032 +
14033 +----
14034 +
14035 +(% 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}}
14036 +
14037 +==== Example ====
14038 +
14039 +----
14040 +
14041 +(% style="color: rgb(107,107,107);" %)Request
14042 +
14043 +{{code language="php" theme="RDark" title="Get all segments for a user Request"}}
14044 +<?php
14045 +
14046 +$curl = curl_init();
14047 +
14048 +curl_setopt_array($curl, array(
14049 + CURLOPT_URL => 'rayaan.onecount.net/api/v2/segments/users/••••••',
14050 + CURLOPT_RETURNTRANSFER => true,
14051 + CURLOPT_ENCODING => '',
14052 + CURLOPT_MAXREDIRS => 10,
14053 + CURLOPT_TIMEOUT => 0,
14054 + CURLOPT_FOLLOWLOCATION => true,
14055 + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
14056 + CURLOPT_CUSTOMREQUEST => 'GET',
14057 + CURLOPT_HTTPHEADER => array(
14058 + 'Appkey: {{ONECOUNT API KEY}}'
14059 + ),
14060 +));
14061 +
14062 +$response = curl_exec($curl);
14063 +
14064 +curl_close($curl);
14065 +echo $response;
14066 +{{/code}}
14067 +
14068 +\\
14069 +
14070 +(% style="color: rgb(107,107,107);" %)Response  200 OK
14071 +
14072 +{{code language="yml" theme="RDark" title="Get all Segments for a user Response" collapse="true"}}
14073 +{
14074 + "result": {
14075 + "success": "1",
14076 + "error": {
14077 + "code": "",
14078 + "message": ""
14079 + }
14080 + },
14081 + "Segments": [
14082 + "0d37c79e-deb2-4287-9444-ae4812a9d8f0",
14083 + "1bfb1c06-4b26-4ac3-a616-eb6b225e5f0e",
14084 + "24cf72e9-ad71-489c-89ef-b80d0c42e2e2",
14085 + "28361c73-e253-49bb-a791-5481be2070a0",
14086 + "28774f7c-9fd3-4dff-a42e-683460f437c0",
14087 + "5eaa0345-a825-4ba0-a787-336312a77744",
14088 + "71b655e6-a11a-46af-bed5-b9eb1d6ac3aa",
14089 + "a639cb1f-6509-447b-a1d7-93a8e8ef61b1",
14090 + "bcb403a2-c0a1-414f-90c1-277a41009c97",
14091 + "c905d313-8d5e-45c1-aaab-7f8c8adc2bea",
14092 + "d883ecdb-5307-416d-9558-c196472021c9",
14093 + "d8d1bc9d-ede2-4c82-a747-10ab9fb979de"
14094 + ]
14095 +}
14096 +{{/code}}
14097 +
14098 +\\
14099 +
14100 +(% class="western" %)
13600 13600  === **COMPONENT: Leads
13601 13601  ** ===
13602 13602  
Screen Shot 2020-02-26 at 11.14.29 AM.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +397.9 KB
Content
Screen Shot 2020-02-26 at 11.15.52 AM.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +50.1 KB
Content
Screen Shot 2020-02-26 at 11.22.13 AM.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +159.8 KB
Content
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -110231562
1 +108265477
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/110231562/ONEcount API Documentation
1 +https://info.onecount.net//wiki/spaces/OD/pages/108265477/ONEcount API Documentation