---
title: Rest API
slug: smart-care
icon: 🌎
docTags: 
createdAt: 2025-06-03T09:26:26.428Z
---

# Introduction

Refer to the general Rest API documentation. Link [here](docId\:BiuPVixvHltbukKLR2ATI).

# Authentication

|              | **API Key**                                     | **Action Token**                            |
| ------------ | ----------------------------------------------- | ------------------------------------------- |
| Purpose      | For admin calls (e.g. requesting action tokens) | For client operations (e.g. quality checks) |
| Header key   | *x-api-key*                                     | *Authorization*                             |
| Header value | "\<your\_API\_key>"                             | "Token \<your\_action\_token>"              |

Refer to the general Rest API documentation for more information. Link [here](docId\:BiuPVixvHltbukKLR2ATI).

# Errors

Refer to the general Rest API documentation on how to handle unhappy HTTP Status Codes. Link [here](docId\:BiuPVixvHltbukKLR2ATI).

# Smart Care Limitations

:::hint{type="danger"}
The following limitations apply for the (initial) Smart Care implementation.
:::

- We will not define "Users" (as described [here](docId\:BiuPVixvHltbukKLR2ATI) in the general API documentation)
  - Why? The concept of users implies that each patient has a seperate login and *builds* a user profile, tracking the person over time and learning insights. This concept is currently beyond the scope of this project.

# Endpoints

:::ApiMethodV2
```json
{
  "name": "Action token",
  "method": "POST",
  "url": "https://engine.intelliprove.com/v1/smartcare/authenticate",
  "description": "Request an action token for client-side usage.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "9FSvpsqfMBzv-w917McKX",
        "language": "json",
        "code": "{\n  \"valid_minutes\": 360\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "9FSvpsqfMBzv-w917McKX"
  },
  "results": {
    "languages": [
      {
        "id": "_92OvRc3ySK30hjrl6uYR",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5...\",\n    \"expires_utc\": \"2025-06-03T16:22:02.820552+00:00\"\n}"
      }
    ],
    "selectedLanguageId": "_92OvRc3ySK30hjrl6uYR"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "x-api-key",
        "kind": "required",
        "type": "string",
        "description": "Valid API key.",
        "": "string"
      }
    ],
    "bodyDataParameters": [
      {
        "name": "valid_minutes",
        "kind": "optional",
        "type": "integer",
        "description": "Validity for the action token, expressed in minutes. Default = 360 minutes (6 hours)",
        "": "Validity for the action token, expressed in minutes. Default = 360 minutes (6 hours)"
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "action-token",
  "legacyHash": "VhP0vPMgEMoE-6ggxZQPv"
}
```
:::

***

:::ApiMethodV2
```json
{
  "name": "Image quality check",
  "method": "POST",
  "url": "https://engine.intelliprove.com/v1/smartcare/check",
  "description": "Perform the IntelliProve image quality check on a single JPEG image, sent as multipart/form-data.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "QS7Qd49zgX2ss8yObpPWv",
        "language": "json",
        "code": "",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "QS7Qd49zgX2ss8yObpPWv"
  },
  "results": {
    "languages": [
      {
        "id": "pTP_8amQViuzxOmxOFwmb",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"error_code\": int,\n    \"error_type\": string\n}"
      }
    ],
    "selectedLanguageId": "pTP_8amQViuzxOmxOFwmb"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "Valid action token in the format: \"Token <your_action_token>\".",
        "": "Valid action token in the format: \"Token <your_action_token>\"."
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": [
      {
        "name": "image",
        "kind": "required",
        "type": "object",
        "description": "JPEG-compressed image sent as a binary stream with the MIME type image/jpeg.",
        "": "JPEG-compressed image sent as a binary stream with the MIME type image/jpeg."
      }
    ]
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "image-quality-check",
  "legacyHash": "Af9uywNgCaFo5gBpBRC1z"
}
```
:::

