List pharmacies
curl --request GET \
--url https://api.usecobalt.com/v1/pharmacies \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/pharmacies"
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {client_id: '<api-key>', client_secret: '<api-key>', access_token: '<api-key>'}
};
fetch('https://api.usecobalt.com/v1/pharmacies', 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/pharmacies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/pharmacies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usecobalt.com/v1/pharmacies")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/pharmacies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"pharmacies": [
{
"id": "<string>",
"ehr_id": "<string>",
"name": "<string>",
"address": {
"address1": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>"
},
"phone": "<string>",
"email": "<string>"
}
]
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}Pharmacies
Get Pharmacies
Retrieve pharmacies from the EMR system for your organization.
GET
/
pharmacies
List pharmacies
curl --request GET \
--url https://api.usecobalt.com/v1/pharmacies \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/pharmacies"
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {client_id: '<api-key>', client_secret: '<api-key>', access_token: '<api-key>'}
};
fetch('https://api.usecobalt.com/v1/pharmacies', 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/pharmacies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/pharmacies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usecobalt.com/v1/pharmacies")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/pharmacies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"pharmacies": [
{
"id": "<string>",
"ehr_id": "<string>",
"name": "<string>",
"address": {
"address1": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>"
},
"phone": "<string>",
"email": "<string>"
}
]
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}Example Request
curl -X GET "https://api.usecobalt.com/v1/pharmacies" \
-H "client_id: your_client_id" \
-H "client_secret: your_client_secret" \
-H "access_token: your_access_token"
Example Response
{
"success": true,
"pharmacies": [
{
"id": "abc123def456ghi789",
"ehr_id": "12345",
"name": "Main Street Pharmacy",
"address": {
"address1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94102"
},
"phone": "(415) 555-0123",
"email": "info@mainstreetpharmacy.com",
"status": "active"
},
{
"id": "xyz789ghi012jkl345",
"ehr_id": "67890",
"name": "Downtown Medical Pharmacy",
"address": {
"address1": "456 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105"
},
"phone": "(415) 555-0456",
"email": "contact@downtownmedpharm.com",
"status": "active"
}
]
}
Response Fields
Top-Level Fields
- success (boolean): Whether the request was successful
- pharmacies (array): Array of pharmacy objects for the organization
Pharmacy Object
- id (string): Cobalt pharmacy ID (UUID without dashes)
- ehr_id (string): The pharmacy ID as it appears in the EMR system
- name (string): Pharmacy name
- address (object): Pharmacy address information
- address1 (string): Street address
- city (string): City name
- state (string): State abbreviation
- zip (string): ZIP code
- phone (string): Contact phone number
- email (string): Contact email address
- status (string): Pharmacy status - either “active” or “inactive”
⌘I