Import the valid rows
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/patient-imports/{job_id}/run-valid \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/patient-imports/{job_id}/run-valid', 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}/patient-imports/{job_id}/run-valid"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "validating",
"input_format": "json_array",
"row_count": 123,
"last_processed_row": 123,
"counts": {
"created": 123,
"flagged_duplicate": 123,
"skipped_already_imported": 123,
"failed": 123
},
"row_errors": [
{
"row": 2,
"field": "<string>",
"reason": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"started_by": "key",
"valid_only_run_at": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Patients
Import the valid rows
Permission: patients:write Import only the rows that passed, for a job waiting for review. An explicit, recorded choice — the key that made it is stored on the job. Only a job in needs_review whose file is still held (files are deleted after 7 days) can be run this way; anything else is invalid_status_transition (409) or file_expired (410). Rows that failed stay in row_errors for reference and are not imported. The response is the finished job.
POST
/
v1
/
clinics
/
{clinic_id}
/
patient-imports
/
{job_id}
/
run-valid
Import the valid rows
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/patient-imports/{job_id}/run-valid \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/patient-imports/{job_id}/run-valid', 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}/patient-imports/{job_id}/run-valid"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "validating",
"input_format": "json_array",
"row_count": 123,
"last_processed_row": 123,
"counts": {
"created": 123,
"flagged_duplicate": 123,
"skipped_already_imported": 123,
"failed": 123
},
"row_errors": [
{
"row": 2,
"field": "<string>",
"reason": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"started_by": "key",
"valid_only_run_at": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}