List Service Categories
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/services/categoriesimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/services/categories"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/services/categories', 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/services/categories",
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/services/categories"
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/services/categories")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/services/categories")
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_body{
"id": "<string>",
"name": "<string>",
"short_description": "<string>",
"parent_id": "<string>",
"selection_image_id": "<string>",
"order_number": "<string>",
"services_count": 123,
"pagination": {}
}Services
List Service Categories
Retrieve a list of all service categories with service count and pagination support.
GET
/
wp-json
/
latepoint-api
/
v1
/
services
/
categories
List Service Categories
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/services/categoriesimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/services/categories"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/services/categories', 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/services/categories",
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/services/categories"
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/services/categories")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/services/categories")
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_body{
"id": "<string>",
"name": "<string>",
"short_description": "<string>",
"parent_id": "<string>",
"selection_image_id": "<string>",
"order_number": "<string>",
"services_count": 123,
"pagination": {}
}Query Parameters
integer
default:"10"
Number of categories per page (1-100)
integer
default:"1"
Page number for pagination
Example Requests
Basic Request
GET /wp-json/latepoint-api/v1/services/categories
X-API-Key: YOUR_API_KEY
Paginated Request
GET /wp-json/latepoint-api/v1/services/categories?page=1&per_page=5
X-API-Key: YOUR_API_KEY
Response Example
{
"success": true,
"data": [
{
"id": "1",
"name": "Consultas Médicas",
"short_description": "Consultas médicas generales y especializadas",
"parent_id": "0",
"selection_image_id": "0",
"order_number": "1",
"services_count": 5
},
{
"id": "2",
"name": "Terapias",
"short_description": "Diferentes tipos de terapias",
"parent_id": "0",
"selection_image_id": "0",
"order_number": "2",
"services_count": 3
},
{
"id": "3",
"name": "Exámenes",
"short_description": "Exámenes médicos y diagnósticos",
"parent_id": "0",
"selection_image_id": "0",
"order_number": "3",
"services_count": 2
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total_items": 3,
"total_pages": 1
}
}
Response Fields
string
Unique identifier for the category
string
Category name
string
Brief description of the category
string
ID of parent category (0 for top-level categories)
string
ID of the selection image for the category
string
Display order number for sorting
integer
Number of active services in this category
object
Pagination information including current page, items per page, total items, and total pages
Notes
- Only active service categories are returned
- The
services_countfield shows the number of active services associated with each category - Categories are ordered by their
order_numberfield in ascending order - This endpoint supports standard pagination parameters for large datasets
- Authentication is required via API key in headers or query parameters
