Saltar al contenido principal

Standard

Once the iframe finishes processing an upload and emits the analysis_completed callback with the report identifier, your backend retrieves the diagnostic report on demand from the API. See the API Endpoint page for the request format.

The raw format is the default JSON payload returned by GET /s2s-api/v3/anonymous-diagnostic-reports/{encryptedId}. It is a flat, integrator-friendly shape designed to be consumed directly without FHIR tooling.

Strings tagged (translated) in the schema follow the locale query parameter on the request (?locale=es, ?locale=fr, ?locale=de). The default is English.

Envelope fields

Every response is wrapped in the standard ApiResponseData envelope:

{
"success": true,
"message": "Diagnostic report <id>",
"errorCode": null,
"data": { ... }
}
  • success: boolean. Indicates whether the request was successfully processed.
  • message: short text describing the action performed. Usually includes the diagnostic report identifier.
  • errorCode: null on success; an error code string when something fails.
  • data: the diagnostic report payload described across the subpages of this section.

Full example

A complete response for an acne case on the face. The same shape is broken down field-by-field across the subpages of this section.

{
"success": true,
"message": "Diagnostic report <0189bafa-0610-7349-a0ab-eb53695b27fd>",
"errorCode": null,
"data": {
"id": "0189bafa-0610-7349-a0ab-eb53695b27fd",
"url": "https://iframe.legit.health?companyId=XXXX&diagnosticReportId=signedId",
"pdf": "https://utils.legit.health/pdf/anonymous-diagnostic-report?diagnosticReportIdEncrypted=<encryptedId>&apiKey=<apiKey>&authKey=<authKey>&locale=en",
"visitIdentifier": "visit identifier",
"extraData": {
"internalCaseId": "ABC-123",
"department": "dermatology"
},
"pathology": {
"name": "Acne",
"code": "Acne",
"icd11": "ED80"
},
"bodySite": {
"code": "headFront",
"name": "Face and neck"
},
"createdAt": "2023-08-03T12:38:10+02:00",
"anamnesisGeneral": [
{
"question": "What is the reason for the consultation? How did the problem start? Describe the origin.",
"answer": "I have acne on my face and neck. It started 2 months ago."
},
{
"question": "Do you have any allergies, especially to medications? If yes, list allergies.",
"answer": "No"
},
{
"question": "Are you taking any medication or treatment? If yes, explain what treatment you are taking.",
"answer": "No"
},
{
"question": "Do you have any major illness? Have you had anything operated on?",
"answer": "No"
},
{
"question": "Is there a history of any major illness in your family?",
"answer": "No"
}
],
"macroscopicMedia": {
"url": "https://bucket/diagnostic-report-medias/bbb.png",
"type": "Image",
"annotations": []
},
"result": {
"id": "0189bafa-0610-7349-a0ab-eb536a2185f6",
"metrics": {
"sensitivity": 83.31,
"specificity": 99.53,
"entropy": null
},
"preliminaryFindings": {
"hasCondition": 100,
"malignancy": 0.02,
"adjustedMalignancy": null,
"pigmentedLesion": 0,
"urgentReferral": 100,
"highPriorityReferral": 100
},
"iaSeconds": 0.88,
"observations": [
{
"media": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://bucket/diagnostic-report-medias/bbb.png"
}
}
],
"conclusions": [
{
"probability": 99.65,
"pathology": {
"name": "Acne",
"code": "Acne",
"icd11": "ED80"
}
},
{
"probability": 0.06,
"pathology": {
"name": "Varicella",
"code": "Varicella",
"icd11": "1E90"
}
}
],
"scoringSystems": [
{
"scoringSystem": {
"name": "Acne lesion estimation grading index",
"code": "alegi"
},
"score": {
"value": 8,
"severity": {
"value": 1,
"interpretations": [
{
"min": 0.0,
"max": 0.0,
"text": "None",
"coding": [
{
"code": 1,
"display": "low"
}
]
},
{
"min": 0.0,
"max": 2.1,
"text": "Mild",
"coding": [
{
"code": 1,
"display": "low"
}
]
},
{
"min": 2.1,
"max": 4.5,
"text": "Moderate",
"coding": [
{
"code": 2,
"display": "moderate"
}
]
},
{
"min": 4.5,
"max": 21.6,
"text": "Severe",
"coding": [
{
"code": 3,
"display": "high"
}
]
}
]
}
},
"reduction": null,
"facets": [
{
"facet": {
"name": "Acne lesion density",
"description": ""
},
"value": {
"display": "None (0)",
"raw": 0
}
},
{
"facet": {
"name": "Number of lesions",
"description": ""
},
"value": {
"display": "Mild (0-10)",
"raw": 5
}
}
],
"explainabilityMedia": {
"url": "https://bucket/diagnostic-report-medias/explainability/aaa.png"
}
}
]
}
}
}

Top-level fields

  • id: unique identifier of the diagnostic report (encrypted DiagnosticReportId).
  • url: iframe URL to visualize the diagnostic report inside Legit.Health. null when the company has no valid app key configured.
  • pdf: URL to download a printable PDF of the report. Calling the endpoint with ?format=pdf issues an HTTP 302 redirect to this same URL. Treat it as an opaque, authenticated URL; refetch the diagnostic report if the link stops working.
  • visitIdentifier: the visit or encounter identifier supplied by the integrator when the iframe was loaded (null when not provided). Use it to map the diagnostic report back to your own scheduling system.
  • extraData: free-form JSON object (or null) passed by the integrator when the iframe was loaded. Use it to round-trip your own identifiers, tags, or context back into the diagnostic report.
  • createdAt: ISO-8601 timestamp indicating when the diagnostic report was created.

Examples

Two illustrative cases that contrast what the device returns when its diagnostic-support output is high-confidence versus when it is not.

Case 1: Diagnostic confidence above the threshold

Download

Download an example JSON: psoriasis (confident)

This case corresponds to three uploaded images of psoriasis on the elbow. The diagnostic-support algorithm reports psoriasis with high confidence, so the application also calculates the associated severity questionnaire (PASI).

The user uploaded three photos but the severity is calculated on one of them. Each photo can show a different perspective of the lesion (omitting or adding parts), so we choose the most representative image for the severity calculation.

The most relevant fields in the JSON are:

  • observations: the array of images uploaded by the user.
  • result.scoringSystems / result.questionnaires: the questionnaires that capture the severity of the most probable condition.

Case 2: Diagnostic confidence below the threshold

Download

Download an example JSON: inconclusive case

In this case the user uploaded three images but the diagnostic-support algorithm could not determine the type of lesion above the configured confidence threshold, so severity is not calculated.

In the example JSON, all images are returned under observations and result.scoringSystems / result.questionnaires is empty.

Further reading

Please read the Instructions For Use for the canonical reference. Note that the IFU may vary by country; reach out to us for country-specific guidance.