Update appointment services, time, advisor, transport, or comments
curl --request PATCH \
--url https://api.sparkserv.com/public/v1/appointments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"advisorId": "<string>",
"transportId": "<string>",
"comments": "<string>",
"appointmentAt": "2023-11-07T05:31:56Z",
"services": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comments": "<string>"
}
]
}
'import requests
url = "https://api.sparkserv.com/public/v1/appointments/{id}"
payload = {
"advisorId": "<string>",
"transportId": "<string>",
"comments": "<string>",
"appointmentAt": "2023-11-07T05:31:56Z",
"services": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comments": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
advisorId: '<string>',
transportId: '<string>',
comments: '<string>',
appointmentAt: '2023-11-07T05:31:56Z',
services: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', comments: '<string>'}]
})
};
fetch('https://api.sparkserv.com/public/v1/appointments/{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.sparkserv.com/public/v1/appointments/{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([
'advisorId' => '<string>',
'transportId' => '<string>',
'comments' => '<string>',
'appointmentAt' => '2023-11-07T05:31:56Z',
'services' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'comments' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sparkserv.com/public/v1/appointments/{id}"
payload := strings.NewReader("{\n \"advisorId\": \"<string>\",\n \"transportId\": \"<string>\",\n \"comments\": \"<string>\",\n \"appointmentAt\": \"2023-11-07T05:31:56Z\",\n \"services\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comments\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.sparkserv.com/public/v1/appointments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"advisorId\": \"<string>\",\n \"transportId\": \"<string>\",\n \"comments\": \"<string>\",\n \"appointmentAt\": \"2023-11-07T05:31:56Z\",\n \"services\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comments\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sparkserv.com/public/v1/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"advisorId\": \"<string>\",\n \"transportId\": \"<string>\",\n \"comments\": \"<string>\",\n \"appointmentAt\": \"2023-11-07T05:31:56Z\",\n \"services\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comments\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Appointments
Update appointment services, time, advisor, transport, or comments
PATCH
/
appointments
/
{id}
Update appointment services, time, advisor, transport, or comments
curl --request PATCH \
--url https://api.sparkserv.com/public/v1/appointments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"advisorId": "<string>",
"transportId": "<string>",
"comments": "<string>",
"appointmentAt": "2023-11-07T05:31:56Z",
"services": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comments": "<string>"
}
]
}
'import requests
url = "https://api.sparkserv.com/public/v1/appointments/{id}"
payload = {
"advisorId": "<string>",
"transportId": "<string>",
"comments": "<string>",
"appointmentAt": "2023-11-07T05:31:56Z",
"services": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comments": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
advisorId: '<string>',
transportId: '<string>',
comments: '<string>',
appointmentAt: '2023-11-07T05:31:56Z',
services: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', comments: '<string>'}]
})
};
fetch('https://api.sparkserv.com/public/v1/appointments/{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.sparkserv.com/public/v1/appointments/{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([
'advisorId' => '<string>',
'transportId' => '<string>',
'comments' => '<string>',
'appointmentAt' => '2023-11-07T05:31:56Z',
'services' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'comments' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sparkserv.com/public/v1/appointments/{id}"
payload := strings.NewReader("{\n \"advisorId\": \"<string>\",\n \"transportId\": \"<string>\",\n \"comments\": \"<string>\",\n \"appointmentAt\": \"2023-11-07T05:31:56Z\",\n \"services\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comments\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.sparkserv.com/public/v1/appointments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"advisorId\": \"<string>\",\n \"transportId\": \"<string>\",\n \"comments\": \"<string>\",\n \"appointmentAt\": \"2023-11-07T05:31:56Z\",\n \"services\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comments\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sparkserv.com/public/v1/appointments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"advisorId\": \"<string>\",\n \"transportId\": \"<string>\",\n \"comments\": \"<string>\",\n \"appointmentAt\": \"2023-11-07T05:31:56Z\",\n \"services\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comments\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Spark appointment UUIDv4
Body
application/json
Supply at least one of services, appointmentAt, advisorId, transportId, or comments. Omitted fields are preserved.
Advisor ID from discovery; omission preserves the current advisor
Transport ID from discovery; omission preserves the current transport
Appointment-level public comments; omission preserves the current comments
Omission preserves the current time; an explicit offset is required
Replaces selected services; omission preserves historical rows. Supply at least one update field.
Minimum array length:
1Show child attributes
Show child attributes

