Filter Schema
curl --request GET \
--url https://{defaultHost}/v1/customers/filter_schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/customers/filter_schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/customers/filter_schema', 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://{defaultHost}/v1/customers/filter_schema",
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://{defaultHost}/v1/customers/filter_schema"
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://{defaultHost}/v1/customers/filter_schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/customers/filter_schema")
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{
"object": "rule_schema",
"schema_id": "customer",
"attributes": [
{
"key": "live_mode",
"metadata": false,
"supported_values": [],
"type": "boolean",
"operators": [
"is",
"is_not"
]
},
{
"key": "email",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "first_name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "last_name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "phone",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "purchases.created_at",
"metadata": false,
"supported_values": [],
"type": "date",
"operators": [
"is",
"is_not",
"is_after",
"is_before",
"is_on_or_after",
"is_on_or_before"
]
},
{
"key": "purchases.product.id",
"metadata": false,
"supported_values": [],
"type": "uuid",
"operators": [
"is",
"is_not"
]
},
{
"key": "purchases.product.name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "purchases.price.id",
"metadata": false,
"supported_values": [],
"type": "uuid",
"operators": [
"is",
"is_not"
]
},
{
"key": "purchases.price.name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
}
]
}Customers
Filter Schema
Retrieves the filter schema for customers.
GET
/
v1
/
customers
/
filter_schema
Filter Schema
curl --request GET \
--url https://{defaultHost}/v1/customers/filter_schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://{defaultHost}/v1/customers/filter_schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{defaultHost}/v1/customers/filter_schema', 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://{defaultHost}/v1/customers/filter_schema",
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://{defaultHost}/v1/customers/filter_schema"
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://{defaultHost}/v1/customers/filter_schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/customers/filter_schema")
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{
"object": "rule_schema",
"schema_id": "customer",
"attributes": [
{
"key": "live_mode",
"metadata": false,
"supported_values": [],
"type": "boolean",
"operators": [
"is",
"is_not"
]
},
{
"key": "email",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "first_name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "last_name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "phone",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "purchases.created_at",
"metadata": false,
"supported_values": [],
"type": "date",
"operators": [
"is",
"is_not",
"is_after",
"is_before",
"is_on_or_after",
"is_on_or_before"
]
},
{
"key": "purchases.product.id",
"metadata": false,
"supported_values": [],
"type": "uuid",
"operators": [
"is",
"is_not"
]
},
{
"key": "purchases.product.name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
},
{
"key": "purchases.price.id",
"metadata": false,
"supported_values": [],
"type": "uuid",
"operators": [
"is",
"is_not"
]
},
{
"key": "purchases.price.name",
"metadata": false,
"supported_values": [],
"type": "string",
"operators": [
"is",
"is_not",
"contains",
"not_contains",
"start_with",
"end_with"
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Success
Was this page helpful?
⌘I