Create new Segment
Create new Customer/Visitor segment
Last updated
Create new Customer/Visitor segment
Last updated
POST
http
://api.ants.tech/access/api/segment/create
segmentDisplay
: Segment name
itemTypeId
: Type to define the Customer segment or Visitor segment (-1003
for Customer segment, -1007
for Visitor segment)
conditions
:
file_path
: Path of the file, taken from the
file_name
: File name saved on the CDP system, taken from the
original_file_name
: File name when the user uploads, taken from the
extension
: File extension, taken from
delimiter
: Delimiter of the file, taken from the
method
: Method to upload segment, value is:
create
: When creating a new segment
criteria_logic
: Matching method to update audiences, one of the following types
or
: Just need to satisfy one of the mapping_fields
conditions to update the audiences
and
: All mapping_fields
conditions must be met to update audiences
mapping_fields
: Array of conditions to map the file header
with BO attributes
to update audiences, maximum 5 conditions
item_attribute_code
: Attribute internal code of the BO
header_code
: Header of the uploaded file, taken from the
header_index
: Index of the uploaded file, taken from
operator
: Condition for matching between header
file and BO attribute
, one of the following types
exactly
: Same between header and attribute, used for datatype STRING
equals
: Same between header and attribute, used for datatype NUMBER
, DATETIME
, BOOLEAN
not_equals: Not same between header and attribute, used for datatype NUMBER
, DATETIME
, BOOLEAN
computeSchedule
: Segment's computation schedule
type
: Segment calculation type, one of the following types
static
: Calculate once when creating a Segment
dynamic
: Calculate according to schedule, update audiences according to setup time
repeatType
[optional]: Calculation type of type "dynamic",
one of the following
none
: Only counted once after creating Segment
hours
: Recalculate segments in hours (1-24)
days
: Recalculate by days (1-365)
weeks: Recalculate by week (1-52)
months
: Recalculate by month (1-12)
repeatValue
[optional]: Repeat value of repeatType
(eg repeatValue
= 5
, repeatType
= "hours"
, the segment will be recalculated every 5 hours)
repeatOnValue
[optional]: Array containing a specific day or date to repeat (used when repeatType
= "weeks"
| "months"
)
repeatStartTime
[optional]: Segment calculation start time
day
: Calculation start date (format YYYY-MM-DD
)
hour
: Calculation start time (format HH:mm
)
endTime
[optional]: End time of Segment calculation
type
: Type of endTime
, one of the following types
none
: Never ends
on_day
: Ends at a specific time
after_num_running
: Ends after running enough times
onDay
[optional]: Value for type is "on_day"
day
: End date (format YYYY-MM-DD
)
hour
: End time (format HH:mm
)
numRunning
[optional]: Value for type is "after_num_running"
shareAccess
: Share permissions for other accounts to act on this segment
description
: Description of shared access rights
is_public
: Whether the segment is public or not (0
| 1
)
public_role
: Action permission for Segment, one of the following types
2
: Editor
3
: Viewer
list_access
: List of users and action rights for the Segment
user_id
: ID of the user
allow_edit
: 1
| 0
allow_view
: 1
| 0
allow_comment
: 1
| 0
role
: The user's role for the Segment, one of the following types
1
: Owner
2
: Editor
3
: Viewer
4
: Commenter
alertSetting
: Setting notification when Segment calculation succeeds or fails
alertAccountIds
: List of user IDs to receive notifications
alertScopes
: Scope notifies when the calculation is complete
success
: Array containing "email"
| "app_push"
, notification when Segment calculation is successful
failure
: Array containing "email"
| "app_push"
, notification when Segment calculation fails
Authorization*
Bearer <ACCESS_TOKEN>