Update Practitioner's Specialities

Updates a practitioner's specialities.

PATCH /directory/v1/practitioners/{id}/relationships/specialities

Path Parameters

id

string required

Id of the desired resource.

Request Body Parameters

Data

Array<Relationship>

Specialities to assign to this practitioner.

{
"data": [
{ "type": "specialities", "id": "5c9f4bcb-554b-454d-ba07-1da2a49de7d2" }
]
}
important

When adding specialities, it is strongly suggested to also add the top level service associated with the speciality to the resource. This will allow users to get results more effectively when searching for a practitioner using both services and specialities.

Example of the optimal definition of a resource :

{
"data": {
"type": "practitioners",
"id": "1d6319c1-8510-4803-bbfc-52e5c1303845",
"relationships": {
"specialities": {
"data": [
{
"type": "specialities",
"id": "5c9f4bcb-554b-454d-ba07-1da2a49de7d2" // Acupuncturist speciality.
}
]
},
"services": {
"data": [
{ "type": "services", "id": "4ed05f0a-6ef0-47c4-8a96-b8e49c5fad5d" } // Acupuncture top level service
]
},
"practices": {}
}
}
}
important

Specialities sent in an update request will overwrite any existing specialities, so make sure to send all specialities to associate on each update request.

Examples

Update Specialities

curl -X PATCH "https://api.clinia.ca/directory/v1/practitioners/${ID}/relationships/specialities" \
-H "Content-Type: application/vnd.api+json"
--data-binary '{
"data": [
{ "type": "specialities", "id": "5c9f4bcb-554b-454d-ba07-1da2a49de7d2" }
]
}'
{
"data": {
"attributes": {
"created-at": "2020-10-29T15:50:39.2346984Z",
"updated-at": "2020-10-29T15:50:39.2346984Z",
"first-name": "Jacques",
"last-name": "Plantes",
"title": "DR",
"gender": "MALE",
"registrations": null,
"accept-new-patients": true,
"note": null,
"internal-note": null,
"modalities": null,
"cases-to-refer": null,
"communications": null,
"clientele": null,
"phones": [
{
"id": "phone-8e0a648b-5912-4449-adca-136ae6423cb4",
"number": "15141111234",
"type": "WORK"
}
],
"faxes": null,
"emails": [
{
"id": "email-fac4c926-84b4-499a-b4d0-96d90a5a5c2a",
"address": "john.doe@example.com"
}
]
},
"relationships": {
"specialities": {
"data": [
{
"type": "specialities",
"id": "5c9f4bcb-554b-454d-ba07-1da2a49de7d2"
}
]
},
"services": {
"data": [
{ "type": "services", "id": "4ed05f0a-6ef0-47c4-8a96-b8e49c5fad5d" }
]
},
"practices": {}
},
"type": "practitioners",
"id": "1d6319c1-8510-4803-bbfc-52e5c1303845"
},
"included": [
{
"attributes": {
"created-at": null,
"updated-at": null,
"names": { "en": "Acupuncturist", "fr": "Acupuncteur" }
},
"relationships": {
"service": {
"data": {
"type": "services",
"id": "4ed05f0a-6ef0-47c4-8a96-b8e49c5fad5d"
}
},
"parent": {},
"children": { "data": [] }
},
"type": "specialities",
"id": "5c9f4bcb-554b-454d-ba07-1da2a49de7d2"
},
{
"attributes": {
"created-at": null,
"updated-at": null,
"names": {
"en": "Acupuncture",
"fr": "Acuponcture"
}
},
"relationships": { "parent": {}, "children": { "data": [] } },
"type": "services",
"id": "4ed05f0a-6ef0-47c4-8a96-b8e49c5fad5d"
}
]
}