Update Service
curl --request PUT \
--url https://api.example.com/wp-json/latepoint-api/v1/services/{id}import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/services/{id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/services/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$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/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/wp-json/latepoint-api/v1/services/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/services/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyServices
Update Service
Update an existing service.
PUT
/
wp-json
/
latepoint-api
/
v1
/
services
/
{id}
Update Service
curl --request PUT \
--url https://api.example.com/wp-json/latepoint-api/v1/services/{id}import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/services/{id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/services/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$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/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/wp-json/latepoint-api/v1/services/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/services/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyParameters
| Parameter | Type | Description |
|---|---|---|
name | string | Service name |
short_description | string | Brief description of the service |
description | string | Detailed description of the service |
duration | integer | Service duration in minutes |
price_min | number | Minimum price for the service |
price_max | number | Maximum price for the service |
charge_amount | number | Amount to charge for the service |
deposit_amount | number | Deposit amount required |
capacity_min | integer | Minimum capacity |
capacity_max | integer | Maximum capacity |
order_number | integer | Display order number |
selection_image_id | integer | Image ID for service selection |
status | string | Service status: active, disabled |
visibility | string | Service visibility: visible, hidden |
category_id | integer | Service category ID |
Example Request
PUT /wp-json/latepoint-api/v1/services/1
X-API-Key: YOUR_API_KEY
Content-Type: application/json
{
"name": "Updated Service Name",
"short_description": "Updated description",
"duration": 90,
"charge_amount": 150,
"price_min": 120,
"price_max": 180
}
Response Example
{
"success": true,
"message": "Service updated successfully",
"data": {
"id": 1,
"name": "Updated Service Name",
"short_description": "Updated description",
"description": "",
"duration": 90,
"price_min": 120,
"price_max": 180,
"charge_amount": 150,
"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 10:15:30"
}
}
⌘I
