API Guide
API GuideDeveloper Guide
  • Welcome to the API Guide
  • Getting Started
    • Introduction
    • Prerequisites
  • Authentication
  • Endpoint
    • Profile API
      • Get Customer Profile
      • Get Customer ID by phone number
    • Segment API
      • Listing Segments
      • Create new Segment
        • Upload file data for Segment
      • Export data Segment
      • Download exported Segment data
        • Check Segment exporting status
    • Event API
      • Get Event(s) List
      • Get Event History
    • Item API
      • Get Business Object(s) List
      • Get BO Attributes
      • Search Item
      • Explore Item
    • Promotion API
    • App Inbox API
      • Get Message Detail
      • Update Message
      • Count Message Unread
      • Mark All As Read
      • Get Message Performance
      • Get Catalog Performance
      • Get Destination
Powered by GitBook
On this page
  • Request
  • Body
  • Headers
  • Response
  1. Endpoint
  2. Segment API

Listing Segments

Return a list of segments according to specified conditions.

POST http://api.ants.tech/access/api/segment/listing

Request

Body

  • page (*) Page number of the listing

  • limit (*) Maximum number of items per page

  • search Keyword to search the Segment (can be the segment name or ID)

  • columns (*): Columns to be retrieved in the listing. Chosen from the list below:

Name
Data Type
Example

c_user_id

compute_schedule

compute_schedule_end

compute_schedule_start

ctime

item_type_id

label_ids

last_processed_date

process_status

response_code

segment_display

segment_id

segment_size

source_names

status

storage_type

u_user_id

update_method

utime

  • sort[optional]: Column to sort the listing result (default: u_user_id)

  • sd[optional]: Sort direction for the listing result (default: desc)

    • desc: Descending order

    • asc: Ascending order

  • filters: Filter the listing based on conditions

    • OR: Filter conditions using OR logic

      • AND: Filter conditions using AND logic

        • column: Name of the column to filter

        • data_type: Data type of the column

        • operator: Operator used for filtering

        • value: Value to filter by

Headers

Name
Description

Authorization*

Bearer <ACCESS_TOKEN>

Response

  • entries: List of segments

  • meta:

    • perPage: Number of items to limit when retrieving the list

    • total: Total number of segments

{
  "code": 200,
  "message": "Success",
  "data": {
    "meta": {
      "perPage": 100,
      "total": 110
    },
    "entries": [
      {
        "row_count": "110",
        "c_user_id": "Antsomi Product",
        "compute_schedule": "--",
        "compute_schedule_end": "04 July 2024 02:00:00",
        "compute_schedule_start": "2024-06-27T12:00:00.000Z",
        "ctime": "2024-06-27T11:26:54.373Z",
        "item_type_id": -1003,
        "label_ids": [],
        "last_processed_date": "2024-06-27T11:26:54.373Z",
        "process_status": 2,
        "response_code": null,
        "segment_display": "Unsubscribe Customer",
        "segment_id": 17202932,
        "segment_size": null,
        "source_names": null,
        "status": 1,
        "storage_type": "3",
        "u_user_id": "Antsomi Product",
        "update_method": "static",
        "utime": "2024-10-30T02:45:01.332Z",
        "segment_type": 4,
        "used_by_modules": [],
        "accepted_actions": {
          "EDIT": true,
          "CLONE": true,
          "DISABLE": true,
          "DELETE": true,
          "EDIT_NAME": true,
          "EDIT_CONDITION": true
        },
        "isEdit": true
      }
    ]
  },
  "duration": "0.594 ms"
}
      
{
    "code": 301,
    "message": "Permission denied",
    "data": "You don't have permission to access this request!"
}
PreviousSegment APINextCreate new Segment

Last updated 6 months ago