Edit Service
curl --request PATCH \
--url https://api.byteful.com/1.0/public/user/service/edit/{service_id} \
--header 'Content-Type: <content-type>' \
--header 'X-API-Private-Key: <api-key>' \
--header 'X-API-Public-Key: <api-key>' \
--data '
{
"cancel_comment": "<string>",
"cancel_feedback": "<string>",
"payment_method_id": "<string>",
"service_is_automatic_collection": true,
"service_is_pending_cancellation": true,
"service_metadata": {}
}
'import requests
url = "https://api.byteful.com/1.0/public/user/service/edit/{service_id}"
payload = {
"cancel_comment": "<string>",
"cancel_feedback": "<string>",
"payment_method_id": "<string>",
"service_is_automatic_collection": True,
"service_is_pending_cancellation": True,
"service_metadata": {}
}
headers = {
"Content-Type": "<content-type>",
"X-API-Private-Key": "<api-key>",
"X-API-Public-Key": "<api-key>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Content-Type': '<content-type>',
'X-API-Private-Key': '<api-key>',
'X-API-Public-Key': '<api-key>'
},
body: JSON.stringify({
cancel_comment: '<string>',
cancel_feedback: '<string>',
payment_method_id: '<string>',
service_is_automatic_collection: true,
service_is_pending_cancellation: true,
service_metadata: {}
})
};
fetch('https://api.byteful.com/1.0/public/user/service/edit/{service_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.byteful.com/1.0/public/user/service/edit/{service_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cancel_comment' => '<string>',
'cancel_feedback' => '<string>',
'payment_method_id' => '<string>',
'service_is_automatic_collection' => true,
'service_is_pending_cancellation' => true,
'service_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-API-Private-Key: <api-key>",
"X-API-Public-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.byteful.com/1.0/public/user/service/edit/{service_id}"
payload := strings.NewReader("{\n \"cancel_comment\": \"<string>\",\n \"cancel_feedback\": \"<string>\",\n \"payment_method_id\": \"<string>\",\n \"service_is_automatic_collection\": true,\n \"service_is_pending_cancellation\": true,\n \"service_metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-API-Private-Key", "<api-key>")
req.Header.Add("X-API-Public-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.byteful.com/1.0/public/user/service/edit/{service_id}")
.header("Content-Type", "<content-type>")
.header("X-API-Private-Key", "<api-key>")
.header("X-API-Public-Key", "<api-key>")
.body("{\n \"cancel_comment\": \"<string>\",\n \"cancel_feedback\": \"<string>\",\n \"payment_method_id\": \"<string>\",\n \"service_is_automatic_collection\": true,\n \"service_is_pending_cancellation\": true,\n \"service_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.byteful.com/1.0/public/user/service/edit/{service_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = '<content-type>'
request["X-API-Private-Key"] = '<api-key>'
request["X-API-Public-Key"] = '<api-key>'
request.body = "{\n \"cancel_comment\": \"<string>\",\n \"cancel_feedback\": \"<string>\",\n \"payment_method_id\": \"<string>\",\n \"service_is_automatic_collection\": true,\n \"service_is_pending_cancellation\": true,\n \"service_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"edited": [
"API-1234-5678"
],
"message": "Service successfully edited."
}Service
Edit Service
Allows a user to edit the details of an existing service. This can include changes in payment method, adjusting automatic collection, and marking for cancellation at the end of a period.
PATCH
/
public
/
user
/
service
/
edit
/
{service_id}
Edit Service
curl --request PATCH \
--url https://api.byteful.com/1.0/public/user/service/edit/{service_id} \
--header 'Content-Type: <content-type>' \
--header 'X-API-Private-Key: <api-key>' \
--header 'X-API-Public-Key: <api-key>' \
--data '
{
"cancel_comment": "<string>",
"cancel_feedback": "<string>",
"payment_method_id": "<string>",
"service_is_automatic_collection": true,
"service_is_pending_cancellation": true,
"service_metadata": {}
}
'import requests
url = "https://api.byteful.com/1.0/public/user/service/edit/{service_id}"
payload = {
"cancel_comment": "<string>",
"cancel_feedback": "<string>",
"payment_method_id": "<string>",
"service_is_automatic_collection": True,
"service_is_pending_cancellation": True,
"service_metadata": {}
}
headers = {
"Content-Type": "<content-type>",
"X-API-Private-Key": "<api-key>",
"X-API-Public-Key": "<api-key>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Content-Type': '<content-type>',
'X-API-Private-Key': '<api-key>',
'X-API-Public-Key': '<api-key>'
},
body: JSON.stringify({
cancel_comment: '<string>',
cancel_feedback: '<string>',
payment_method_id: '<string>',
service_is_automatic_collection: true,
service_is_pending_cancellation: true,
service_metadata: {}
})
};
fetch('https://api.byteful.com/1.0/public/user/service/edit/{service_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.byteful.com/1.0/public/user/service/edit/{service_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cancel_comment' => '<string>',
'cancel_feedback' => '<string>',
'payment_method_id' => '<string>',
'service_is_automatic_collection' => true,
'service_is_pending_cancellation' => true,
'service_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-API-Private-Key: <api-key>",
"X-API-Public-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.byteful.com/1.0/public/user/service/edit/{service_id}"
payload := strings.NewReader("{\n \"cancel_comment\": \"<string>\",\n \"cancel_feedback\": \"<string>\",\n \"payment_method_id\": \"<string>\",\n \"service_is_automatic_collection\": true,\n \"service_is_pending_cancellation\": true,\n \"service_metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-API-Private-Key", "<api-key>")
req.Header.Add("X-API-Public-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.byteful.com/1.0/public/user/service/edit/{service_id}")
.header("Content-Type", "<content-type>")
.header("X-API-Private-Key", "<api-key>")
.header("X-API-Public-Key", "<api-key>")
.body("{\n \"cancel_comment\": \"<string>\",\n \"cancel_feedback\": \"<string>\",\n \"payment_method_id\": \"<string>\",\n \"service_is_automatic_collection\": true,\n \"service_is_pending_cancellation\": true,\n \"service_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.byteful.com/1.0/public/user/service/edit/{service_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = '<content-type>'
request["X-API-Private-Key"] = '<api-key>'
request["X-API-Public-Key"] = '<api-key>'
request.body = "{\n \"cancel_comment\": \"<string>\",\n \"cancel_feedback\": \"<string>\",\n \"payment_method_id\": \"<string>\",\n \"service_is_automatic_collection\": true,\n \"service_is_pending_cancellation\": true,\n \"service_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"edited": [
"API-1234-5678"
],
"message": "Service successfully edited."
}Authorizations
Headers
Body
application/json
Parameters required to edit the service.

