Update Health Facility

Updates a health facility with the given attributes.

PATCH /directory/v1/health-facilities/{id}
note

It is important to note that health facilities are divided into many types, and that each of these types support different attributes. The different possible types for health facilities are :

Path Parameters

id

string required

Id of the desired resource.

Request Body Parameters

You can see a breakdown of the different supported attributes for each type of health facilities here

Since JSON:API supports partial updates, every attribute of a health facility can be updated individually or in small groups, without sending all the attributes of a resource on each request.

Examples

Partial Update

curl -X PATCH "https://api.clinia.ca/directory/v1/health-facilities/${ID}" \
-H "Content-Type: application/vnd.api+json"
--data-binary '{
"data": {
"type": "health-facilities",
"attributes": {
"note": "Call after 9AM for next day appointment."
}
}
}'
{
"data": {
"attributes": {
"name": "Podology Clinic - Longueuil",
"type": "clinic",
"tags": null,
"address": {
"street-number": "2248",
"route": "rue Asselin",
"postal-code": "J4M2M8",
"place": "Longueuil",
"region": "Quebec",
"region-code": "QC",
"country": "Canada",
"country-code": "CA"
},
"location": {
"lat": 45.5465,
"lng": -73.4456
},
"phones": [
{
"id": "phone-73a34ca4-17c6-4957-beda-ad6a1a2908c1",
"number": "4509992929",
"type": "MAIN"
}
],
"faxes": [
{
"id": "fax-a2df9df9-447b-4e2d-98f7-78811b40471d",
"number": "4509992900",
"type": "FAX"
}
],
"emails": [
{
"id": "email-4ccb074e-313e-40f0-aa2f-dba3fcc6e44d",
"address": "podology-clinic@gmail.com"
}
],
"online-bookings": [
{
"id": "online_booking-0d54764c-c3ab-4b35-b5e7-4b2982d51aac",
"url": "https://podology-clinic.com/registration"
}
],
"opening-hours": [
{
"day": 1,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
},
{
"day": 2,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
},
{
"day": 3,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
}
],
"supported-languages": ["ENGLISH", "FRENCH"],
"socials": [
{
"id": "social-9375aa6a-ce36-4ae6-a3fb-937389e0ce41",
"url": "https://podology-clinic.com/social"
}
],
"note": "Call after 9AM for next day appointment.",
"internal-note": null,
"created-at": "2020-10-14T17:28:58.9540769Z",
"updated-at": "2020-10-14T17:28:58.9540769Z"
},
"relationships": {
"walk-in": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/walk-in",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/walk-in"
}
},
"sectors": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/sectors",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/sectors"
}
},
"practices": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/practices",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/practices"
}
},
"services": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/services",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/services"
}
}
},
"type": "health-facilities",
"id": "a6f658f8-89bf-45ef-a88e-8024da7537d1"
}
}

Full Update

curl -X PATCH "https://api.clinia.ca/directory/v1/health-facilities/${ID}" \
-H "Content-Type: application/vnd.api+json"
--data-binary '{
"data": {
"type": "health-facilities",
"attributes": {
"name": "Podology Clinic - Longueuil",
"address": {
"street-number": "2248",
"route": "rue Asselin",
"place": "Longueuil",
"postal-code": "J4M2M8",
"region": "Quebec",
"region-code": "QC",
"country": "Canada",
"country-code": "CA"
},
"location": {
"lat": 45.5465,
"lng": -73.4456
},
"phones": [
{
"id": "phone-73a34ca4-17c6-4957-beda-ad6a1a2908c1",
"number": "4509992929",
"type": "MAIN"
}
],
"faxes": [
{
"id": "fax-a2df9df9-447b-4e2d-98f7-78811b40471d",
"number": "4509992900",
"type": "FAX"
}
],
"emails": [
{
"id": "email-4ccb074e-313e-40f0-aa2f-dba3fcc6e44d",
"address": "podology-clinic@gmail.com"
}
],
"online-bookings": [
{
"id": "online_booking-0d54764c-c3ab-4b35-b5e7-4b2982d51aac",
"url": "https://podology-clinic.com/registration"
}
],
"opening-hours": [
{
"day": 1,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
},
{
"day": 2,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
},
{
"day": 3,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
}
],
"supported-languages": [
"ENGLISH",
"FRENCH"
],
"socials": [
{
"id": "social-9375aa6a-ce36-4ae6-a3fb-937389e0ce41",
"url": "https://podology-clinic.com/social"
}
],
"note": "Call after 9AM for next day appointment."
}
}
}'
{
"data": {
"attributes": {
"name": "Podology Clinic - Longueuil",
"type": "clinic",
"tags": null,
"address": {
"street-number": "2248",
"route": "rue Asselin",
"postal-code": "J4M2M8",
"place": "Longueuil",
"region": "Quebec",
"region-code": "QC",
"country": "Canada",
"country-code": "CA"
},
"location": {
"lat": 45.5465,
"lng": -73.4456
},
"phones": [
{
"id": "phone-73a34ca4-17c6-4957-beda-ad6a1a2908c1",
"number": "4509992929",
"type": "MAIN"
}
],
"faxes": [
{
"id": "fax-a2df9df9-447b-4e2d-98f7-78811b40471d",
"number": "4509992900",
"type": "FAX"
}
],
"emails": [
{
"id": "email-4ccb074e-313e-40f0-aa2f-dba3fcc6e44d",
"address": "podology-clinic@gmail.com"
}
],
"online-bookings": [
{
"id": "online_booking-0d54764c-c3ab-4b35-b5e7-4b2982d51aac",
"url": "https://podology-clinic.com/registration"
}
],
"opening-hours": [
{
"day": 1,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
},
{
"day": 2,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
},
{
"day": 3,
"intervals": [
{
"start": "08:00:00",
"end": "17:00:00"
}
]
}
],
"supported-languages": ["ENGLISH", "FRENCH"],
"socials": [
{
"id": "social-9375aa6a-ce36-4ae6-a3fb-937389e0ce41",
"url": "https://podology-clinic.com/social"
}
],
"note": "Call after 9AM for next day appointment.",
"internal-note": null,
"created-at": "2020-10-14T17:28:58.9540769Z",
"updated-at": "2020-10-14T17:28:58.9540769Z"
},
"relationships": {
"walk-in": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/walk-in",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/walk-in"
}
},
"sectors": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/sectors",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/sectors"
}
},
"practices": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/practices",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/practices"
}
},
"services": {
"links": {
"self": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/relationships/services",
"related": "http://localhost:7200/v1/health-facilities/a6f658f8-89bf-45ef-a88e-8024da7537d1/services"
}
}
},
"type": "health-facilities",
"id": "a6f658f8-89bf-45ef-a88e-8024da7537d1"
}
}