/v1/segments/fields
curl --request GET \
--url https://api.comm.com/api/v1/segments/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.comm.com/api/v1/segments/fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.comm.com/api/v1/segments/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.comm.com/api/v1/segments/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.comm.com/api/v1/segments/fields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.comm.com/api/v1/segments/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/segments/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"fields": [
{
"field": "<string>",
"label": "<string>",
"type": "<string>",
"operators": [
"<unknown>"
]
}
],
"operators": [
"<string>"
]
}
}{
"message": "<string>"
}Segments
/v1/segments/fields
Example response:
{
"fields": [
{
"field": "clicked_count",
"label": "Clicked Count",
"type": "integer",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "sent_count",
"label": "Sent Count",
"type": "integer",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "country_id",
"label": "Country",
"type": "integer",
"operators": [
"equal",
"not_equal",
"in",
"not_in"
]
},
{
"field": "state_id",
"label": "State",
"type": "integer",
"operators": [
"equal",
"not_equal",
"in",
"not_in"
]
},
{
"field": "network_brand",
"label": "Network Brand",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
},
{
"field": "date_created",
"label": "Date Created",
"type": "date",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "last_sent",
"label": "Last Sent",
"type": "date",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "last_clicked",
"label": "Last Clicked",
"type": "date",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "leads_count",
"label": "Leads Count",
"type": "integer",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "sales_count",
"label": "Sales Count",
"type": "integer",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom1_str",
"label": "Qwerty",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
},
{
"field": "custom2_str",
"label": "Custom 2 String",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
},
{
"field": "custom3_str",
"label": "Custom 3 String",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
},
{
"field": "custom4_str",
"label": "Custom 4 String",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
},
{
"field": "custom5_str",
"label": "Custom 5 String",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
},
{
"field": "custom1_dec",
"label": "Custom 1 Decimal",
"type": "double",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom2_dec",
"label": "Custom 2 Decimal",
"type": "double",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom1_datetime",
"label": "Dt",
"type": "datetime",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom2_datetime",
"label": "Custom 2 Datetime",
"type": "datetime",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom3_datetime",
"label": "Custom 3 Datetime",
"type": "datetime",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom4_datetime",
"label": "Custom 4 Datetime",
"type": "datetime",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "custom5_datetime",
"label": "Custom 5 Datetime",
"type": "datetime",
"operators": [
"equal",
"not_equal",
"less",
"less_or_equal",
"greater",
"greater_or_equal"
]
},
{
"field": "tags",
"label": "Tag",
"type": "string",
"operators": [
"contains",
"not_contains",
"begins_with",
"not_ends_with",
"ends_with",
"not_ends_with"
]
}
],
"operators": [
"equal",
"not_equal",
"in",
"not_in",
"less",
"less_or_equal",
"greater",
"greater_or_equal",
"begins_with",
"not_begins_with",
"contains",
"not_contains",
"ends_with",
"not_ends_with",
"is_empty",
"is_not_empty"
]
}
GET
/
v1
/
segments
/
fields
/v1/segments/fields
curl --request GET \
--url https://api.comm.com/api/v1/segments/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.comm.com/api/v1/segments/fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.comm.com/api/v1/segments/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.comm.com/api/v1/segments/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.comm.com/api/v1/segments/fields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.comm.com/api/v1/segments/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/segments/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"fields": [
{
"field": "<string>",
"label": "<string>",
"type": "<string>",
"operators": [
"<unknown>"
]
}
],
"operators": [
"<string>"
]
}
}{
"message": "<string>"
}