Update a patient visit
curl --request PATCH \
--url https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{id} \
--header 'Content-Type: application/json' \
--data '
{
"is_initial_visit": true,
"visit_time": "<string>"
}
'import requests
url = "https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{id}"
payload = {
"is_initial_visit": True,
"visit_time": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({is_initial_visit: true, visit_time: '<string>'})
};
fetch('https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{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.spikecare.com/public/v1/patients/{patient_id}/visits/{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([
'is_initial_visit' => true,
'visit_time' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.spikecare.com/public/v1/patients/{patient_id}/visits/{id}"
payload := strings.NewReader("{\n \"is_initial_visit\": true,\n \"visit_time\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.spikecare.com/public/v1/patients/{patient_id}/visits/{id}")
.header("Content-Type", "application/json")
.body("{\n \"is_initial_visit\": true,\n \"visit_time\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_initial_visit\": true,\n \"visit_time\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": 2,
"is_initial_visit": true,
"patient_id": 2,
"visit_time": "2023-11-07T05:31:56Z",
"visit_type": "PT",
"$schema": "https://api.spikecare.com/public/v1/schemas/PatientVisit.json"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Update a patient visit
Update a visit’s time or type. Send only the fields you want to change.
Update a patient visit
curl --request PATCH \
--url https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{id} \
--header 'Content-Type: application/json' \
--data '
{
"is_initial_visit": true,
"visit_time": "<string>"
}
'import requests
url = "https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{id}"
payload = {
"is_initial_visit": True,
"visit_time": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({is_initial_visit: true, visit_time: '<string>'})
};
fetch('https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{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.spikecare.com/public/v1/patients/{patient_id}/visits/{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([
'is_initial_visit' => true,
'visit_time' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.spikecare.com/public/v1/patients/{patient_id}/visits/{id}"
payload := strings.NewReader("{\n \"is_initial_visit\": true,\n \"visit_time\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.spikecare.com/public/v1/patients/{patient_id}/visits/{id}")
.header("Content-Type", "application/json")
.body("{\n \"is_initial_visit\": true,\n \"visit_time\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spikecare.com/public/v1/patients/{patient_id}/visits/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_initial_visit\": true,\n \"visit_time\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": 2,
"is_initial_visit": true,
"patient_id": 2,
"visit_time": "2023-11-07T05:31:56Z",
"visit_type": "PT",
"$schema": "https://api.spikecare.com/public/v1/schemas/PatientVisit.json"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.spikecare.com/public/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Body
application/json
Response
OK
When the visit record was created (ISO 8601).
Unique visit identifier assigned by the API.
Required range:
x >= 1Whether this is the patient's initial visit.
ID of the patient this visit belongs to.
Required range:
x >= 1When the visit occurred (ISO 8601 date-time or date only).
Therapy type: PT (Physical Therapy), OT (Occupational Therapy), or ST (Speech Therapy).
Available options:
PT, OT, ST A URL to the JSON Schema for this object.
Example:
"https://api.spikecare.com/public/v1/schemas/PatientVisit.json"
