Share this page:

System to System Account Requisition Process

Step 1: Request system to system access via form.

Step 2: Infoway will assess your request and either approve or request more information.

Step 3: Once approved, Infoway will notify you via email and provide instructions on how to retrieve your credentials (Client ID and Client Secret).

Step 4: Use your credentials to request a token using the Authentication Token URL.

Step 5: Use the token you received in step 4 to access the FHIR API.

Step 5a: Tokens expire every 30 mins, so repeat step 4 and 5 as often as you need.

API Endpoints

Get an Authorization Token

Your system user will be assigned a client ID and secret which can be used to request a token. This token is used in subsequent calls to the APIs for information.

Get Auth Token

curl --location --request POST 'https://terminologystandardsservice.ca/authorisation/auth/realms/terminology/protocol/openid-connect/token' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id={{client_id}}' \
--data-urlencode 'client_secret={{client_secret}}'

Response

The access token below is used in subsequent calls as an Authorization HTTP Header.

{
     "access_token": "..."
     "expires_in": 1800,
     "refresh_expires_in": 0,
     "token_type": "Bearer",
     "not-before-policy": 0,
     "scope": ""

}

FHIR API Request

After getting the authorization token from the response above, you can make subsequent calls to the FHIR API. Below is just a simple example to show how to include the authorization token as a HTTP Header. Please review the Postman Collection listed below for more examples.

List Valuesets

curl --location --request GET '
https://terminologystandardsservice.ca/fhir/ValueSet/' \
--header 'Authorization: Bearer YYY'

Postman Collection

Postman is an online tool that helps to test and communicate with RESTful APIs. In order to make integration with the FHIR REST APIs easier, we have published a postman collection that can be used to authenticate, query, fetch and search the data on the Terminology Server. You must have appropriate access to be able to use some of the functions such as modifying data. Review the postman collection and use it as a template to get your own script of software application integrated with our APIs. You may be required to Fork the collection and save it under your own workspace in order to make any changes and send requests to the Terminology Server. We also have a GitHub repository with the Postman collection stored as a file which you can import into your own workspace. See details below.

Postman collection is here

Fork a Collection

In order to use the collection, we have published, you must fork or copy the collection and bring it into your own workspace. You will require a Postman account which you can create for free, or have one for your company or organization. Once you have forked the collection, you can modify the requests and send requests to the Terminology Server. You will be able to view the responses on the bottom panel of the main screen.

  • Login to Postman.
  • Go to the postman collection here.
  • Click on the Terminology Standards Service Collection and on the right side, click on Fork.
  • Provide a fork label and a workspace name.
  • Select the "Watch original collection" checkbox.
  • Click Fork Collection.

image fork

image2 fork

GitHub Repository

You can also access the Postman collection from our GitHub repository. You can import the collection into your own Postman workspace and make any changes or modifications as you see fit. You can also send messages into the Terminology Server without needing to Fork the Collection.

[GitHub Repository] https://github.com/terminologystandardsservice/public

Get Authorization Token in Postman

Before you can make any queries to the FHIR API, you must get an authorization token. You can either use your personal username and/or password for Terminology Server or a System to System account.

Personal Account

  • Login to Postman.
  • Navigate to the forked collection.
  • Click on Terminology Standards Service Collection.
  • Click on Authorization tab.
  • If you are using Postman for Desktop, please add the following URL as the Callback URL.  https://oauth.pstmn.io/v1/browser-callback
  • Click on Get new Access Token at the very bottom of the page.
  • It will take you to the login page. 
  • Enter your username and password to login. 
  • You will get a popup saying you "Authentication Complete".
  • Click Proceed. 
  • Click on Use Token
  • Now you can navigate to any of the examples and press the Send button to get a response from the Terminology Server.

personal account

image2 personal account

System to System Account

  • Process for using a System to System account is very similar to that of the personal account.
  • Login to Postman.
  • Navigate to the Forked Terminology Standards Service Collection.
  • Click on the Authorization tab.
  • Select Client Credentials under Grant Type.
  • Enter the Client ID and Client Secret in the appropriate fields.
  • Click on Get new Access Token.

image system account

Resources:

InfoCentral logo

Improving the quality of patient care through the effective sharing of clinical information among health care organizations, clinicians and their patients.