# Checkin

{% hint style="info" %}
These two endpoints are wide open and do not need any authorisation data.
{% endhint %}

#### Phase 1 - Challenge

## Checkin challange

<mark style="color:blue;">`GET`</mark> `https://my.ence.do/api/system/checkin`

Get a device check-in challenge data.

#### Response status code

{% tabs %}
{% tab title="200: Successful operation" %}

```json
{
  "check": "eyJlY2RoIjoieDI1NTE5IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJqdGkiOiJrSUEzWXJDQWJpMXZDVTFoOHlwbjJLdHMxUVNET1FVS05zYVVJZ1dvU3IwPSIsImlzcyI6IjBrUm1DbGlVUXZSd2Z4aTdUMWVrMkd0YlNFUnpNRlJHTGV5TzFyMXRFWG89IiwicWlkIjoiZTZQQXZDWnJtTWMwZlVUMEt6bUw3STNUSXo2UUZBNEpCallzbEU5ZisvQT0iLCJhdWQiOiIvTGJ4bzVNZ1U2Wk90VnN4eEc1akNRNSs0ZXd4b2ExclY4ZXFNSUZGblRBPSIsImZ3cyI6Ilora0FhamdWVmRTTVFqTkl2SzVGR3owKzlyZi9KdXRWQ2xOWTZTN0dCZVE3NjVOTVlFVC9YZ2RBNjFjbU1rMTV3YXcwOG9OTHVXbVV5Z0hLM3hXRkNBPT0iLCJibHMiOiI4TXdvd3NLa3hnRVdubDJrMHQvZU92c2pUYlI3MHBvWUMyY3p5UEl3S24vaFZMNjhXRjNRYVF3WjFieFZjWXY3ZzhXRXd5ekoyUFZuVEZBbFlRN2hCZz09IiwidWlzIjoiNkdoMmNDcVNKMEdVTFFLRTFEaWJvWTFPc0M4ck01KzF4UFpjbENuaHRybz0iLCJjc24iOiJLZnNhS0t2Tmw0THZQaWdsMEdtR0JnPT0ifQ.dn2cwBODoUKkGKrr92IW13NgVg7j-h6VGO-tnADqins"
}
```

{% endtab %}
{% endtabs %}

#### Response data for successful operation

<table><thead><tr><th width="179.59459459459458">Name</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>check</code></td><td>String</td><td>Check-In challenge data generated by HEM</td></tr></tbody></table>

#### Phase 2 - Response

## Checkin response

<mark style="color:green;">`POST`</mark> `https://my.ence.do/api/system/checkin`

Process server response for the device `check` challenge.

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                        | Type   | Description                                           |
| ------------------------------------------- | ------ | ----------------------------------------------------- |
| `checked`<mark style="color:red;">\*</mark> | String | <p>Checkin data sent by the </p><p>backend server</p> |

#### Response status code

{% tabs %}
{% tab title="200: Successful operation" %}

```javascript
{
  "status": "OK"
}
```

{% endtab %}

{% tab title="400: Incorrect argument(s)" %}

{% endtab %}

{% tab title="401: Provided data validation failed" %}

{% endtab %}
{% endtabs %}

#### Response data for successful operation

<table><thead><tr><th width="165.09431513126984">Name</th><th width="150">Type</th><th width="404.9346917360494">Description</th></tr></thead><tbody><tr><td><code>newcrt</code></td><td>String</td><td>Status of the TLS certificate update.</td></tr><tr><td><code>newfws</code></td><td>String</td><td>Info about the new firmware version.</td></tr><tr><td><code>newuis</code></td><td>String</td><td>Info about the new Manager version (on Encedo PPA only).</td></tr><tr><td><code>status</code></td><td>String</td><td>Checkin status - general information. </td></tr></tbody></table>

#### Log entries

<table><thead><tr><th>Event</th><th width="215.33333333333331">Result</th><th>Source</th></tr></thead><tbody><tr><td>LOG_TYPE_RTC_SET</td><td>LOG_RESULT_OK</td><td>200 (if RTC is been updated)</td></tr><tr><td>LOG_TYPE_SHUTDOWN</td><td>LOG_RESULT_OK</td><td>200 (if the device shutdown or locked)</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.encedo.com/hem-api/reference/api-reference/system/checkin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
