Awell Health Developer Hub
Developer Hub

This page documents the startHostedActivitySession mutation but we recommend reading "What are Awell Hosted Pages" page first and the full guide on how to set-up the Hosted Activity integration.

Request

Mutation

  • graphql
01mutation StartHostedActivitySession($input: StartHostedActivitySessionInput!) {
02 startHostedActivitySession(input: $input) {
03 session_id
04 session_url
05 }
06}

Required variables

pathway_id specifies the care flow/pathway instance where there are activities to complete for.

stakeholder_id specifies for what stakeholder there are activities to compelete for.

  • json
01{
02 "input": {
03 "pathway_id": "{{PATHWAY_ID}}",
04 "stakeholder_id": "{{STAKEHOLDER_ID}}",
05 "success_url": "https://yourdomain.com/success.html",
06 "cancel_url": "https://yourdomain.com/cancel.html"
07 }
08}

Optional variables

The success_url and cancel_url specify where the stakeholder should be redirected to when the care flow/pathway session is completed or canceled/interrupted respectively. If success_url and cancel_url are not specified, then static success and cancel pages will be shown in the Hosted Pages application.

  • json
01{
02 "input": {
03 "pathway_id": "{{PATHWAY_ID}}",
04 "stakeholder_id": "{{STAKEHOLDER_ID}}",
05 "success_url": "https://yourdomain.com/success.html",
06 "cancel_url": "https://yourdomain.com/cancel.html",
07 "language": "en"
08 }
09}

Language

Languages should be passed as an ISO 639-1 shortcode.If no language is passed, it defaults to English.

Awell Hosted Pages is currently available in the following languages:

  • English (en)
  • Dutch (nl)
  • Estonian (et)
  • French (fr)
  • Romanian (ro)

Session expiration

A session expires after 60 minutes but the timer is reset after every completion of an activity. A session also expires when there are no pending activities left in a pathway.

How to use