| `error_code` | `error_type`         | **Description**                                                                                                                                          |
| ------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1            | TOO\_CLOSE           | You're too close, move further away from the camera.                                                                                                     |
| 2            | TOO\_FAR             | You're too far, move closer to the camera.                                                                                                               |
| 3            | NOT\_CENTERED        | Align and center your face with the indication frame.                                                                                                    |
| 4            | NO\_CHEST            | Your upper chest is not visible enough, make sure it's in the indicated frame.                                                                           |
| 5            | BAD\_POSE            | Look straight to the camera.                                                                                                                             |
| 6            | BAD\_LIGHTING        | Good lightning is important. Make sure your face is well lit and the light is evenly spread on your face. Use the flash function if needed.              |
| 7            | FOREHEAD\_OUT\_FRAME | Make sure your forehead is within the indicated frame.                                                                                                   |
| 8            | NO\_FACE\_DETECTED   | We couldn't detect a face. Make sure you are in the indication frame and lighting is good.                                                               |
| 9            | NO\_FOREHEAD\_SKIN   | We couldn't detect enough qualitative skin area on your forehead. Please ensure it's visible, and the lighting on your face is evenly spread. Try again! |

***

:::ApiMethodV2
```json
{
  "name": "Get Upload URL",
  "method": "POST",
  "url": "https://engine.intelliprove.com/v1/smartcare/uploads/request-url",
  "description": "Get pre-signed upload URL for uploading the ZIP files via a multipart/form-data POST request.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "38DbzABYtyuWVJ5ykFPQG",
        "language": "json",
        "code": "",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "38DbzABYtyuWVJ5ykFPQG"
  },
  "results": {
    "languages": [
      {
        "id": "eh7m4NIJ9XksmNyBoMwsh",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"face_scan_id\": \"dbb1dfe2-8d3b-4b6b-abc6-74b3829be89d\",\n    \"expiry_time_seconds\": 3600,\n    \"url\": \"https://intelliprove-main-streaming-bucket-develop.s3.amazonaws.com/\",\n    \"method\": \"POST\",\n    \"content_type\": \"multipart/form-data\",\n    \"fields\": {\n        \"key\": \"smartcare/dbb1dfe2-8d3b-4b6b-abc6-74b3829be89d.zip\",\n        \"x-amz-algorithm\": \"AWS4-HMAC-SHA256\",\n        \"x-amz-credential\": \"AKIA23BCDYDWR7PSCEKZ/20250709/eu-west-1/s3/aws4_request\",\n        \"x-amz-date\": \"20250709T075856Z\",\n        \"policy\": \"eyJleHBpcmF0aW9uIjogIjIwMjUtMDctMDlUMDg6NTg6NTZaIiwgImNvbmRpdGlvbnMiOiBbeyJrZXkiOiAic21hcnRjYXJlL2RiYjFkZmUyLThkM2ItNGI2Yi1hYmM2LTc0YjM4MjliZTg5ZC56aXAifSwgWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDYwMDAwMDAwXSwgeyJidWNrZXQiOiAiaW50ZWxsaXByb3ZlLW1haW4tc3RyZWFtaW5nLWJ1Y2tldC1kZXZlbG9wIn0sIHsia2V5IjogInNtYXJ0Y2FyZS9kYmIxZGZlMi04ZDNiLTRiNmItYWJjNi03NGIzODI5YmU4OWQuemlwIn0sIHsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwgeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUEyM0JDRFlEV1I3UFNDRUtaLzIwMjUwNzA5L2V1LXdlc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwgeyJ4LWFtei1kYXRlIjogIjIwMjUwNzA5VDA3NTg1NloifV19\",\n        \"x-amz-signature\": \"c49efa351f4b5fd49d87deaf3707776dba1e913eca7a2f2806edeef4cab54674\"\n    }\n}"
      }
    ],
    "selectedLanguageId": "eh7m4NIJ9XksmNyBoMwsh"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "Valid action token in the format: \"Token <your_action_token>\".",
        "": "required"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "get-upload-url",
  "legacyHash": "WQIMAbWV3ejn6XWCI6TPA"
}
```
:::

Refer to the [ZIP File Format](docId\:gQwCWqIYbOKpILqtxmo_u) documentation on how to format the ZIP file and content.

***

