Update an order
curl --request PATCH \
--url https://api.usecobalt.com/v1/orders/{id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"result_date": "<string>",
"collected_date": "<string>",
"collection_time": "<string>",
"performed_date": "<string>",
"assigned_to_id": "<string>",
"high_priority": true,
"callback_urls": [
"<string>"
]
}
'import requests
url = "https://api.usecobalt.com/v1/orders/{id}"
payload = {
"result_date": "<string>",
"collected_date": "<string>",
"collection_time": "<string>",
"performed_date": "<string>",
"assigned_to_id": "<string>",
"high_priority": True,
"callback_urls": ["<string>"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
result_date: '<string>',
collected_date: '<string>',
collection_time: '<string>',
performed_date: '<string>',
assigned_to_id: '<string>',
high_priority: true,
callback_urls: ['<string>']
})
};
fetch('https://api.usecobalt.com/v1/orders/{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.usecobalt.com/v1/orders/{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([
'result_date' => '<string>',
'collected_date' => '<string>',
'collection_time' => '<string>',
'performed_date' => '<string>',
'assigned_to_id' => '<string>',
'high_priority' => true,
'callback_urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <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.usecobalt.com/v1/orders/{id}"
payload := strings.NewReader("{\n \"result_date\": \"<string>\",\n \"collected_date\": \"<string>\",\n \"collection_time\": \"<string>\",\n \"performed_date\": \"<string>\",\n \"assigned_to_id\": \"<string>\",\n \"high_priority\": true,\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
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.usecobalt.com/v1/orders/{id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_date\": \"<string>\",\n \"collected_date\": \"<string>\",\n \"collection_time\": \"<string>\",\n \"performed_date\": \"<string>\",\n \"assigned_to_id\": \"<string>\",\n \"high_priority\": true,\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"result_date\": \"<string>\",\n \"collected_date\": \"<string>\",\n \"collection_time\": \"<string>\",\n \"performed_date\": \"<string>\",\n \"assigned_to_id\": \"<string>\",\n \"high_priority\": true,\n \"callback_urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": "<string>",
"message": "<string>",
"job_id": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Orders
Update Order
Updates an existing order’s dates, assignee, or priority.
PATCH
/
orders
/
{id}
Update an order
curl --request PATCH \
--url https://api.usecobalt.com/v1/orders/{id} \
--header 'Content-Type: application/json' \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>' \
--data '
{
"result_date": "<string>",
"collected_date": "<string>",
"collection_time": "<string>",
"performed_date": "<string>",
"assigned_to_id": "<string>",
"high_priority": true,
"callback_urls": [
"<string>"
]
}
'import requests
url = "https://api.usecobalt.com/v1/orders/{id}"
payload = {
"result_date": "<string>",
"collected_date": "<string>",
"collection_time": "<string>",
"performed_date": "<string>",
"assigned_to_id": "<string>",
"high_priority": True,
"callback_urls": ["<string>"]
}
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
client_id: '<api-key>',
client_secret: '<api-key>',
access_token: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
result_date: '<string>',
collected_date: '<string>',
collection_time: '<string>',
performed_date: '<string>',
assigned_to_id: '<string>',
high_priority: true,
callback_urls: ['<string>']
})
};
fetch('https://api.usecobalt.com/v1/orders/{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.usecobalt.com/v1/orders/{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([
'result_date' => '<string>',
'collected_date' => '<string>',
'collection_time' => '<string>',
'performed_date' => '<string>',
'assigned_to_id' => '<string>',
'high_priority' => true,
'callback_urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <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.usecobalt.com/v1/orders/{id}"
payload := strings.NewReader("{\n \"result_date\": \"<string>\",\n \"collected_date\": \"<string>\",\n \"collection_time\": \"<string>\",\n \"performed_date\": \"<string>\",\n \"assigned_to_id\": \"<string>\",\n \"high_priority\": true,\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
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.usecobalt.com/v1/orders/{id}")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_date\": \"<string>\",\n \"collected_date\": \"<string>\",\n \"collection_time\": \"<string>\",\n \"performed_date\": \"<string>\",\n \"assigned_to_id\": \"<string>\",\n \"high_priority\": true,\n \"callback_urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"result_date\": \"<string>\",\n \"collected_date\": \"<string>\",\n \"collection_time\": \"<string>\",\n \"performed_date\": \"<string>\",\n \"assigned_to_id\": \"<string>\",\n \"high_priority\": true,\n \"callback_urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": "<string>",
"message": "<string>",
"job_id": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Order updates are processed asynchronously: a valid request returns immediately with a
202, and an order.updated webhook is sent when processing completes. If the update fails terminally, an order.update_failed webhook is sent instead.
Updating orders is only supported for eClinicalWorks.
Request Parameters
All fields are optional; send only the fields you want to change.- result_date (string, optional): Result date (ISO 8601, YYYY-MM-DD).
- collected_date (string, optional): Specimen collection date (ISO 8601, YYYY-MM-DD).
- collection_time (string, optional): Specimen collection time, e.g.
"12:58 PM". - performed_date (string, optional): Performed date (ISO 8601, YYYY-MM-DD). Diagnostic imaging.
- assigned_to_id (string, optional): EMR staff id to assign the order to.
- high_priority (boolean, optional): Flag the order high priority.
- callback_urls (string[], optional): URLs to receive the
order.updatedwebhook, in addition to the account webhook.
Example Request
curl -X PATCH https://api.usecobalt.com/v1/orders/ord_123456 \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
"collected_date": "2026-03-16",
"collection_time": "09:15 AM",
"assigned_to_id": "staff_101",
"high_priority": true
}'
Example Response
{
"success": true,
"status": "queued",
"message": "Order update queued. An order.updated webhook will be sent when it completes.",
"job_id": 12345
}
Webhook Notifications
When processing completes, we send a webhook to your registered endpoint.Success
{
"id": "evt_1J9X2q2eZvKYlo2CluR9g9gV",
"access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
"object": "event",
"created": "2025-10-09T10:30:00Z",
"type": "order.updated",
"job_id": "12345",
"data": {
"emr_order_id": "998877",
"emr_encounter_id": "445566",
"patient_mrn": "12345"
}
}
Failure
{
"id": "evt_1J9X2q2eZvKYlo2CluR9g9gW",
"access_token_reference_id": "user_1J9X2q2eZvKYlo2Cxyz",
"object": "event",
"created": "2025-10-09T10:35:00Z",
"type": "order.update_failed",
"job_id": "12345",
"data": {
"patient_mrn": "12345",
"failure_reason": "Order update failed after multiple attempts. Please try again later or contact support."
}
}
Authorizations
Path Parameters
Cobalt order ID.
Body
application/json
Result date (ISO 8601, YYYY-MM-DD).
Specimen collection date (ISO 8601, YYYY-MM-DD).
Specimen collection time, e.g. "12:58 PM".
Performed date (ISO 8601, YYYY-MM-DD). Diagnostic imaging.
EMR staff id to assign the order to.
Flag the order high priority.
URLs to receive the order.updated webhook, in addition to the account webhook.