Rest API
The IntelliProve API is organised around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Examples: POST https://engine.intelliprove.com/v2/users GET https://engine.intelliprove.com/v2/users
If you are new to this developer portal, we recommend first reading the product documentationο»Ώ, which will get you acquainted with the main product concepts and functionalities. To integrate the plug-in into your platform and get started performing Face Scansο»Ώ, follow our Initial integrationο»Ώ documentation.
The IntelliProve API supports API keys and JWT Action Tokens to authenticate HTTP requests.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
All the endpoints described below require an API key or action token in the header for authentication purposes.
API Keys cannot be created manually, but are distributed when you sign up for a plan with IntelliProve.
ο»ΏContact us or set up a call.
Your API keys carry many privileges and have no expiry date, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
After agreement, you'll receive at least two API keys. Development API keys, which can be used during development, are aliased with a "-DEV" suffix.
Alias | API Key (non-working examples) |
---|---|
COMPANYNAME-DEV | KUsWnp2vRGCfW8XPYJZeQdh-eT!n-Ms.UcyaETy3 |
COMPANY-NAME | fWeBpZ9CKaKb7pnk@vGtkQDjZFQ_U2g@GZu_Z74X |
Use your API key in the HTTP request header: x-api-key: <your-api-key>
Action tokens can be manually created using the IntelliProve API, and require a valid API key. Use the Create user action tokenο»Ώ endpoint to do this.
They are specifically designed to be used in client-side (frontend) code, as they have restricted access and automatically expire after a predefined timespan. However, they may also be used in backend code for certain usecases.
Pass your action token in the HTTP request header: authorization: Token <your-action-token>
Unlike API keys, User Action Tokens are linked to a Userο»Ώ upon creation. API requests authenticated with these tokens are automatically linked to that User. An action token should always be created right before a User performs an action in your front-end, hence the name Action Token. This action token can be used while the user is performing the action (e.g. consult the results of a Face Scan). If a user leaves a page and does another action, a NEW action token should be created.
If data for a user needs to be retrieved at a later time, e.g. for building a dashboard or processing some data in the back-end, you have two options:
- Get the data in your back-end using the API key, process the data and render it separately. Auth not locked to a user.
- Create an action token to fetch the user's data directly from your front-end. The action token can then only be used to fetch data for that user.
In both scenarios for fetching data, you'll often need some unique user identifier if you want to serve the current user his/her own data. Because we understand that customers have their own unique user identifiers (uuid, email, etc.) we provide the option of setting an external_user_id to a custom value when creating a userο»Ώ so that you do not have to store our (IntelliProve's) UUID.
Summary
Authentication method | API key | Action token |
---|---|---|
Type of communication | Customer backend to IntelliProve backend only | Customer backend OR front-end to IntelliProve backend |
Scope | Full access to all data | Access limited to a single user's data |
Lifetime and creation | Created when you sign up for a plan. Does not expire. | Created by you using your API key. Expire after a few hours. Recommended to create and use within the scope of a user's action(s) on a page of your application. |
When using an API key for authentication, you may need to specify the user separately in certain endpoints (using the user_id or external_user_id parameter), whereas the action token already includes this information.
ο»Ώ
In general, Status Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted or the request format is invalid, etc.). Codes in the 5xx range indicate an error with IntelliProveβs servers.
Status Code | Description |
---|---|
200 - OK | Everything worked as expected |
204 - No Content | The request is correct, but there is no content to be returned |
400 - Bad Request | The request was unacceptable |
401 - Not Authorized | No valid authentication token provided |
403 - Forbidden | No permissions to perform the request |
404 - Not Found | The request resource does not exist |
422 - Unprocessable | One or more of the request parameters are invalid |
500, 502, 503 - Server Errors | Something went wrong on our end |
The 4xx and 5xx errors can be handled programmatically and include an error description that briefly explains the error reported.
An exception is made for the 422 errors, which give detailed information on which request parameter failed the validation.
A User is a unique end-user accessing IntelliProve's services through your platform or app. Each User must be registered once, enabling IntelliProve to track their Face Scans and build a personalized User Health Profile. Every user is assigned a unique User ID.
When providing the external_user_id as a query or path parameter, make sure to URL encode the value. This ensures that the value is received as expected on our end. You can use the encodeURI function (ref.) for JavaScript to create a URL encoded string.
Property | Description |
---|---|
user_id uuid | Unique IntelliProve ID assigned to the user. |
external_user_id nullable string | Your own unique ID for the user. Stored in your own backend. |
customer read-only string | Name of the company to which the user belongs. |
birth_date nullable date object | Date of birth in YYYY-MM-dd format |
sex nullable string enum | Sex at birth Values: "M", "F" |
language nullable string enum | Two-letter language code Values: "en", "nl", "fr" |
Once registered, you can reference Users by both their user_id or their external_user_id.
Note: Although both the user_id and external_user_id are marked as optional, you need to provide exactly one of them in order to identify the user.
To request a Face Scan URL, the user performing the scan must be registered with IntelliProve. This only needs to be done once for each user and can be done with the Register New Userο»Ώ API endpoint. To register the user, you must provide a unique reference for the user as a query parameter: external_user_id. The response of the call will contain the IntelliProve user_id, which is the anonymised version stored at IntelliProve to keep track of the user's health insights. You can use any of these below to specify the user when requesting the Face Scan URL.
Note: Although both the user_id and external_user_id are marked as optional, you need to provide exactly one of them in order to identify the user.
For more information about the user_id and external_user_id query parameters, refer to the User Objectο»Ώ documentation above.
Make sure that the User Action Token you're providing in the Authorization field, corresponds to the user that performed the Face Scan.
The path parameter profile refers to a Health Profile. β More info about the User Health Profileο»Ώ
Use these endpoint to obtain the necessary data to create a widget displaying a Biomarker, Metric or Graph.
For the full list of possible values for parameter or more documentation on how to interpret the response body, refer to the section Biomarker Widgetο»Ώ.
For the full list of possible values for parameter or more documentation on how to interpret the response body, refer to the section Metric Widgetο»Ώ.
Note that in the response above the locked field may be set to true, meaning that the biomarker has not yet been unlocked by the user within their user journey. In this case, the Nullable fields will be set to Null. For more information refer to the Health Journeyο»Ώ documentation.
ο»Ώ
For a list of possible values for parameter, refer to the sections Biomarker Widgetο»Ώ and Metric Widgetο»Ώ.
Refer to our Instructions for useο»Ώ for more information related to our medical device's product description and intended use.