Patient Records API (v1.0.
0)
Download OpenAPI specification: Download
API Support: support@example.com | URL: http://example.com/support | License: Apache 2.0
API for managing patient medical records, appointments, and history.
Patients
Operations related to patient records.
List all patients
AUTHORIZATIONS: bearerAuth or apiKey
QUERY PARAMETERS
limit integer <int32> [ 1 .. 100 ]
Default: 20
Maximum number of patients to return
offset integer <int32> >= 0
Default: 0
Number of patients to skip for pagination
Responses
200 A list of patients.
400 Invalid input parameters
GET /patients
Response samples
200 400
Content type
application/json
Copy Expand all Collapse all
[
- {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1985-07-21",
"gender": "male",
+ "contactInfo": { … },
+ "address": { … },
+ "medicalHistory": [ … ],
+ "emergencyContact": { … },
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
Create a new patient record
AUTHORIZATIONS: bearerAuth or apiKey
REQUEST BODY SCHEMA: application/json
Patient object to be added
firstName
string
required
lastName
string
required
dateOfBirth string <date>
required
gender string
required
Enum: "male" "female" "other" "prefer_not_to_say"
contactInfo
object (ContactInfo)
required
address object (Address)
emergencyContact object (EmergencyContact)
Responses
201 Patient record created successfully
400 Invalid input, object invalid
409 Patient already exists
POST /patients
Request samples
Payload
Content type
application/json
Copy Expand all Collapse all
{
"firstName": "Jane",
"lastName": "Doe",
"dateOfBirth": "1990-01-15",
"gender": "male",
- "contactInfo": {
"email": "john.doe@example.com",
"phonePrimary": "+1-555-123-4567",
"phoneSecondary": "+1-555-765-4321"
},
- "address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "90210",
"country": "USA"
},
- "emergencyContact": {
"name": "Jane Smith",
"relationship": "Spouse",
"phone": "+1-555-111-2222"
}
}
Response samples
201 400 409
Content type
application/json
Copy Expand all Collapse all
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1985-07-21",
"gender": "male",
- "contactInfo": {
"email": "john.doe@example.com",
"phonePrimary": "+1-555-123-4567",
"phoneSecondary": "+1-555-765-4321"
},
- "address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "90210",
"country": "USA"
},
- "medicalHistory": [
+ { … }
],
- "emergencyContact": {
"name": "Jane Smith",
"relationship": "Spouse",
"phone": "+1-555-111-2222"
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Get patient record by ID
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
patientId string <uuid>
required
ID of the patient to retrieve
Responses
200 Successfully retrieved patient record
404 Patient not found
GET /patients/{patientId}
Response samples
200 404
Content type
application/json
Copy Expand all Collapse all
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1985-07-21",
"gender": "male",
- "contactInfo": {
"email": "john.doe@example.com",
"phonePrimary": "+1-555-123-4567",
"phoneSecondary": "+1-555-765-4321"
},
- "address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "90210",
"country": "USA"
},
- "medicalHistory": [
+ { … }
],
- "emergencyContact": {
"name": "Jane Smith",
"relationship": "Spouse",
"phone": "+1-555-111-2222"
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Update an existing patient record
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
patientId string <uuid>
required
ID of the patient to update
REQUEST BODY SCHEMA: application/json
Patient object with updated information
firstName string
lastName string
dateOfBirth string <date>
gender string
Enum: "male" "female" "other" "prefer_not_to_say"
contactInfo object (ContactInfo)
address object (Address)
emergencyContact object (EmergencyContact)
Responses
200 Patient record updated successfully
400 Invalid input, object invalid
404 Patient not found
PUT /patients/{patientId}
Request samples
Payload
Content type
application/json
Copy Expand all Collapse all
{
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1985-07-21",
"gender": "male",
- "contactInfo": {
"email": "john.doe@example.com",
"phonePrimary": "+1-555-123-4567",
"phoneSecondary": "+1-555-765-4321"
},
- "address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "90210",
"country": "USA"
},
- "emergencyContact": {
"name": "Jane Smith",
"relationship": "Spouse",
"phone": "+1-555-111-2222"
}
}
Response samples
200 400 404
Content type
application/json
Copy Expand all Collapse all
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1985-07-21",
"gender": "male",
- "contactInfo": {
"email": "john.doe@example.com",
"phonePrimary": "+1-555-123-4567",
"phoneSecondary": "+1-555-765-4321"
},
- "address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"postalCode": "90210",
"country": "USA"
},
- "medicalHistory": [
+ { … }
],
- "emergencyContact": {
"name": "Jane Smith",
"relationship": "Spouse",
"phone": "+1-555-111-2222"
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Delete a patient record
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
patientId string <uuid>
required
ID of the patient to delete
Responses
— 204 Patient record deleted successfully
404 Patient not found
DELETE /patients/{patientId}
Response samples
404
Content type
application/json
Copy
{
"code": 0,
"message": "string",
"details": "string"
}
Appointments
Operations related to patient appointments.
List appointments for a specific patient
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
patientId string <uuid>
required
ID of the patient
Responses
200 A list of appointments.
404 Patient not found
GET /patients/{patientId}/appointments
Response samples
200 404
Content type
application/json
Copy Expand all Collapse all
[
- {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
"doctorId": "doc-uuid-12345",
"appointmentTime": "2019-08-24T14:15:22Z",
"durationMinutes": 30,
"reason": "Annual Checkup",
"status": "scheduled",
"notes": "Patient requires follow-up.",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
Schedule a new appointment for a patient
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
patientId string <uuid>
required
ID of the patient
REQUEST BODY SCHEMA: application/json
Appointment details
doctorId
string <uuid>
required
appointmentTime
string <date-time>
required
durationMinutes integer <int32>
reason string
notes string
Responses
201 Appointment scheduled successfully
— 400 Invalid input for appointment
— 404 Patient not found
POST /patients/{patientId}/appointments
Request samples
Payload
Content type
application/json
Copy
{
"doctorId": "doc-uuid-12345",
"appointmentTime": "2019-08-24T14:15:22Z",
"durationMinutes": 30,
"reason": "Consultation",
"notes": "string"
}
Response samples
201
Content type
application/json
Copy
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
"doctorId": "doc-uuid-12345",
"appointmentTime": "2019-08-24T14:15:22Z",
"durationMinutes": 30,
"reason": "Annual Checkup",
"status": "scheduled",
"notes": "Patient requires follow-up.",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Get appointment details by ID
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
appointmentId string <uuid>
required
ID of the appointment
Responses
200 Appointment details
— 404 Appointment not found
GET /appointments/{appointmentId}
Response samples
200
Content type
application/json
Copy
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
"doctorId": "doc-uuid-12345",
"appointmentTime": "2019-08-24T14:15:22Z",
"durationMinutes": 30,
"reason": "Annual Checkup",
"status": "scheduled",
"notes": "Patient requires follow-up.",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Update an existing appointment
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
appointmentId string <uuid>
required
ID of the appointment to update
REQUEST BODY SCHEMA: application/json
Updated appointment details
appointmentTime string <date-time>
durationMinutes integer <int32>
reason string
status string
Enum: "scheduled" "confirmed" "cancelled" "completed" "no_show"
notes string
Responses
200 Appointment updated successfully
— 400 Invalid input for appointment update
— 404 Appointment not found
PUT /appointments/{appointmentId}
Request samples
Payload
Content type
application/json
Copy
{
"appointmentTime": "2019-08-24T14:15:22Z",
"durationMinutes": 0,
"reason": "string",
"status": "scheduled",
"notes": "string"
}
Response samples
200
Content type
application/json
Copy
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",
"doctorId": "doc-uuid-12345",
"appointmentTime": "2019-08-24T14:15:22Z",
"durationMinutes": 30,
"reason": "Annual Checkup",
"status": "scheduled",
"notes": "Patient requires follow-up.",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
Cancel an appointment
AUTHORIZATIONS: bearerAuth or apiKey
PATH PARAMETERS
appointmentId string <uuid>
required
ID of the appointment to cancel
Responses
— 204 Appointment cancelled successfully
— 404 Appointment not found
DELETE /appointments/{appointmentId}