Query Parameters
Search services by name, short description, or description
Filter by exact service name
Filter by service status (active, disabled)
Filter by service category ID
Filter services by location ID (shows only services available at this location)
Filter services by agent ID (shows only services provided by this agent)
Filter by visibility (visible, hidden)
Minimum duration in minutes
Maximum duration in minutes
Filter services created after this date (YYYY-MM-DD format)
Filter services created before this date (YYYY-MM-DD format)
Filter services updated after this date (YYYY-MM-DD format)
Filter services updated before this date (YYYY-MM-DD format)
Number of services per page (1-100)
Page number for pagination
Field to order by (id, name, price, duration, created_date, updated_date)
Sort direction (ASC, DESC)
Include related data (comma-separated: category, agents, locations)
Example Requests
Basic Request
GET /wp-json/latepoint-api/v1/services
X-API-Key: YOUR_API_KEY
Search Services
GET /wp-json/latepoint-api/v1/services?search=test&per_page=2
X-API-Key: YOUR_API_KEY
Filter with Multiple Parameters
GET /wp-json/latepoint-api/v1/services?status=active&per_page=3&include=category,agents
X-API-Key: YOUR_API_KEY
Price Range Filter
GET /wp-json/latepoint-api/v1/services?price_min=50&price_max=200&order_by=charge_amount&order=ASC
X-API-Key: YOUR_API_KEY
Duration and Date Filters
GET /wp-json/latepoint-api/v1/services?duration_min=30&duration_max=120&created_after=2024-01-01
X-API-Key: YOUR_API_KEY
Filter by Location
GET /wp-json/latepoint-api/v1/services?location_id=2
X-API-Key: YOUR_API_KEY
Filter by Agent
GET /wp-json/latepoint-api/v1/services?agent_id=1
X-API-Key: YOUR_API_KEY
Combined Location and Agent Filter
GET /wp-json/latepoint-api/v1/services?location_id=2&agent_id=1&status=active
X-API-Key: YOUR_API_KEY
Response Example
{
"success": true,
"data": [
{
"id": "1",
"name": "test 1",
"short_description": "descripcion test 1",
"description": null,
"duration": "60",
"price_min": "100.0000",
"price_max": "299.0000",
"charge_amount": "100.0000",
"deposit_amount": "0.0000",
"capacity_min": "1",
"capacity_max": "1",
"order_number": "0",
"selection_image_id": "0",
"status": "active",
"visibility": "visible",
"category_id": null,
"created_at": "2024-08-20 10:00:00",
"updated_at": "2024-08-20 10:00:00",
"category": {
"id": 1,
"name": "Category Name"
},
"agents": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe"
}
]
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total_items": 25,
"total_pages": 3
}
}