x-api-key: ********************
{
"roles": [{
"code": "doctor",
"name": "doctor"
}],
"active": true,
"period": {
"start": "2024-12-20",
"end": "2025-04-26"
},
"specialties": [
{
"code": "39457900",
"name": "Cardiology"
}
],
"available_times": [
{
"days_of_week": [
"mon"
],
"all_day": false,
"start_time": "17:00:00",
"end_time": "18:00:00"
},
{
"days_of_week": [
"mon",
"fri"
],
"all_day": true,
"start_time": "15:00:00",
"end_time": "18:00:00"
},
{
"days_of_week": [
"thu",
"fri",
"sun"
],
"all_day": true,
"start_time": "20:00:00",
"end_time": "18:00:00"
}
],
"not_available_times": [
{
"description": "Away on a holiday.",
"start_date": "2025-08-17",
"end_date": "2025-08-26"
}
]
}
curl --location --request PUT 'https://staging.onyeone.com/api/emr/practitionerrole/' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"roles": [{
"code": "doctor",
"name": "doctor"
}],
"active": true,
"period": {
"start": "2024-12-20",
"end": "2025-04-26"
},
"specialties": [
{
"code": "39457900",
"name": "Cardiology"
}
],
"available_times": [
{
"days_of_week": [
"mon"
],
"all_day": false,
"start_time": "17:00:00",
"end_time": "18:00:00"
},
{
"days_of_week": [
"mon",
"fri"
],
"all_day": true,
"start_time": "15:00:00",
"end_time": "18:00:00"
},
{
"days_of_week": [
"thu",
"fri",
"sun"
],
"all_day": true,
"start_time": "20:00:00",
"end_time": "18:00:00"
}
],
"not_available_times": [
{
"description": "Away on a holiday.",
"start_date": "2025-08-17",
"end_date": "2025-08-26"
}
]
}'
{
"message": "PractitionerRole resource updated successfully.",
"resource_id": "ca451d9f-75a9-561b-b839-50dfd6343b2e",
"updated_fields": {
"active": false,
"notAvailable": [
{
"description": "Change",
"during": {
"start": "2025-06-17",
"end": "2025-08-26"
}
}
]
}
}