---
title: "Facade"
canonical: "https://wiki.patientsknowbest.com/space/api/3364618357/Facade"
format: markdown
---
> Macro (pagetree)



> Macro (toc)

## Overview

> ℹ️ Support for Facade APIs is in the process of being deprecated and replaced by FHIR R4 API capabilities.  This is an ongoing process, therefore careful consideration and a discussion with the PKB integration team should be undertaken prior to developing with any of these APIs.

PKB maintains a Facade FHIR endpoint which provides **read-only** access to:

- FHIR representations of non-FHIR data in PKB medical records (for data types not yet supported by the Aggregated FHIR endpoint). For example, data received via our [HL7 API](#) can be queried using this endpoint.
- The aggregation of both FHIR and non-FHIR data (for data types supported by the Aggregated FHIR endpoint).

Only a subset of resource types and elements are supported. Complex access control applies since this contains data from multiple sources.

**What you can do with this endpoint**

- Read data from other sources, even if it was provided in non-FHIR format
  - Note: this excludes data provided to a Customer FHIR endpoint

**What you cannot do with this endpoint**

- Write data
- Read resource types or elements that are not yet supported. Please see the Capabilities section for details of what is currently supported.
- Read resources that you do not have authorisation to see. For example, a resource from a different organisation tagged with a privacy label that has not been granted to the caller.
- Read data sent natively via FHIR, this includes a patient's GP data record.

## Capabilities

Full details of the supported capabilities are defined in this CapabilityStatement:

[http://fhir.patientsknowbest.com/capabilitystatement/facade](http://fhir.patientsknowbest.com/capabilitystatement/facade)

## Endpoint

The Facade FHIR endpoint is available at a base of /fhir relative to the server host.

For example, PKB's sandbox environment has a server host address of: [https://sandbox.patientsknowbest.com](https://sandbox.patientsknowbest.com)

The corresponding Facade FHIR endpoint is therefore available at: [https://sandbox.patientsknowbest.com/fhir](https://sandbox.patientsknowbest.com/fhir)

## Authentication

Access to the Facade FHIR endpoint is protected by OAuth 2.0.

Callers must provide a valid Bearer token in the Authorization HTTP header, which can be obtained from PKB by using the correct workflow for your deployment.

System Clients are also required to provide the [X Org Public Id](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3365078610/OAuth+2.0#X-Org-Public-Id) HTTP header.

Please see our [OAuth 2.0 documentation](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3365078610) for more information.

## Validation and Business Rules

Pending

## Examples

Please see the [Operation Examples](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3364061249) and [REST Examples](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3364028514) pages for guidance on how to interact with this endpoint.