---
title: "Add device fingerprint"
url: "https://developer.incode.com/api-reference/add-device-fingerprint/"
section: "api-reference"
group: "Onboarding"
version: "v1.1"
status: "live"
endpoint: "POST /omni/add/device-fingerprint"
---
# Add device fingerprint

`POST /omni/add/device-fingerprint`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Sends information about device from which endpoint is called

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `deviceType` | string | yes | Platform of device Enum: `IOS`, `ANDROID`, `WEBAPP` |
| `hash` | string | yes | Hash code of the device fingerprint |
| `ip` | string | yes | IP address of the device |
| `ipLocation` | IpLocationDto |  | Location info based on IP address |
| `ipLocation.ipCountry` | string |  | Country from IP address |
| `ipLocation.ipRegion` | string |  | Region from IP address |
| `ipLocation.ipCity` | string |  | City from IP address |
| `ipLocation.ipLatitude` | number (double) |  | Latitude from IP address |
| `ipLocation.ipLongitude` | number (double) |  | Longitude from IP address |
| `data` | string | yes | Additional data about device |
| `osVersion` | string |  | OS version. If omitted it is parsed from user agent |
| `deviceModel` | string |  | Device model. If omitted it is parsed from user agent |
| `sdkVersion` | string |  | Version of SDK used |
| `hostingApp` | string |  | hostingApp. Name of the hosting application |
| `algorithmName` | string |  | Name of the fingerprinting algorithm used to produce the hash |
| `algorithmVersion` | string |  | Version of the fingerprinting algorithm used to produce the hash |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean |  | Flag indicating request passed successfully. |
| `sessionStatus` | string |  | Session status Enum: `Alive`, `Closed`, `Deleted` |
| `ipCountry` | string |  | Current country based on the geolocation Api |
| `ipState` | string |  | Current state based on the geolocation Api |
| `showMandatoryConsent` | boolean |  | Render mandatory consent page based on this parameter value. |
| `regulationType` | string |  | Regulation type for the mandatory consent (only if showMandatoryConsent set to true). |

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/omni/add/device-fingerprint \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "deviceType": "",
    "hash": "",
    "ip": "",
    "ipLocation": "",
    "ipLocation.ipCountry": "",
    "ipLocation.ipRegion": "",
    "ipLocation.ipCity": "",
    "ipLocation.ipLatitude": 0,
    "ipLocation.ipLongitude": 0,
    "data": "",
    "osVersion": "",
    "deviceModel": "",
    "sdkVersion": "",
    "hostingApp": "",
    "algorithmName": "",
    "algorithmVersion": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/add/device-fingerprint", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "deviceType": "",
      "hash": "",
      "ip": "",
      "ipLocation": "",
      "ipLocation.ipCountry": "",
      "ipLocation.ipRegion": "",
      "ipLocation.ipCity": "",
      "ipLocation.ipLatitude": 0,
      "ipLocation.ipLongitude": 0,
      "data": "",
      "osVersion": "",
      "deviceModel": "",
      "sdkVersion": "",
      "hostingApp": "",
      "algorithmName": "",
      "algorithmVersion": ""
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/add/device-fingerprint", headers=headers, json={
  "deviceType": "",
  "hash": "",
  "ip": "",
  "ipLocation": "",
  "ipLocation.ipCountry": "",
  "ipLocation.ipRegion": "",
  "ipLocation.ipCity": "",
  "ipLocation.ipLatitude": 0,
  "ipLocation.ipLongitude": 0,
  "data": "",
  "osVersion": "",
  "deviceModel": "",
  "sdkVersion": "",
  "hostingApp": "",
  "algorithmName": "",
  "algorithmVersion": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/add/device-fingerprint"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"deviceType\": \"\",\n  \"hash\": \"\",\n  \"ip\": \"\",\n  \"ipLocation\": \"\",\n  \"ipLocation.ipCountry\": \"\",\n  \"ipLocation.ipRegion\": \"\",\n  \"ipLocation.ipCity\": \"\",\n  \"ipLocation.ipLatitude\": 0,\n  \"ipLocation.ipLongitude\": 0,\n  \"data\": \"\",\n  \"osVersion\": \"\",\n  \"deviceModel\": \"\",\n  \"sdkVersion\": \"\",\n  \"hostingApp\": \"\",\n  \"algorithmName\": \"\",\n  \"algorithmVersion\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
