curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/care-providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"practice_name": "<string>",
"specialty": "<string>",
"npi": "<string>",
"phone": "<string>",
"fax": "<string>",
"address": "<string>",
"is_primary": true,
"origin_assistant_name": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
practice_name: '<string>',
specialty: '<string>',
npi: '<string>',
phone: '<string>',
fax: '<string>',
address: '<string>',
is_primary: true,
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/care-providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/care-providers"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"practice_name": "<string>",
"specialty": "<string>",
"npi": "<string>",
"phone": "<string>",
"fax": "<string>",
"address": "<string>",
"is_primary": True,
"origin_assistant_name": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "pcp",
"name": "<string>",
"is_primary": true,
"source": "clinic",
"editable": true,
"practice_name": "<string>",
"specialty": "<string>",
"npi": "<string>",
"phone": "<string>",
"fax": "<string>",
"address": "<string>",
"origin_assistant_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"idempotent_replay": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Add an outside care provider
Permission: care_providers:write
Add an outside care provider to a patient.
Saved straight away and visible on the patient’s record: answers 201 Created with the contact. If is_primary is true, the patient’s other contacts of the same type stop being primary. The Idempotency-Key header is REQUIRED — a retry with the same key returns the original contact, never a second one. Contact notes cannot be sent. Only the contacts an app adds can later be changed or removed by that app.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/care-providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"practice_name": "<string>",
"specialty": "<string>",
"npi": "<string>",
"phone": "<string>",
"fax": "<string>",
"address": "<string>",
"is_primary": true,
"origin_assistant_name": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patient_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
practice_name: '<string>',
specialty: '<string>',
npi: '<string>',
phone: '<string>',
fax: '<string>',
address: '<string>',
is_primary: true,
origin_assistant_name: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/care-providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/care-providers"
payload = {
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"practice_name": "<string>",
"specialty": "<string>",
"npi": "<string>",
"phone": "<string>",
"fax": "<string>",
"address": "<string>",
"is_primary": True,
"origin_assistant_name": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "pcp",
"name": "<string>",
"is_primary": true,
"source": "clinic",
"editable": true,
"practice_name": "<string>",
"specialty": "<string>",
"npi": "<string>",
"phone": "<string>",
"fax": "<string>",
"address": "<string>",
"origin_assistant_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"idempotent_replay": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.
1Path Parameters
Body
An outside care provider to add to a patient. Saved straight away. If is_primary is true, the patient's other contacts of the same type stop being primary. npi is ten digits (its shape is checked, not its check digit). The clinic's notes on a contact cannot be sent. The Idempotency-Key header is REQUIRED.
1 - 200pcp, referring, specialist, other 200100^[0-9]{10}$4040500200Response
Created.
An outside clinician a patient names (their own doctor, a referring doctor, a specialist) — the exposed-field allow-list, field by field. source is clinic for a contact the clinic recorded (including one taken from an intake form) and api for one an app added. editable is true only when this key's app added the contact, so it may change or remove it; every other contact is read only to apps. The clinic's own notes on a contact are never exposed.
Show child attributes
Show child attributes
Present and true when this Idempotency-Key was already used and the original contact is returned.