Create Service
curl --request POST \
--url https://api.example.com/wp-json/latepoint-api/v1/servicesimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/services"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/services', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/wp-json/latepoint-api/v1/services")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyServices
Create Service
Create a new service.
POST
/
wp-json
/
latepoint-api
/
v1
/
services
Create Service
curl --request POST \
--url https://api.example.com/wp-json/latepoint-api/v1/servicesimport requests
url = "https://api.example.com/wp-json/latepoint-api/v1/services"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/services', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/wp-json/latepoint-api/v1/services")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRequired Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Service name |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
short_description | string | Brief description of the service |
description | string | Detailed description of the service |
duration | integer | Service duration in minutes (default: 60) |
price_min | number | Minimum price for the service (default: 0) |
price_max | number | Maximum price for the service (default: 0) |
charge_amount | number | Amount to charge for the service (default: 0) |
deposit_amount | number | Deposit amount required (default: 0) |
capacity_min | integer | Minimum capacity (default: 1) |
capacity_max | integer | Maximum capacity (default: 1) |
order_number | integer | Display order number (default: 0) |
selection_image_id | integer | Image ID for service selection (default: 0) |
status | string | Service status: active, disabled (default: active) |
visibility | string | Service visibility: visible, hidden (default: visible) |
category_id | integer | Service category ID |
Example Request
POST /wp-json/latepoint-api/v1/services
X-API-Key: YOUR_API_KEY
Content-Type: application/json
{
"name": "General Consultation",
"short_description": "Standard medical consultation",
"duration": 60,
"charge_amount": 100,
"price_min": 80,
"price_max": 120
}
Response Example
{
"success": true,
"message": "Service created successfully",
"data": {
"id": 5,
"name": "General Consultation",
"short_description": "Standard medical consultation",
"description": "",
"duration": 60,
"price_min": 80,
"price_max": 120,
"charge_amount": 100,
"deposit_amount": 0,
"capacity_min": 1,
"capacity_max": 1,
"order_number": 0,
"selection_image_id": 0,
"status": "active",
"visibility": "visible",
"category_id": null,
"created_at": "2025-08-21 09:51:59",
"updated_at": "2025-08-21 09:51:59"
}
}
⌘I
