Update segment criteria
Request
Parameter |
In |
Type |
Required |
Description |
---|---|---|---|---|
|
header |
string |
true |
Determines the expected format and data type to retrieve the response data. Value: |
|
path |
string |
true |
The ID of the email list that contains the segment. |
|
path |
string |
true |
The ID of the segment. |
|
path |
number(double) |
true |
The ID of the criteria of a segment to be updated. |
|
path |
string |
true |
The supported file format for getting a response. Possible values: |
|
query |
string |
true |
The API key of your account. |
|
body |
string |
true |
The criterion used to filter the email list. See Field values. |
|
body |
string |
false |
The operator that defines how to compare a |
|
body |
string |
false |
The search term used to filter the specified |
|
body |
integer |
false |
Constrains the results by the time that has elapsed. |
|
body |
date |
false |
Constrains the results by a date span. |
|
body |
string |
false |
The value used with custom fields of |
Field values
Select one of the following Field
values to filter the email list:
-
DateAdded
- filters subscribers by the date they were added to the email list. -
DateUpdated
- filters subscribers by the date they were last updated in the email list. -
RecipientName
- filters subscribers by name. -
RecipientEmail
- filters subscribers by their email address. -
SubscribeMethod
- filters subscribers by their subscription method. -
CustomField
- filters subscribers by the value of a custom field. -
MailingListIncluded
- filters subscribers by checking if they belong to another mailing list. -
CampaignsOpened
- filters subscribers by the number of campaigns they have opened within the past 60 days. -
LinksClicked
- filters subscribers by the number of links they have clicked from the campaigns sent to them within the past 60 days. -
CampaignName
- filters subscribers by the name of the campaign they have opened. -
LinkURL
- filters subscribers by the URL of the link they have clicked. -
CampaignSent
- filters subscribers by the campaign they have received or not received. -
Platform
- filters subscribers by the platform they use. -
OperatingSystems
- filters subscribers by the operating system they use. -
EmailClient
- filters subscribers by the email client they use. -
WebBrowser
- filters subscribers by the web browser they use. -
MobileBrowser
- filters subscribers by the mobile browser they use. -
AddedAnythingToCart
- filters subscribers by their cart history in a tracked website. -
ViewedProduct
- filters subscribers by their browsing history in a tracked website. -
PurchasedProduct
- filters subscribers by their purchase history in a tracked website. -
ViewedProductCategory
- filters subscribers by their browsing history in a tracked website. -
PurchasedProductCategory
- filters subscribers by their purchase history in a tracked website. -
ViewedProductBrand
- filters subscribers by their browsing history in a tracked website. -
PurchasedProductBrand
- filters subscribers by their purchase history in a tracked website.
Comparer values
Select one of the following Comparer
operators to compare a criterion field with its value:
-
Is
- finds subscribers where theField
is exactly equal to the specifiedValue
. -
IsNot
- finds subscribers where theField
is not equal to the specifiedValue
-
Contains
- finds subscribers where theField
contains the specifiedValue
. -
DoesNotContain
- finds subscribers where theField
does not contain the specifiedValue
. -
StartsWith
- finds subscribers where theField
starts with the specifiedValue
. -
DoesNotStartWith
- finds subscribers where theField
does not start with the specifiedValue
. -
EndsWith
- finds subscribers where theField
ends with the specifiedValue
. -
DoesNotEndWith
- finds subscribers where theField
does not end with the specifiedValue
. -
IsGreaterThan
- finds subscribers where theField
is greater than the specifiedValue
. -
IsGreaterThanOrEqualTo
- finds subscribers where theField
is greater than or equal to the specifiedValue
. -
IsLessThan
- finds subscribers where theField
is less than the specifiedValue
. -
IsLessThanOrEqualTo
- finds subscribers where theField
is less than or equal to the specifiedValue
. -
IsBefore
- finds subscribers where theField
is before the specifiedValue
. -
IsAfter
- finds subscribers where theField
is after the specifiedValue
. -
IsEmpty
- finds subscribers where theField
has noValue
. -
IsNotEmpty
- finds subscribers where theField
contains aValue
. -
IsTrue
- finds subscribers where the condition defined by theField
is true. -
IsFalse
- finds subscribers where the condition defined by theField
is false.
DateFunction values
Select one of the following to use with fields of DateTime
data type.
-
Year
- the four-digit year part of the date. -
Month
- the month part of the date from1
to12
. -
Day
- the day part of the date from1
to31
. -
WeekDay
- the day of the week from1
to7
. For example,1
for Sunday,2
for Monday, and so on. -
DaysPassed
- the number of days that have passed until now. -
HoursPassed
- the number of hours that have passed until now. -
MinutesPassed
- the number of minutes that have passed until now.
POST https://{hostname}/v3/lists/{MailingListID}/segments/{SegmentID}/criteria/{CriteriaID}/update.{Format}?apikey=
Request body:
{
"Field": "LinkURL",
"Comparer": "is",
"Value": "https://www.yourpage.com/"
}
Response
Status |
Description |
Headers |
Schema |
---|---|---|---|
|
The request is successful. |
|
N/A |
{
"Code": 0,
"Error": null,
"Context": 15783
}
-
Code
- the response code. This is0
if successful. -
Error
- the response error message. This isnull
if successful. -
Context
- the ID of the updated segment.