Skip to content
APIsIntegration GuidesContextual calls

Contextual calls

Introduction

Posos’s partner-connect application in authentication-proxy mode enables you to make contextual calls from an external service to access Posos functionality directly, without the need to create a user account or authenticate.

How does it work?

Integration is based on a succession of HTTP calls made from a web browser.

Initial call

The session begins with a call from the workstation to the partner-connect API, with a set of contextual parameters determining the request being made (which functionality, which parameters), identifying the user (via their RPPS) and the structure making the request (via an authentication token)

Security

the API responds with a unique, secure URL to which the browser is redirected

Redirection

The browser follows a series of automatic redirections and then arrives on Posos interface

Context call URL

The basic url is https://api.{env}.posos.co where {env} is the following environment: preprod for validation, production for live.

https://partner-connect.preprod.posos.co

Good to know: The service account private key is different for each environment. We’ll send you the production key once testing is complete.

Getting an identity token

See Identity token authentication

Detailed operation

This API can be used to make calls to the various Posos guides. See Partner-connect API documentation to understand the parameters to be sent.

The available guides are :

Example of a session to the adverse reaction guide

To open the adverse reaction guide, call the partner-connect API with the following parameters:

Request

POST
/api/partners/proxy/prepare
curl --request POST \
 --url https://partner-connect.preprod.posos.co/api/partners/proxy/prepare \
 --header 'Authorization: Bearer <token>' \
 --header 'Content-Type: application/json' \
 --data '{
    "rpps": "abcde1234",
    "first_name": "John",
    "last_name": "Doe",
    "guide": "side_effects",
    "ucds": ["3400894203018", "3400892335049"]
}'
 

Session continuation

The workstation browser must be redirected to the URL obtained in the previous step. The loaded page will trigger a series of operations which will follow one another without intervention:

  • possible POSOS disconnection of a profile already connected
  • connection of the current profile
  • redirection to POSOS, on the right page, with the right guide and parameters.

Once these operations have been completed, the user is logged in with his/her personal account (RPPS + establishment) and can use POSOS.