Get segment information
Description
Retrieves a segment detailed information.
Request URL
Method: POST
https://example.com/api/v1.1/segments/get/
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | response data format By default – json |
id | int | 1 | No | Segment ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>10</id>
</xml>
Response example
- JSON
- XML
{
"data": {
"count": 100,
"id": 1,
"name": "Segment A",
"segment": [
{
"condition": "or",
"limit": 0,
"list_id": 1,
"percent_from": 0,
"percent_to": 99,
"queries": [
{
"child": [],
"compo": "domaingroup",
"condition": "",
"name": "email",
"operator": "equal",
"type": "email",
"value": [
{
"name": "domaingroup",
"value": "Yahoo! (US)"
}
]
}
]
}
]
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<count>0</count>
<description>""</description>
<id>14</id>
<name>"Test segment1"</name>
<segment>
<condition>"or"</condition>
<limit>0</limit>
<list_id>1</list_id>
<percent_from>0</percent_from>
<percent_to>99</percent_to>
<queries>
<child/>
<compo>"default"</compo>
<condition>""</condition>
<name>"custom_tags"</name>
<object_path>""</object_path>
<object_type>""</object_type>
<operator>"in_data"</operator>
<type>"subscription_email"</type>
<value>
<name>"url"</name>
<value>"http:127.0.0.1:8080/json.email.subscriptions"</value>
</value>
<value>
<name>"field"</name>
<value>"subscriptions"</value>
</value>
<value>
<name>"resource_id"</name>
<value>"1"</value>
</value>
</queries>
</segment>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
count | int | Profiles in the segment |
id | int | Segment ID |
name | string | Segment name |
segment | JSON array | segment details |