List Agents
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/agentsimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/agents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/agents', 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.example.com/wp-json/latepoint-api/v1/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/wp-json/latepoint-api/v1/agents"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/wp-json/latepoint-api/v1/agents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAgents
List Agents
Retrieve a list of all agents with advanced filtering, pagination, and sorting options.
GET
/
wp-json
/
latepoint-api
/
v1
/
agents
List Agents
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/agentsimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/agents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/agents', 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.example.com/wp-json/latepoint-api/v1/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/wp-json/latepoint-api/v1/agents"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/wp-json/latepoint-api/v1/agents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyQuery Parameters
string
Filter by agent status. Available values:
active, disabledstring
Search by first name, last name, or email address
string
Filter by exact email address
string
Filter by phone number (partial match supported)
integer
Filter agents by location ID (shows only agents available at this location)
integer
Filter agents by service ID (shows only agents who provide this service)
string
Filter agents created after this date (YYYY-MM-DD format)
string
Filter agents created before this date (YYYY-MM-DD format)
string
Include related data. Available values:
servicesinteger
default:"1"
Page number for pagination
integer
default:"10"
Number of results per page (1-100)
string
default:"first_name"
Sort field. Available values:
id, first_name, last_name, email, created_at, updated_at, statusstring
default:"asc"
Sort direction. Available values:
asc, descBasic Request
GET /wp-json/latepoint-api/v1/agents
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Advanced Filtering Examples
Filter by Status
GET /wp-json/latepoint-api/v1/agents?status=active
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Search by Name or Email
GET /wp-json/latepoint-api/v1/agents?search=john
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Include Services Data
GET /wp-json/latepoint-api/v1/agents?include=services&per_page=5
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Date Range Filter
GET /wp-json/latepoint-api/v1/agents?created_after=2024-01-01&created_before=2024-12-31
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Pagination and Sorting
GET /wp-json/latepoint-api/v1/agents?page=2&per_page=25&order_by=last_name&order=desc
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Filter by Location
GET /wp-json/latepoint-api/v1/agents?location_id=2
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Filter by Service
GET /wp-json/latepoint-api/v1/agents?service_id=1
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Combined Location and Service Filter
GET /wp-json/latepoint-api/v1/agents?location_id=2&service_id=1&status=active
X-API-Key: lp_n1k6BVf3h7JRyjXkWMSoXi0BBZYRaOLL4QohDPQJ
Response
Services and locations assigned to each agent are always included in the response.{
"success": true,
"data": [
{
"id": "1",
"first_name": "Pao",
"last_name": "Campo",
"display_name": "Agente Pao",
"email": "pao@example.com",
"phone": "",
"bio": "Agent bio here",
"features": "[{\"value\":\"\",\"label\":\"\"}]",
"status": "active",
"created_at": "2025-08-17 09:21:51",
"updated_at": "2025-08-18 06:43:39",
"services": [
{
"id": "2",
"name": "General Consultation",
"short_description": "Standard medical consultation",
"duration": "60",
"price_min": "23.0000",
"price_max": "23.0000",
"status": "active"
}
],
"locations": [
{
"id": "1",
"name": "Main Location",
"full_address": "",
"status": "active"
}
]
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 2,
"total_pages": 1,
"has_next_page": false,
"has_previous_page": false
}
}
