Book an appointment
curl --request POST \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/appointments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"clinic_id": 123,
"appointment_date": "2023-12-25",
"clinic_schedule_slot_id": 123,
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
clinic_id: 123,
appointment_date: '2023-12-25',
clinic_schedule_slot_id: 123,
reason: '<string>'
})
};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/appointments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/appointments"
payload = {
"clinic_id": 123,
"appointment_date": "2023-12-25",
"clinic_schedule_slot_id": 123,
"reason": "<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": {}
}Patient appointments
Book an appointment
Derives the patient from the token, rechecks slot capacity under lock, and requires an Idempotency-Key header.
POST
/
patient
/
appointments
Book an appointment
curl --request POST \
--url https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/appointments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"clinic_id": 123,
"appointment_date": "2023-12-25",
"clinic_schedule_slot_id": 123,
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
clinic_id: 123,
appointment_date: '2023-12-25',
clinic_schedule_slot_id: 123,
reason: '<string>'
})
};
fetch('https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/appointments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://jaliprohmis.derrickmugabwa.dev/api/v1/patient/appointments"
payload = {
"clinic_id": 123,
"appointment_date": "2023-12-25",
"clinic_schedule_slot_id": 123,
"reason": "<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": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Maximum string length:
100Body
application/json
Response
Patient-owned resource.