/v1/test_result_batchesCreate up to 100 Test Results in one request
Returns 201 when every TestResult is created immediately. Returns 202 when at least one item includes file_url or file_base64; poll remote_file_import_batch for each file's import status. Both responses use TestResultBatchResponse.
Required API scopes: test_results.create
Parameters
Idempotency-Key
header · required
string
Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an
Idempotency-Replayed: trueheader. Same key + different body returns422 idempotency_key_reused. A duplicate that arrives while the first request is still in flight returns409 idempotency_conflictwithRetry-After: 1.
Request body
application/json
itemsarrayrequiredThe test results to create. Items are processed in their submitted order.
itemsobjectautomatically_create_resource_permission_for_patientbooleanWhether Carebit should automatically share the test result with the patient after processing.
booking_idstring | null · uuidThe identifier of the booking associated with the test result, or null when it is not linked to a booking.
clinician_idstring | null · uuidThe identifier of the clinician associated with the test result, or null when none is assigned.
descriptionstring | nullA description of the TestResult.
file_base64string | null · byteThe test result bytes encoded as Base64. Provide this with
filenameinstead offile_url. The decoded file can be at most 7 MB.file_urlstring | null · uriThe public HTTPS URL of a test result document that Carebit should download.
filenamestring | nullThe filename to use for the test result. Required with
file_base64; defaults to the remote file's filename for URL sources.notify_patient_of_resource_permissionbooleanWhether Carebit should notify the patient when the test result is shared with them.
patient_idstring · uuidThe identifier of the patient that the test result belongs to.
statusstringThe workflow status to assign to the test result.
Allowed values:
awaiting_review | complete | draft | reviewedtest_result_itemsarrayThe structured clinical observations to include in the test result.
itemsobjectis_abnormalboolean | nullWhether the observation falls outside its reference range, when known.
notesstring | nullAdditional clinical notes about the observation.
observation_codestring | nullThe laboratory or clinical code that identifies the observation.
observation_namestring | nullThe observation's display name.
observation_textstring | nullThe textual observation value, when the result is not represented numerically.
observation_valuenumber | nullThe numeric value of the observation, when applicable.
observation_value_precisionstring | nullThe qualifier that indicates whether
observation_valueis exact or a boundary.Allowed values:
< | = | > | nullobservation_value_unitsstring | nullThe unit used for
observation_value.observed_atstring | null · date-timeAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.reference_range_lower_boundnumber | nullThe lower bound of the expected reference range, when supplied.
reference_range_upper_boundnumber | nullThe upper bound of the expected reference range, when supplied.
statusstring | nullThe clinical workflow status to assign to the observation.
Allowed values:
corrected | final | pending | null
titlestringThe display title of the test result.
Responses
Every TestResult was created immediately.
itemsarrayrequiredThe per-item outcomes in their original request order.
itemsobjectThe result of one item in a Test Result batch.
test_resultcontains the created TestResult when processing finishes immediately. For an imported file, it is null andremote_file_import_batch_item_ididentifies the item being processed.objectanyrequiredAlways
test_result_batch_item.positionintegerrequiredThe zero-based position of the item in the request
itemsarray.remote_file_import_batch_item_idstring | null · uuidrequiredThe import item identifier for a file that is still being processed. Null when the TestResult was created immediately. Poll the parent
remote_file_import_batchfor status.statusstringrequiredThe item's processing status.
succeededwhen the TestResult was created immediately; otherwise the current file import status.Allowed values:
failed | pending | processing | succeededtest_resultobject | nullrequiredThe created TestResult, or null while an imported file is being processed.
automatically_create_resource_permission_for_patientbooleanrequiredWhether Carebit automatically shares the test result with the patient after processing.
created_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.download_urlstring | null · urirequiredThe short-lived signed download URL for the TestResult. Null until the uploaded file passes malware scanning.
filenamestring | nullrequiredThe original filename of the test result document, when one was supplied.
idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
linksobjectrequiredURLs to related resources.
bookingstring | null · urirequiredThe full URL of a related resource.
clinicianstring | null · urirequiredThe full URL of a related resource.
patientstring | null · urirequiredThe full URL of a related resource.
remote_file_import_batchstring · uriThe full URL of a related resource.
notify_patient_of_resource_permissionboolean | nullrequiredWhether Carebit notifies the patient when the test result is shared with them.
objectanyrequiredDiscriminator value emitted at
object.remote_file_import_batch_idstring · uuidThe identifier of the remote file import batch created for the uploaded file. Set on the create response when
file_urlorfile_base64was submitted.statusstring | nullrequiredThe workflow status of the test result.
Allowed values:
awaiting_proofreading | awaiting_receipt | awaiting_review | awaiting_sending | awaiting_typing | complete | draft | reviewed | nulltest_result_itemsarrayrequiredThe structured clinical observations included in the test result.
itemsobjectcreated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
is_abnormalboolean | nullrequiredWhether the observation falls outside its reference range, when known.
notesstring | nullrequiredAdditional clinical notes about the observation.
objectanyrequiredDiscriminator value emitted at
object.observation_codestring | nullrequiredThe laboratory or clinical code that identifies the observation.
observation_namestring | nullrequiredThe observation's display name.
observation_textstring | nullrequiredThe textual observation value, when the result is not represented numerically.
observation_valuenumber | nullrequiredThe numeric value of the observation, when applicable.
observation_value_precisionstring | nullrequiredThe precision qualifier for
observation_value.<and>denote a bound, and=denotes an exact value.Allowed values:
< | = | > | nullobservation_value_unitsstring | nullrequiredThe unit used for
observation_value.observed_atstring | null · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.reference_range_lower_boundnumber | nullrequiredThe lower bound of the expected reference range, when supplied.
reference_range_upper_boundnumber | nullrequiredThe upper bound of the expected reference range, when supplied.
statusstring | nullrequiredThe clinical workflow status of the observation.
Allowed values:
corrected | final | pending | nullupdated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
titlestring | nullrequiredThe display title of the test result.
updated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
objectanyrequiredAlways
test_result_batch.remote_file_import_batchobject | nullrequiredThe file import batch to poll, or null when every TestResult was created immediately.
completed_countintegerrequiredThe number of items that finished processing successfully.
created_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.failed_countintegerrequiredThe number of items that finished processing with an error.
idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
itemsarrayrequiredThe import items in their original request order.
itemsobjectcreated_resourcestring | null · urirequiredThe URL of the resource created for a succeeded item. Null unless
statusissucceeded.created_resource_idstring | null · uuidrequiredThe identifier of the resource created for a succeeded item. Null unless
statusissucceeded.created_resource_typestring | nullrequiredThe type of resource created for a succeeded item. Null unless
statusissucceeded.Allowed values:
null | Attachment | Letter | Note | TestResulterrorobject | nullrequiredThe failure details for this item. Null unless the item has failed.
codestring | nullrequiredThe machine-readable error code.
messagestring | nullrequiredA message that explains how the item failed.
idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
objectanyrequiredAlways
remote_file_import_batch_item.positionintegerrequiredThe zero-based position of the item in the submitted batch.
statusstringrequiredThe current download, validation, and malware-scanning status of the item.
Allowed values:
failed | pending | processing | succeeded
linksobjectrequiredURLs to related resources.
selfstring · urirequiredThe full URL of a related resource.
objectanyrequiredDiscriminator value emitted at
object.resource_typestringrequiredThe type of resource created by every item in the batch.
Allowed values:
letter | note | test_resultstatusstringrequiredThe current download, validation, and malware-scanning status of the batch.
Allowed values:
completed | pending | processingtotal_countintegerrequiredThe total number of items submitted in the batch.
updated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
Example
{
"object": "test_result_batch",
"items":
"object": "test_result_batch_item",
"position": 0,
"remote_file_import_batch_item_id": "57bed2bf-e2e1-463b-8a96-643e3817a8b8",
"status": "failed",
"test_result":
"id": "9d4a13e1-0eea-4669-88c4-03316c092c77",
"object": "test_result",
"automatically_create_resource_permission_for_patient": true,
"created_at": "2026-01-01T09:00:00Z",
"download_url": "https://files.example.invalid/document.pdf?signature=test",
"filename": "referral-letter.pdf",
"links":
"booking": "https://api.carebit.co/v1/bookings/92a3b4c5-d6e7-4f01-8234-56789abcdef0",
"clinician": "https://api.carebit.co/v1/clinicians/2b3c4d5e-6f70-489a-9bcd-ef0123456789",
"patient": "https://api.carebit.co/v1/patients/1a2b3c4d-5e6f-4789-8abc-def012345678",
"remote_file_import_batch": "https://api.carebit.co/v1/remote_file_import_batches/ebc38802-f219-4c7b-8136-8e963a0c69e0"
},
"notify_patient_of_resource_permission": true,
"remote_file_import_batch_id": "ebc38802-f219-4c7b-8136-8e963a0c69e0",
"status": "awaiting_proofreading",
"test_result_items":
"id": "7592f451-4733-44f1-8560-1bb6075fa552",
"object": "test_result_item",
"created_at": "2026-01-01T09:00:00Z",
"is_abnormal": false,
"notes": "Please confirm the appointment by email.",
"observation_code": "718-7",
"observation_name": "Haemoglobin",
"observation_text": "Within the expected range",
"observation_value": 14.5,
"observation_value_precision": "<",
"observation_value_units": "g/dL",
"observed_at": "2026-01-01T09:00:00Z",
"reference_range_lower_bound": 12,
"reference_range_upper_bound": 16,
"status": "corrected",
"updated_at": "2026-01-01T09:00:00Z"
}
],
"title": "Dr",
"updated_at": "2026-01-01T09:00:00Z"
}
}
],
"remote_file_import_batch":
"id": "ebc38802-f219-4c7b-8136-8e963a0c69e0",
"object": "remote_file_import_batch",
"completed_count": 0,
"created_at": "2026-01-01T09:00:00Z",
"failed_count": 0,
"items":
"id": "57bed2bf-e2e1-463b-8a96-643e3817a8b8",
"object": "remote_file_import_batch_item",
"created_resource": "https://api.carebit.co/v1/letters/c3d4e5f6-0718-49ab-acde-f01234567890",
"created_resource_id": "7e09a8e3-e3c1-4dee-863b-85d56e4329da",
"created_resource_type": null,
"error": null,
"position": 0,
"status": "failed"
}
],
"links":
"self": "https://api.carebit.co/v1/remote_file_import_batches/ebc38802-f219-4c7b-8136-8e963a0c69e0"
},
"resource_type": "letter",
"status": "completed",
"total_count": 1,
"updated_at": "2026-01-01T09:00:00Z"
}
}At least one file is being imported. Poll remote_file_import_batch for each item's status.
itemsarrayrequiredThe per-item outcomes in their original request order.
itemsobjectThe result of one item in a Test Result batch.
test_resultcontains the created TestResult when processing finishes immediately. For an imported file, it is null andremote_file_import_batch_item_ididentifies the item being processed.objectanyrequiredAlways
test_result_batch_item.positionintegerrequiredThe zero-based position of the item in the request
itemsarray.remote_file_import_batch_item_idstring | null · uuidrequiredThe import item identifier for a file that is still being processed. Null when the TestResult was created immediately. Poll the parent
remote_file_import_batchfor status.statusstringrequiredThe item's processing status.
succeededwhen the TestResult was created immediately; otherwise the current file import status.Allowed values:
failed | pending | processing | succeededtest_resultobject | nullrequiredThe created TestResult, or null while an imported file is being processed.
automatically_create_resource_permission_for_patientbooleanrequiredWhether Carebit automatically shares the test result with the patient after processing.
created_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.download_urlstring | null · urirequiredThe short-lived signed download URL for the TestResult. Null until the uploaded file passes malware scanning.
filenamestring | nullrequiredThe original filename of the test result document, when one was supplied.
idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
linksobjectrequiredURLs to related resources.
bookingstring | null · urirequiredThe full URL of a related resource.
clinicianstring | null · urirequiredThe full URL of a related resource.
patientstring | null · urirequiredThe full URL of a related resource.
remote_file_import_batchstring · uriThe full URL of a related resource.
notify_patient_of_resource_permissionboolean | nullrequiredWhether Carebit notifies the patient when the test result is shared with them.
objectanyrequiredDiscriminator value emitted at
object.remote_file_import_batch_idstring · uuidThe identifier of the remote file import batch created for the uploaded file. Set on the create response when
file_urlorfile_base64was submitted.statusstring | nullrequiredThe workflow status of the test result.
Allowed values:
awaiting_proofreading | awaiting_receipt | awaiting_review | awaiting_sending | awaiting_typing | complete | draft | reviewed | nulltest_result_itemsarrayrequiredThe structured clinical observations included in the test result.
itemsobjectcreated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
is_abnormalboolean | nullrequiredWhether the observation falls outside its reference range, when known.
notesstring | nullrequiredAdditional clinical notes about the observation.
objectanyrequiredDiscriminator value emitted at
object.observation_codestring | nullrequiredThe laboratory or clinical code that identifies the observation.
observation_namestring | nullrequiredThe observation's display name.
observation_textstring | nullrequiredThe textual observation value, when the result is not represented numerically.
observation_valuenumber | nullrequiredThe numeric value of the observation, when applicable.
observation_value_precisionstring | nullrequiredThe precision qualifier for
observation_value.<and>denote a bound, and=denotes an exact value.Allowed values:
< | = | > | nullobservation_value_unitsstring | nullrequiredThe unit used for
observation_value.observed_atstring | null · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.reference_range_lower_boundnumber | nullrequiredThe lower bound of the expected reference range, when supplied.
reference_range_upper_boundnumber | nullrequiredThe upper bound of the expected reference range, when supplied.
statusstring | nullrequiredThe clinical workflow status of the observation.
Allowed values:
corrected | final | pending | nullupdated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
titlestring | nullrequiredThe display title of the test result.
updated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
objectanyrequiredAlways
test_result_batch.remote_file_import_batchobject | nullrequiredThe file import batch to poll, or null when every TestResult was created immediately.
completed_countintegerrequiredThe number of items that finished processing successfully.
created_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.failed_countintegerrequiredThe number of items that finished processing with an error.
idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
itemsarrayrequiredThe import items in their original request order.
itemsobjectcreated_resourcestring | null · urirequiredThe URL of the resource created for a succeeded item. Null unless
statusissucceeded.created_resource_idstring | null · uuidrequiredThe identifier of the resource created for a succeeded item. Null unless
statusissucceeded.created_resource_typestring | nullrequiredThe type of resource created for a succeeded item. Null unless
statusissucceeded.Allowed values:
null | Attachment | Letter | Note | TestResulterrorobject | nullrequiredThe failure details for this item. Null unless the item has failed.
codestring | nullrequiredThe machine-readable error code.
messagestring | nullrequiredA message that explains how the item failed.
idstring · uuidrequiredThe resource's unique identifier, formatted as an RFC 4122 version 4 UUID.
objectanyrequiredAlways
remote_file_import_batch_item.positionintegerrequiredThe zero-based position of the item in the submitted batch.
statusstringrequiredThe current download, validation, and malware-scanning status of the item.
Allowed values:
failed | pending | processing | succeeded
linksobjectrequiredURLs to related resources.
selfstring · urirequiredThe full URL of a related resource.
objectanyrequiredDiscriminator value emitted at
object.resource_typestringrequiredThe type of resource created by every item in the batch.
Allowed values:
letter | note | test_resultstatusstringrequiredThe current download, validation, and malware-scanning status of the batch.
Allowed values:
completed | pending | processingtotal_countintegerrequiredThe total number of items submitted in the batch.
updated_atstring · date-timerequiredAn ISO 8601 timestamp in UTC, with a
Zsuffix. For example,2026-07-01T09:00:00Z.
Example
{
"object": "test_result_batch",
"items":
"object": "test_result_batch_item",
"position": 0,
"remote_file_import_batch_item_id": "57bed2bf-e2e1-463b-8a96-643e3817a8b8",
"status": "failed",
"test_result":
"id": "9d4a13e1-0eea-4669-88c4-03316c092c77",
"object": "test_result",
"automatically_create_resource_permission_for_patient": true,
"created_at": "2026-01-01T09:00:00Z",
"download_url": "https://files.example.invalid/document.pdf?signature=test",
"filename": "referral-letter.pdf",
"links":
"booking": "https://api.carebit.co/v1/bookings/92a3b4c5-d6e7-4f01-8234-56789abcdef0",
"clinician": "https://api.carebit.co/v1/clinicians/2b3c4d5e-6f70-489a-9bcd-ef0123456789",
"patient": "https://api.carebit.co/v1/patients/1a2b3c4d-5e6f-4789-8abc-def012345678",
"remote_file_import_batch": "https://api.carebit.co/v1/remote_file_import_batches/ebc38802-f219-4c7b-8136-8e963a0c69e0"
},
"notify_patient_of_resource_permission": true,
"remote_file_import_batch_id": "ebc38802-f219-4c7b-8136-8e963a0c69e0",
"status": "awaiting_proofreading",
"test_result_items":
"id": "7592f451-4733-44f1-8560-1bb6075fa552",
"object": "test_result_item",
"created_at": "2026-01-01T09:00:00Z",
"is_abnormal": false,
"notes": "Please confirm the appointment by email.",
"observation_code": "718-7",
"observation_name": "Haemoglobin",
"observation_text": "Within the expected range",
"observation_value": 14.5,
"observation_value_precision": "<",
"observation_value_units": "g/dL",
"observed_at": "2026-01-01T09:00:00Z",
"reference_range_lower_bound": 12,
"reference_range_upper_bound": 16,
"status": "corrected",
"updated_at": "2026-01-01T09:00:00Z"
}
],
"title": "Dr",
"updated_at": "2026-01-01T09:00:00Z"
}
}
],
"remote_file_import_batch":
"id": "ebc38802-f219-4c7b-8136-8e963a0c69e0",
"object": "remote_file_import_batch",
"completed_count": 0,
"created_at": "2026-01-01T09:00:00Z",
"failed_count": 0,
"items":
"id": "57bed2bf-e2e1-463b-8a96-643e3817a8b8",
"object": "remote_file_import_batch_item",
"created_resource": "https://api.carebit.co/v1/letters/c3d4e5f6-0718-49ab-acde-f01234567890",
"created_resource_id": "7e09a8e3-e3c1-4dee-863b-85d56e4329da",
"created_resource_type": null,
"error": null,
"position": 0,
"status": "failed"
}
],
"links":
"self": "https://api.carebit.co/v1/remote_file_import_batches/ebc38802-f219-4c7b-8136-8e963a0c69e0"
},
"resource_type": "letter",
"status": "completed",
"total_count": 1,
"updated_at": "2026-01-01T09:00:00Z"
}
}The Idempotency-Key header is missing (idempotency_key_required) or exceeds 255 characters (idempotency_key_too_long).
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}The access token is missing, invalid, expired, or revoked.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}The access token lacks the required scope, or the project is disabled.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}Error response.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}A concurrent request holds the idempotency lease (idempotency_conflict). Retry after the delay indicated by Retry-After.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}The Idempotency-Key was previously used with a different request body (idempotency_key_reused), or the request body failed validation.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}Too many requests. Retry after the delay indicated by Retry-After.
errorobjectrequiredThe structured details that describe why the request failed.
codestringrequiredThe machine-readable error code.
errorsarray | nullAdditional errors from a failed validation.
itemsobjectcodestringThe machine-readable code for this validation error.
messagestringA message that explains this validation error.
paramstring | nullThe name of the parameter that caused this validation error, when known.
messagestringrequiredA message that explains the error and how to resolve it.
paramstring | nullThe name of the parameter that caused the error, when known.
typestringrequiredThe high-level category of the error.
Allowed values:
authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error
Example
{
"error":
"code": "resource_missing",
"errors":
"code": "resource_missing",
"message": "The requested resource was not found.",
"param": "patient_id"
}
],
"message": "The requested resource was not found.",
"param": "patient_id",
"type": "authentication_error"
}
}