Void a draft prescription
curl --request POST \
--url https://api.maxcare.ai/v4/prescriptions/{id}/void \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--header 'idempotency-key: <idempotency-key>'import requests
url = "https://api.maxcare.ai/v4/prescriptions/{id}/void"
headers = {
"idempotency-key": "<idempotency-key>",
"Idempotency-Key": "<idempotency-key>",
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
'Idempotency-Key': '<idempotency-key>',
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.maxcare.ai/v4/prescriptions/{id}/void', 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.maxcare.ai/v4/prescriptions/{id}/void",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>",
"X-Organization-Id: <x-organization-id>",
"idempotency-key: <idempotency-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"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v4/prescriptions/{id}/void"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.maxcare.ai/v4/prescriptions/{id}/void")
.header("idempotency-key", "<idempotency-key>")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v4/prescriptions/{id}/void")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "rxp_5f1c0000000040000000000000000001",
"ehrPrescriptionId": "40000001",
"patientId": "pat_8de0303900004000a000000000000001",
"status": "erx",
"ehrStatusText": "ERX",
"writtenOn": "2026-09-12",
"writtenBy": {
"providerId": "prv_1a2b000000004000a000000000000001",
"ehrStaffId": "222",
"name": "Jane Example, MD"
},
"createdBy": {
"providerId": "prv_1a2b000000004000a000000000000001",
"ehrStaffId": "222",
"name": "Jane Example, MD"
},
"facilityId": "fac_b2c3d4e5f6a74b8c9d0e1f2a3b4c5d6e",
"drug": {
"dispensableId": "900001",
"description": "Examplumab 150 mg/mL subcutaneous syringe",
"drugName": "Examplumab",
"ndc": "00000000001",
"controlledSubstance": false,
"deaSchedule": null
},
"sig": "Inject 1 mL under the skin every 4 weeks",
"quantity": "1",
"quantityQualifier": {
"code": "ML",
"name": "Milliliter"
},
"refills": 11,
"daysSupply": 28,
"substitutionAllowed": true,
"diagnosisCodes": [
"L40.0"
],
"sourcePrescriptionId": null,
"erx": {
"status": "pharmacy_verified",
"ehrStatusText": "Pharmacy received and verified",
"errorMessage": null,
"releasedAt": "2026-09-12T15:04:05.000Z",
"releasedBy": {
"providerId": "prv_1a2b000000004000a000000000000001",
"ehrStaffId": "222",
"name": "Jane Example, MD"
},
"pharmacy": {
"ncpdpId": "0000001",
"name": "Example Clinic Pharmacy"
},
"messageId": "EMA00000000000000000000000000000000",
"remainingRefills": 11
}
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "server_unresponsive",
"message": "EHR integration is not available for this note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Prescriptions
Void a draft prescription
Not yet supported: a PENDING draft answers 400 capability_unsupported because the EHR’s void call is not captured; staff discard drafts in the EHR. An already-voided prescription answers 200; anything else answers 409 prescription_not_pending. Idempotency-Key is required.
POST
/
prescriptions
/
{id}
/
void
Void a draft prescription
curl --request POST \
--url https://api.maxcare.ai/v4/prescriptions/{id}/void \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--header 'idempotency-key: <idempotency-key>'import requests
url = "https://api.maxcare.ai/v4/prescriptions/{id}/void"
headers = {
"idempotency-key": "<idempotency-key>",
"Idempotency-Key": "<idempotency-key>",
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
'Idempotency-Key': '<idempotency-key>',
'X-Organization-Id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.maxcare.ai/v4/prescriptions/{id}/void', 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.maxcare.ai/v4/prescriptions/{id}/void",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>",
"X-Organization-Id: <x-organization-id>",
"idempotency-key: <idempotency-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"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v4/prescriptions/{id}/void"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.maxcare.ai/v4/prescriptions/{id}/void")
.header("idempotency-key", "<idempotency-key>")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v4/prescriptions/{id}/void")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"id": "rxp_5f1c0000000040000000000000000001",
"ehrPrescriptionId": "40000001",
"patientId": "pat_8de0303900004000a000000000000001",
"status": "erx",
"ehrStatusText": "ERX",
"writtenOn": "2026-09-12",
"writtenBy": {
"providerId": "prv_1a2b000000004000a000000000000001",
"ehrStaffId": "222",
"name": "Jane Example, MD"
},
"createdBy": {
"providerId": "prv_1a2b000000004000a000000000000001",
"ehrStaffId": "222",
"name": "Jane Example, MD"
},
"facilityId": "fac_b2c3d4e5f6a74b8c9d0e1f2a3b4c5d6e",
"drug": {
"dispensableId": "900001",
"description": "Examplumab 150 mg/mL subcutaneous syringe",
"drugName": "Examplumab",
"ndc": "00000000001",
"controlledSubstance": false,
"deaSchedule": null
},
"sig": "Inject 1 mL under the skin every 4 weeks",
"quantity": "1",
"quantityQualifier": {
"code": "ML",
"name": "Milliliter"
},
"refills": 11,
"daysSupply": 28,
"substitutionAllowed": true,
"diagnosisCodes": [
"L40.0"
],
"sourcePrescriptionId": null,
"erx": {
"status": "pharmacy_verified",
"ehrStatusText": "Pharmacy received and verified",
"errorMessage": null,
"releasedAt": "2026-09-12T15:04:05.000Z",
"releasedBy": {
"providerId": "prv_1a2b000000004000a000000000000001",
"ehrStaffId": "222",
"name": "Jane Example, MD"
},
"pharmacy": {
"ncpdpId": "0000001",
"name": "Example Clinic Pharmacy"
},
"messageId": "EMA00000000000000000000000000000000",
"remainingRefills": 11
}
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "server_unresponsive",
"message": "EHR integration is not available for this note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Marketplace API key
Headers
Target clinic organization ID
Path Parameters
Prescription ID (rxp_…)
