Skip to main content

SSC+ API reference

API version 0.1.0 · Preview

Overview​

The SSC+ API. SSC+ is developed by JST Healthcare Solutions Oy.

Preview. This version is for building and testing integrations against the development environment. It may still change in ways that are not backwards compatible; changes are announced in the integration guide's change log. It is not for real patients.

Two kinds of credentials​

  • Tenant API key: for the Customer API (/v1/sessions), called from your own servers. Sent as Authorization: Bearer ssc_…. Issued by SSC, shown once. Never put it in a browser, an app or a phone flow.
  • Session token: for the Session API (/v1/session), used by SSC's own patient clients, such as the Form in your page. Issued per session when the session is created, short-lived, and scoped to that one session.

The Session API answers browsers on any web page (CORS), so the Form can run in yours; give origin when creating the session to bind its token to your page. The Customer API does not answer browsers at all.

Errors​

Every error is an RFC 9457 problem detail (application/problem+json). Branch on its code, which is stable; title and detail are for people. Quote the request_id when you ask about one. Authentication failures all look the same, by design.

Retries​

Creating a session requires an Idempotency-Key header. Retrying with the same key and the same body returns the original session instead of creating a second one, for 24 hours.

Base URL​

  • https://api.dev.ssc-plus.com: Development (preview)

Authentication​

  • Tenant API key (tenantKey): Authorization: Bearer …. Your key, ssc_…, from your servers only.

Operations​

Create a triage session​

POST /v1/sessions

Credential: Tenant API key.

Create a session for a Form or Talk triage, and get the token its patient client uses.

Call it from your server, then hand session_token.token to the patient's browser. The tenant API key stays on your server.

Idempotency-Key is required. A retry with the same key and body returns the session the first request created, with 200 rather than 201, for 24 hours. Reusing a key with a different body is refused with 409.

Give pre_information when you already know something about the patient, such as from a pre-questionnaire. The patient is then asked only for what is missing.

Line sessions are not created here: a call creates its own session when your Audio Connector connects.

ParameterInDescription
Idempotency-KeyheaderRequired. A unique value per session you intend to create, such as a UUID.

Request body: CreateSession.

StatusMeaningBody
201The session was created.CreatedSession
200A retry: the session an earlier request with the same Idempotency-Key created.CreatedSession
400No Idempotency-Key header (code: idempotency_key_required)ProblemDetail
401Missing, unknown or revoked tenant API key (code: unauthorized)ProblemDetail
409The Idempotency-Key was used with a different body (code: idempotency_conflict)ProblemDetail
422The request did not match what this operation accepts, or a symptom term is not in the vocabulary (code: invalid_request or unknown_symptom_term)ProblemDetail

Retrieve a session and its result​

GET /v1/sessions/{session_id}

Credential: Tenant API key.

Read a session: where it is, and its result once it has completed.

For Line, use the ssc_session_id the call returned to your call flow. result is present when status is completed. A session is readable for 30 days after it ends.

Only your own tenant's sessions can be read. Any other id is 404.

ParameterInDescription
session_idpathThe session's id. For Line, the call's ssc_session_id.
StatusMeaningBody
200The session.SessionView
401Missing, unknown or revoked tenant API key (code: unauthorized)ProblemDetail
404No session with this id belongs to your tenant (code: session_not_found)ProblemDetail
422The request did not match what this operation accepts (code: invalid_request)ProblemDetail

Check the API is up​

GET /v1/health

Credential: none.

Answers ok while the API is serving. Needs no credentials.

StatusMeaningBody
200The API is up.Health

Schemas​

CancellationReason​

Why a session ended without a result.

  • abandoned: the patient left before finishing.
  • expired: nothing happened for too long.
  • failed: SSC could not continue.

Values: abandoned, expired, failed.

CareCode​

A classification code, with the system that defines it.

FieldTypeRequiredDescription
systemstringyesThe code system. Example: "ICPC", "SNOMED".
codestringyesExample: "A98".
namestring or nullnoExample: "Terveyden ylläpito".

Channel​

How the patient is triaged: web_form, voice_web, voice_tel or web_chat.

Fixed for the session.

Values: web_form, voice_web, voice_tel, web_chat.

CreateSession​

A request to create a session.

FieldTypeRequiredDescription
channelChannelyesHow the patient is triaged: web_form (the Form, in a browser), voice_web (Talk, spoken in a browser), web_chat (Chat, written in a browser; in development) or voice_tel (Line, a phone call). Line sessions are created by the call itself, not with this operation. Example: "web_form".
customer_referencestring or nullnoYour own identifier for this session, returned with it. Do not put personal data here. At most 200 characters. Example: "visit-2026-0931".
patient_phonestring or nullnoThe patient's phone number, when you want the session linked to it. At most 32 characters. Example: "+358401234567".
originstring or nullnoThe web page origin the patient's browser will use. When given, the session token works only from that origin. At most 200 characters. Example: "https://www.example-clinic.fi".
pre_informationPreInformationIn or nullnoWhat you already know about the patient, if anything.

CreatedSession​

A newly created session, with the token for the patient's client.

