Get lab details
Return details for a single lab, including contact details, primary address and every business license on file.
The lab must already be associated with your client, or have existing orders with it. Labs that do not exist and labs you are not associated with both return a 404 so that lab associations are not leaked.
Path parameters
Try it
Log in to send test requests to this endpoint straight from the docs.
Responses
200 Success
Show 7 child attributes Hide 7 child attributes
Lab ID
Lab Name
Lab Email
Lab Phone
Lab Website
Show 6 child attributes Hide 6 child attributes
Address ID
Street address line 1
Street address line 2
City
Two letter state abbreviation
Zipcode
Show 6 child attributes Hide 6 child attributes
License ID
License Number
License Code (some states only)
Human entered name for license
License Designation Name [changes by state]
License Type Name [changes by state]
400 Bad request
The request was malformed or failed validation. Validation failures include per-field messages in error_details.
Possible error_code values: invalid_request, request_too_old.
401 Unauthorized
Authentication failed.
Possible error_code values: missing_api_key, invalid_api_key, invalid_credentials_type, api_access_restricted, api_access_denied, missing_signature, missing_timestamp, invalid_timestamp, invalid_signature.
403 Permission denied
The API key is valid but does not have permission for this endpoint (for example, a client key calling a labs endpoint).
Possible error_code values: permission_denied.
404 Not found
The requested record does not exist or is not visible to this organization.
Possible error_code values: not_found.
# X-ConfidentLims-Signature: see the Request Signing guide - https://api.confidentcannabis.com/v0/docs/request-signing.md
curl -X GET 'https://api.confidentcannabis.com/v0/clients/lab/{lab_id}' \
-H 'X-ConfidentLims-APIKey: YOUR_API_KEY' \
-H 'X-ConfidentLims-Timestamp: UNIX_TIMESTAMP' \
-H 'X-ConfidentLims-Signature: REQUEST_SIGNATURE'
import time import requests # sign_request() is defined in the Request Signing guide: # https://api.confidentcannabis.com/v0/docs/request-signing.md from sign_request import sign_request API_KEY = 'YOUR_API_KEY' API_SECRET = 'YOUR_API_SECRET' path = '/v0/clients/lab/{lab_id}' headers = {'X-ConfidentLims-Timestamp': str(int(time.time()))} headers['X-ConfidentLims-Signature'] = sign_request( 'GET', path, headers, {}, API_KEY, API_SECRET) headers['X-ConfidentLims-APIKey'] = API_KEY response = requests.get( 'https://api.confidentcannabis.com' + path, headers=headers, ) print(response.json())
// signRequest() is defined in the Request Signing guide: // https://api.confidentcannabis.com/v0/docs/request-signing.md import { signRequest } from './sign_request.js'; const API_KEY = 'YOUR_API_KEY'; const API_SECRET = 'YOUR_API_SECRET'; const path = "/v0/clients/lab/{lab_id}"; const headers = { 'X-ConfidentLims-Timestamp': String(Math.floor(Date.now() / 1000)) }; headers['X-ConfidentLims-Signature'] = signRequest( "GET", path, headers, {}, API_KEY, API_SECRET); headers['X-ConfidentLims-APIKey'] = API_KEY; const response = await fetch("https://api.confidentcannabis.com" + path, { headers, }); console.log(await response.json());
{
"success": true,
"lab": {
"id": 118,
"name": "Cascade Analytical Labs",
"email": "intake@cascadeanalytical.com",
"phone": "503-555-0188",
"url": "https://cascadeanalytical.com",
"primary_address": {
"id": 4410,
"address_line_1": "900 NW Industrial Way",
"address_line_2": "",
"city": "Portland",
"state_abbreviation": "OR",
"zipcode": "97209"
},
"licenses": [
{
"id": 907,
"license_number": "010-100254B7F",
"license_code": "LAB-0221",
"nickname": "Main lab",
"license_designation_name": "Recreational",
"license_type_name": "Laboratory"
}
]
}
}