Get Segment Details
Users can get the segment details by using our API.
Request Type
- GET/POST
Scope required
- ZohoCampaigns.contact.READ
Other alternative scopes
- ZohoCampaigns.contact.ALL (CREATE + UPDATE + DELETE + READ)
Header:
Authorization: Zoho-oauthtoken <access_token>
Request URL
https://campaigns.zoho.com/api/v1.1/getsegmentdetails
API Limit
- Duration: 5 mins
- Number of Calls: 500
- Lock Period: 30 mins
You can send 500 API calls per 5 minutes. If you hit this limit, you can't use this API for the next 30 minutes due to security reasons, but you can still use other APIs if their lock period hasn’t been reached.
List of Parameters --Version 1.1
Parameter | Data Type | Description |
listkey* | String | List Key to send a subscription mail to contacts. |
resfmt | String | XML (or) JSON |
cvid* | Number | You will get cvid from getmailinglists. |
* - Mandatory Parameters
Possible Error Cases
Error code | Description |
903 | Mandatory fields are missing. |
2202 | Listkey is empty or invalid. |
2603 | Error in getting segments details. Please try after sometime. OR Please enter correct data type format. |
If your error code is not listed above, click here.
Sample XML Request
Copiedhttps://campaigns.zoho.com/api/v1.1/getsegmentdetails?resfmt=XML&cvid=[cvid]&listkey=[listkey]
Sample Response
Copied<response uri="/api/v1.1/getsegmentdetails" version="1.1">
<status>success</status>
<code>0</code>
<segment_details>
<criteria>
<fl val="no">0</fl>
<fl val="operator"></fl>
<fl val="column_name">Contact Email</fl>
<fl val="comparator">contains</fl>
<fl val="column_value">tes</fl>
</criteria>
</segment_details>
</response>
Sample JSON Request
Copiedhttps://campaigns.zoho.com/api/v1.1/getsegmentdetails?resfmt=JSON&cvid=[cvid]&listkey=[listkey]
Sample Response
Copied{
"status": "success",
"segments_details": "{column_value=[tes], exact_column_name=[], logical_operator_count=0, pattern=, column_name=[Contact Email], logical_operator=[], column_comparator=[contains]}",
"code": "0",
"uri": "/api/v1.1/getsegmentdetails",
"version": "1.1"
}