FieldTypeRequiredDescription
idstring (uuid)yesThe session's identifier. For Line, this is ssc_session_id.
channelChannelyesHow the patient is triaged: web_form (the Form, in a browser), voice_web (Talk, spoken in a browser), web_chat (Chat, written in a browser; in development) or voice_tel (Line, a phone call). Line sessions are created by the call itself, not with this operation.
statusSessionStatusyes
cancellation_reasonCancellationReason or nullnoSet when status is cancelled.
customer_referencestring or nullnoYour identifier for the session. For Line, the Genesys conversation ID of the call.
created_atstring (date-time)yes
updated_atstring (date-time)yes
resultResult or nullnoPresent once status is completed.
session_tokenSessionTokenyes

FieldError​

One problem with one part of a request.

FieldTypeRequiredDescription
locationstringyesWhere in the request: body, path, query or header, then the field, for example body.channel. Example: "body.channel".
messagestringyesWhat is wrong with it.

Health​

Whether the API is up.

FieldTypeRequiredDescription
statusstringnoPresent and serving.

PatientSex​

The patient's sex as the assessment uses it. other and unknown are distinct.

Values: female, male, other, unknown.

PreInformationIn​

What you already know about the patient, from a pre-questionnaire or a patient system.

Every field is optional; give what you have. The patient is asked only for what is missing. Give what is wrong either as symptom_terms, exact terms from SSC's symptom vocabulary, or as complaint, the patient's own words, which SSC maps to terms and confirms with the patient.

FieldTypeRequiredDescription
ageinteger or nullnoExample: 45.
age_unitstringnoyears, or months or days for infants.
sexPatientSex or nullno
languagestring or nullnofi in the preview. At most 8 characters.
symptom_termslist of stringnoExact terms from the symptom vocabulary. An unknown term is refused with 422, code unknown_symptom_term. Example: ["kuume", "nuha"].
complaintstring or nullnoWhat is wrong, in the patient's own words. Personal identifiers are removed before it is stored. At most 2000 characters. Example: "Kuumetta ja nuhaa eilisestä asti.".

ProblemDetail​

An error, as described by RFC 9457 (application/problem+json).

Branch on code, which is stable; title and detail are for people and their wording may change.

FieldTypeRequiredDescription
typestringnoURI identifying the problem type. Example: "/problems/not-found".
titlestringyesShort, human-readable summary of the problem type.
statusintegeryesHTTP status code.
detailstring or nullnoExplanation specific to this occurrence.
instancestring or nullnoURI identifying this specific occurrence.
codestring or nullnoStable machine-readable code. Safe to branch on; unlike title, its wording does not change.
request_idstring or nullnoIdentifies this request in SSC's logs. Quote it when asking about an error.
errorslist of FieldError or nullnoFor invalid_request: each part of the request that was wrong.

Recommendation​

One care recommendation, with the findings it rests on and the plan it leads to.

FieldTypeRequiredDescription
urgencystringyesHow soon, and where, the patient should be seen, in the engine's words. Example: "Vastaanotto 1-3 vrk".
reasonstring or nullnoThe findings this recommendation rests on.
planstring or nullnoWhat is advised as a result.

Result​

The outcome of a completed triage, written for the professional who sees the patient.

Everything the engine concluded that is safe to share: recommendations, classification, the summary of what the patient reported, codes, and alarming findings. How the engine scored it is not included.

FieldTypeRequiredDescription
recommendationslist of RecommendationnoMost significant first.
triage_codeinteger or nullnoThe engine's numeric triage classification.
guidancestring or nullnoGuidance for the patient, including any emergency instruction. Present whenever the engine gave some; show it.
remotely_treatablebooleannoWhether the engine considers remote care suitable.
professional_groupslist of stringnoWho should see the patient. Example: ["Yleislääkäri"].
summarystring or nullnoWhat the patient reported, as a summary for the professional.
self_careSelfCare or nullnoSelf-care advice, when the engine gave some.
codeslist of CareCodeno
severe_symptomslist of stringnoAlarming findings, as phrases.

SelfCare​

Self-care advice for the patient, point by point, with its sources.

FieldTypeRequiredDescription
titlestring or nullnoExample: "Itsehoito-ohjeita".
introductionstring or nullno
instructionslist of stringnoThe advice, one point per item.
sourceslist of Sourceno

SessionStatus​

Where a session is.

  • in_progress: created, and the patient has not finished.
  • completed: finished with a result.
  • cancelled: ended without a result; cancellation_reason says why.

Values: in_progress, completed, cancelled.

SessionToken​

The token the patient's client uses to join the session.

FieldTypeRequiredDescription
tokenstringyesHand this to the patient's client. It is not a tenant credential.
expires_atstring (date-time)yesWhen the token stops working.

SessionView​

A session and, once it has one, its result.

FieldTypeRequiredDescription
idstring (uuid)yesThe session's identifier. For Line, this is ssc_session_id.
channelChannelyesHow the patient is triaged: web_form (the Form, in a browser), voice_web (Talk, spoken in a browser), web_chat (Chat, written in a browser; in development) or voice_tel (Line, a phone call). Line sessions are created by the call itself, not with this operation.
statusSessionStatusyes
cancellation_reasonCancellationReason or nullnoSet when status is cancelled.
customer_referencestring or nullnoYour identifier for the session. For Line, the Genesys conversation ID of the call.
created_atstring (date-time)yes
updated_atstring (date-time)yes
resultResult or nullnoPresent once status is completed.

Source​

Where a piece of advice comes from.

FieldTypeRequiredDescription
titlestringyes
urlstring or nullno

SSC+ is developed by JST Healthcare Solutions Oy. API version 0.1.0.