:::ApiMethodV2
```json
{
  "name": "Trigger Processing",
  "method": "POST",
  "url": "https://engine.intelliprove.com/v1/smartcare/uploads/process",
  "description": "Asynchronously trigger the processing of a specific health scan UUID (fire-and-forget) when the ZIP file is found valid.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "2SRMnxDXvJxZybh02m6zL",
        "language": "json",
        "code": "{\n  \"face_scan_id\": \"832151dc-1b68-4077-97b0-88454f695653\",\n  \"patient_data\": {\n    \"ead\": \"abc-123456789\"\n  },\n  \"metadata\": {\n    \"field1\": \"value1\" \n  }\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "2SRMnxDXvJxZybh02m6zL"
  },
  "results": {
    "languages": [
      {
        "id": "4-Xv8lDspPJ-kVGoDbcmv",
        "language": "202",
        "code": "",
        "customLabel": ""
      },
      {
        "id": "H6AF_sBxcbdf3G9c7Incc",
        "language": "400",
        "code": "No uploaded record found for <uuid>",
        "customLabel": ""
      },
      {
        "id": "Gj9DD1MK__obvskUDsLMu",
        "language": "422",
        "code": "{\n  \"debug_reason\": \"\",  // Validation error message\n  \"debug_uploaded_at\": \"\" // ISO formatted datetime of when ZIP was uploaded\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "H6AF_sBxcbdf3G9c7Incc"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "name": "Parameter name",
        "kind": "optional",
        "type": "string",
        "description": "",
        "children": []
      }
    ],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "Valid action token in the format: \"Token <your_action_token>\".",
        "": "required"
      }
    ],
    "bodyDataParameters": [
      {
        "name": "face_scan_id",
        "kind": "required",
        "type": "string",
        "description": "Face Scan UUID.",
        "": "Face Scan UUID."
      },
      {
        "name": "patient_data",
        "kind": "required",
        "type": "object",
        "description": "Dynamic JSON object for storing patient data.",
        "": "Dynamic JSON object for storing patient data.",
        "children": [],
        "schema": []
      },
      {
        "name": "local_timezone",
        "kind": "optional",
        "type": "string",
        "description": "An optional time zone to use for the time based metrics. Defaults to \"Europe/Brussels\"",
        "": "An optional time zone to use for the time based metrics. Defaults to \"Europe/Brussels\""
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Query Parameter",
    "value": "queryParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "trigger-processing",
  "legacyHash": "qSezuoH-72SFRQ8j21Rum"
}
```
:::

***

:::ApiMethodV2
```json
{
  "name": "Get FHIR resources",
  "method": "GET",
  "url": "https://engine.intelliprove.com/v1/smartcare/fhir/all",
  "description": "Get FHIR collection of all resources created between the given time interval.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "ilP3vB7qgU0e-61e1VifZ",
        "language": "json",
        "code": "// Empty",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "ilP3vB7qgU0e-61e1VifZ"
  },
  "results": {
    "languages": [
      {
        "id": "kF2CThzhgOTwgisFDhpBX",
        "language": "200",
        "code": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"collection\",\n  \"entry\": [\n     {\n        \"resourceType\": \"Observation\",\n        ...\n     },\n     {\n        \"resourceType\": \"Observation\",\n        ...\n     },\n     ...\n  ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "kF2CThzhgOTwgisFDhpBX"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "name": "from",
        "kind": "required",
        "type": "string",
        "description": "Return all FHIR resources performed starting from this datetime. ISO format (e.g. \"2025-09-09T00:00:00\")",
        "": "Return all FHIR resources performed starting from this datetime. ISO format (e.g. \"2025-09-09T00:00:00\")"
      },
      {
        "name": "until",
        "kind": "optional",
        "type": "string",
        "description": "Return all FHIR resources until this datetime. ISO format (e.g. \"2025-09-10T00:00:00\").\nLeave out to default to \"now\".\n",
        "": "Return all FHIR resources until this datetime. ISO format (e.g. \"2025-09-10T00:00:00\").\nLeave out to default to \"now\".\n"
      }
    ],
    "headerParameters": [
      {
        "name": "x-api-key",
        "kind": "required",
        "type": "string",
        "description": "Valid API key.",
        "": "required"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "get-fhir-resources",
  "legacyHash": "6lzr8sb0gNG3Z1OyYvjc_"
}
```
:::

