Read Sector

Returns the sector associated with the id provided by the request.

GET /directory/v1/sectors/{id}

Path Parameters

id

string required

Id of the desired resource.

Query Parameters

includes

string

Relationships to include with the requested resource.

For a sector, the supported relationships are :

  • services
includes=services

Examples

Read Sector

curl -X GET "https://api.clinia.ca/directory/v1/sectors/${ID}?includes=services" \
-H "Content-Type: application/vnd.api+json"
{
"data": {
"attributes": {
"created-at": "2020-10-16T20:35:08.9817111Z",
"updated-at": "2020-10-16T20:35:08.9817111Z",
"phones": [
{
"id": "phone-0fda3730-b761-4c93-bfda-3615ec43a08e",
"number": "15146262626",
"extension": "089",
"type": "MAIN"
}
],
"faxes": [
{
"id": "fax-3d65bd08-9f4f-4131-9091-47f841dd9768",
"number": "14324234277",
"type": "FAX"
}
],
"opening-hours": [
{
"day": 1,
"intervals": [{ "start": "00:00:00", "end": "00:00:00" }]
},
{
"day": 2,
"intervals": [{ "start": "08:00:00", "end": "17:00:00" }]
}
],
"note": "Accessible from the West side of the building.",
"internal-note": null
},
"relationships": {
"health-facility": {
"links": {
"self": "http://directory-jsonapi/v1/sectors/06da620a-3cc0-42c3-9a4b-bb1c6c764496/relationships/health-facility",
"related": "http://directory-jsonapi/v1/sectors/06da620a-3cc0-42c3-9a4b-bb1c6c764496/health-facility"
}
},
"services": {
"links": {
"self": "http://directory-jsonapi/v1/sectors/06da620a-3cc0-42c3-9a4b-bb1c6c764496/relationships/services",
"related": "http://directory-jsonapi/v1/sectors/06da620a-3cc0-42c3-9a4b-bb1c6c764496/services"
},
"data": [
{ "type": "services", "id": "9a2d0238-c5c3-411a-811b-848ded565276" }
]
}
},
"type": "sectors",
"id": "06da620a-3cc0-42c3-9a4b-bb1c6c764496"
},
"included": [
{
"attributes": {
"created-at": null,
"updated-at": null,
"names": { "en": "Cardiology", "fr": "Cardiologie" }
},
"relationships": {
"parent": {
"links": {
"self": "http://directory-jsonapi/v1/services/9a2d0238-c5c3-411a-811b-848ded565276/relationships/parent",
"related": "http://directory-jsonapi/v1/services/9a2d0238-c5c3-411a-811b-848ded565276/parent"
}
},
"children": {
"links": {
"self": "http://directory-jsonapi/v1/services/9a2d0238-c5c3-411a-811b-848ded565276/relationships/children",
"related": "http://directory-jsonapi/v1/services/9a2d0238-c5c3-411a-811b-848ded565276/children"
}
}
},
"type": "services",
"id": "9a2d0238-c5c3-411a-811b-848ded565276"
}
]
}