Query customer leads
curl --request GET \
--url https://ecom-service.paysight.io/api/public/customer-leads \
--header 'Authorization: Bearer <token>'import requests
url = "https://ecom-service.paysight.io/api/public/customer-leads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ecom-service.paysight.io/api/public/customer-leads', 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://ecom-service.paysight.io/api/public/customer-leads",
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://ecom-service.paysight.io/api/public/customer-leads"
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://ecom-service.paysight.io/api/public/customer-leads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ecom-service.paysight.io/api/public/customer-leads")
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{
"ok": true,
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"session_id": "<string>",
"status": "lead",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"image_url": "<string>",
"scans": [
"<unknown>"
],
"pending_data": "aSDinaTvuI8gbWludGxpZnk=",
"cfa_timestamp": "<string>",
"cfa_name": "<string>",
"cfa_area": "<string>",
"cfa_first_page": "<string>",
"cfa_last_page": "<string>",
"cfa_first_latest_visit": "<string>",
"cfa_total_pages_clicks": "<string>",
"cfa_device": "<string>",
"cfa_browser": "<string>",
"cfa_model": "<string>",
"cfa_speed": "<string>",
"cfa_website_referral": "<string>",
"cfa_longest_time_visited": "<string>",
"cfa_longest_scrolled": "<string>",
"cfa_most_clicked": "<string>",
"cfa_most_interested_page_time": "<string>",
"cfa_form_status": "<string>",
"cfa_form_name": "<string>",
"cfa_form_email": "<string>",
"cfa_form_phone": "<string>",
"cfa_submission_urls": "<string>",
"d2d_timestamp": "<string>",
"d2d_name": "<string>",
"d2d_street_1": "<string>",
"d2d_street_2": "<string>",
"d2d_city": "<string>",
"d2d_state": "<string>",
"d2d_zip": "<string>",
"d2d_country": "<string>",
"d2d_full_address": "<string>",
"d2d_details": "<string>",
"d2d_first_page": "<string>",
"d2d_last_page": "<string>",
"d2d_first_latest_visit": "<string>",
"d2d_total_pages_clicks": "<string>",
"d2d_device": "<string>",
"d2d_browser": "<string>",
"d2d_model": "<string>",
"d2d_speed": "<string>",
"d2d_website_referral": "<string>",
"d2d_longest_time_visited": "<string>",
"d2d_longest_scrolled": "<string>",
"d2d_most_clicked": "<string>",
"d2d_most_interested_page_time": "<string>",
"d2d_form_status": "<string>",
"d2d_form_name": "<string>",
"d2d_submission_urls": "<string>",
"d2d_contacts": "<string>",
"d2d_all_pages": "<string>",
"paid_at": "2023-11-07T05:31:56Z",
"paysight_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paysight_transaction_id": "<string>",
"paysight_order_id": "<string>",
"paysight_subscription_id": "<string>",
"paysight_application_id": "<string>",
"paid_amount_minor": 123,
"paid_currency": "<string>"
}
],
"meta": {
"count": 1,
"limit": 50
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Customer Leads
Query customer leads
Returns the latest matching leads for the authenticated tenant. Filters use exact matches and are combined with AND. Email is normalized to lowercase and is unique within the authenticated tenant, so an email filter returns at most one lead.
This operation requires the server-only secret key. Publishable browser keys cannot read leads.
GET
/
api
/
public
/
customer-leads
Query customer leads
curl --request GET \
--url https://ecom-service.paysight.io/api/public/customer-leads \
--header 'Authorization: Bearer <token>'import requests
url = "https://ecom-service.paysight.io/api/public/customer-leads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ecom-service.paysight.io/api/public/customer-leads', 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://ecom-service.paysight.io/api/public/customer-leads",
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://ecom-service.paysight.io/api/public/customer-leads"
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://ecom-service.paysight.io/api/public/customer-leads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ecom-service.paysight.io/api/public/customer-leads")
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{
"ok": true,
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"session_id": "<string>",
"status": "lead",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"image_url": "<string>",
"scans": [
"<unknown>"
],
"pending_data": "aSDinaTvuI8gbWludGxpZnk=",
"cfa_timestamp": "<string>",
"cfa_name": "<string>",
"cfa_area": "<string>",
"cfa_first_page": "<string>",
"cfa_last_page": "<string>",
"cfa_first_latest_visit": "<string>",
"cfa_total_pages_clicks": "<string>",
"cfa_device": "<string>",
"cfa_browser": "<string>",
"cfa_model": "<string>",
"cfa_speed": "<string>",
"cfa_website_referral": "<string>",
"cfa_longest_time_visited": "<string>",
"cfa_longest_scrolled": "<string>",
"cfa_most_clicked": "<string>",
"cfa_most_interested_page_time": "<string>",
"cfa_form_status": "<string>",
"cfa_form_name": "<string>",
"cfa_form_email": "<string>",
"cfa_form_phone": "<string>",
"cfa_submission_urls": "<string>",
"d2d_timestamp": "<string>",
"d2d_name": "<string>",
"d2d_street_1": "<string>",
"d2d_street_2": "<string>",
"d2d_city": "<string>",
"d2d_state": "<string>",
"d2d_zip": "<string>",
"d2d_country": "<string>",
"d2d_full_address": "<string>",
"d2d_details": "<string>",
"d2d_first_page": "<string>",
"d2d_last_page": "<string>",
"d2d_first_latest_visit": "<string>",
"d2d_total_pages_clicks": "<string>",
"d2d_device": "<string>",
"d2d_browser": "<string>",
"d2d_model": "<string>",
"d2d_speed": "<string>",
"d2d_website_referral": "<string>",
"d2d_longest_time_visited": "<string>",
"d2d_longest_scrolled": "<string>",
"d2d_most_clicked": "<string>",
"d2d_most_interested_page_time": "<string>",
"d2d_form_status": "<string>",
"d2d_form_name": "<string>",
"d2d_submission_urls": "<string>",
"d2d_contacts": "<string>",
"d2d_all_pages": "<string>",
"paid_at": "2023-11-07T05:31:56Z",
"paysight_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paysight_transaction_id": "<string>",
"paysight_order_id": "<string>",
"paysight_subscription_id": "<string>",
"paysight_application_id": "<string>",
"paid_amount_minor": 123,
"paid_currency": "<string>"
}
],
"meta": {
"count": 1,
"limit": 50
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Authorizations
Server-only secret key.
Query Parameters
Exact lead ID.
Exact, case-insensitive email match. Returns at most one lead.
Maximum string length:
320Exact tenant-unique lead session ID.
Maximum string length:
255Exact transaction ID that marked the lead paid.
Maximum string length:
255Exact subscription ID from the transaction that marked the lead paid.
Maximum string length:
255Restrict results to open or paid leads.
Available options:
lead, paid Maximum records to return, newest updated first.
Required range:
1 <= x <= 100