Get segment details
Request
|
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
|
path |
string |
true |
The ID of the email list that contains the segment. |
|
|
path |
string |
true |
The ID of the segment that contains the details you are requesting. |
|
|
path |
string |
true |
The supported file format for getting a response. Possible values: |
|
|
query |
string |
true |
The API key of your account. |
GET https://{hostname}/v3/lists/{MailingListID}/segments/{SegmentID}/details.{Format}?apikey=Response
|
Status |
Description |
Headers |
Schema |
|---|---|---|---|
|
|
The request is successful. |
|
N/A |
{
"Code": 0,
"Error": null,
"Context": {
"ID": 10198,
"Name": "test",
"MatchType": 0,
"Criteria": [
{
"ID": 15778,
"SegmentID": 10198,
"Field": 2,
"CustomFieldID": null,
"Comparer": 0,
"Value": "Paul",
"DateFrom": null,
"DateTo": null,
"Properties": null,
"Subscriteria": null
},
{
"ID": 15779,
"SegmentID": 10198,
"Field": 4,
"CustomFieldID": null,
"Comparer": 8,
"Value": "5",
"DateFrom": "/Date(1465167600000+0100)/",
"DateTo": "/Date(1465945200000+0100)/",
"Properties": null,
"Subscriteria": null
}
],
"CreatedBy": "212.123.123.112",
"CreatedOn": "/Date(1465806037033+0100)/",
"UpdatedBy": "212.123.123.112",
"UpdatedOn": "/Date(1465806269980+0100)/",
"FetchType": 0,
"FetchValue": 0,
"Description": "Fetch all where \"Recipient Name\" is \"Paul\" and \"Campaigns Opened\" is greater than \"5\""
}
}
-
Code- the response code. This is0if successful. -
Error- the response error message. This isnullif successful. -
Context- an object that contains all the following information for the requested segment:-
ID- the ID of the segment. -
Name- the name of the segment. -
MatchType- specifies how subscribers are returned by your segment based on the matching criteria. Possible values are:-
0- for All. Returns subscribers that match all the given criteria. -
1- for Any. Returns subscribers that match any of the given criteria.
-
-
Criteria- contains a list with the following information for each selected criterion selected for the segment:-
ID- the ID of the criteria. -
SegmentID- the ID of the segment. -
Field- theenumvalue of the selected filter. -
CustomFieldID- if the selected filter is a custom field, this is the ID of the custom field. -
Comparer- the operator that defines how to compareFieldandValue. If not specified,Isis assumed.-
0- forIs. Finds subscribers where theFieldis exactly equal to the specifiedValue. -
1- forIsNot. Finds subscribers where theFieldis not equal to the specifiedValue. -
2- forContains. Finds subscribers where theFieldcontains the specifiedValue. -
3- forDoesNotContain. Finds subscribers where theFielddoes not contain the specifiedValue. -
4- forStartsWith. Finds subscribers where theFieldstarts with the specifiedValue. -
5- forDoesNotStartWith. Finds subscribers where theFielddoes not start with the specifiedValue. -
6- forEndsWith. Finds subscribers where theFieldends with the specifiedValue. -
7- forDoesNotEndWith. Finds subscribers where theFielddoes not end with the specifiedValue. -
8- forIsGreaterThan. Finds subscribers where theFieldis greater than the specifiedValue. -
9- forIsGreaterThanOrEqualTo. Finds subscribers where theFieldis greater than or equal to the specifiedValue. -
10- forIsLessThan. Finds subscribers where theFieldis less than the specifiedValue. -
11- forIsLessThanOrEqualTo. Finds subscribers where theFieldis less than or equal to the specifiedValue. -
12- forIsBefore. Finds subscribers where theFieldis before the specifiedValue. -
13- forIsAfter. Finds subscribers where theFieldis after the specifiedValue. -
14- forIsEmpty. Finds subscribers where theFieldhas noValue. -
15- forIsNotEmpty. Finds subscribers where theFieldcontains aValue. -
16- forIsTrue. Finds subscribers where the condition defined by theFieldis true. -
17- forIsFalse. Finds subscribers where the condition defined by theFieldis false. -
24- forIsBetween. Finds subscribers where the numeric value of a criterion is between two defined numbers. -
25- forIsNotBetween. Finds subscribers where the numeric value of a criterion is not between two defined numbers.
-
-
Value- the search term used to filter the specifiedField. -
DateFrom- the starting date-time value selected to filter the results. If not selected, this isnull. -
DateTo- the ending date-time value selected to filter the results. If not selected, this isnull. -
Properties- this isnullfor this case. -
Subscriteria- this isnullfor this case.
-
-
CreatedBy- the IP address used to create the requested segment. -
CreatedOn- the date-time the requested segment was created. -
UpdatedBy- the IP address used to update the requested segment. -
UpdatedOn- the date-time the requested segment was updated. -
FetchType- the selected fetch type for the selected segment criteria. Possible values are:-
0- for all segment criteria. -
1- for the top segment criteria. -
2- for the top percent segment criteria.
-
-
FetchValue- the value used to apply theFetchTypefilter. -
Description- contains a string representation of all the selected filters,MatchTypeandFetchTypecriteria.
-