Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
    • Get statistics on resource
    • Update statistics on segment
    • Add or remove profile
    • Get profile data in a static segment
    • Create segment
    • Update segment
    • Get segment information
    • Get segments list
    • Delete segment
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Segments
  • Get segment information
Documentation for version v74

Get segment information

Description​

Retrieves a segment detailed information.

Request URL​

Method: POST

https://example.com/api/v1.1/segments/get/

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"Noresponse data format
By default – json
idint1NoSegment 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​

ParameterTypeDescription
errorintError code
error_textstringError text
countintProfiles in the segment
idintSegment ID
list_idintDatabase id
namestringSegment name
typestringType of a segment
segmentJSON arraysegment details
descrstringDescription of the segment
Last updated on May 31, 2024
Previous
Update segment
Next
Get segments list
  • Description
  • Request URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.