API Usage Guidelines

The following APIs are covered under this guidance:

  1. FHIR Datashare API
  2. Session API
  3. Client postMessage API

When consuming the SFM API‘s, the following best practices must be followed:

  • Limit API Calls: Avoid making excessive or unnecessary calls. Keep the number of requests to a reasonable level to ensure optimal performance.
  • Use Parameters Conservatively: When using date-range filters (e.g., from/to parameters), avoid requesting data for unnecessarily long periods, for example for the sfm-LibList endpoint.
  • Authenticated Calls Only: Always ensure calls are authenticated with a valid HelseId token. Do not attempt calls without a token or with an expired one.
  • Error Handling: Implement proper error handling with limited retries and add appropriate wait times between retries to prevent overwhelming the system.