Getting started with COS sandbox

On this page you'll find everything you need to get started with the COS sandbox. Welcome!

Authentication methods in COS

The authentication method that COS supports is OAuth 2.0, with one of the following grant types:

  • Authorization code

  • Client credentials

To connect, you also need:

  • API key

  • Credentials: Client-id and Client secret

How to obtain API keys and credentials

To obtain the API key and credentials that you need to access the COS sandbox environment, you need to do the following:

  1. Sign up at the COS portal

  2. Subscribe to the product you want to use, in your profile page.

When we have activated you subscription:

  • You will receive an email with your credentials (Client-id and Client secret).

  • Sign in at the COS portal. You will find your API key in your user profile.

  • You can now test your application in the COS sandbox.

Sign up and subscribe to get API keys

URL structure for FHIR APIs

The FHIR APIs in COS use the following URL structure:

https://api.openservices.cambio.se/fhir/<resource>/<parameters>

Where:

  • https://api.openservices.cambio.se/fhir is the COS domain

  • resource is the FHIR resource, for example Questionnaire/_search

  • parameters are the query params, for example
    code = 1.2.752.116.2.1.1|371526002,1.2.752.116.2.1.1|448826009

 

URL structure for REST APIs

The REST APIs in COS use the following URL structure:

https://api.openservices.cambio.se/patient/<api>/?api-version?<version> [&startActionDateTime][&endActionDateTime]

Where:

  • https://api.openservices.cambio.se is the COS domain

  • patient

  • api is the invoked API, for example medications or diagnosis

  • version is the API version, on the for v1, v2 etc.

  • startActionDateTime is the start of the time interval, using date format: 1970-01-01T01:00:00Z

  • endActionDateTime is the end of the time interval, using date format: 1970-01-01T01:00:00Z

Need help to get started?

If you need more help to get started, you can follow this guide to getting started with COS sandbox using Postman.

You can get more help and answers to frequently asked questions on the Help page.