Update device claimable state
POST/deviceRegistration
Base URL: https://api.tinkermode.com
Modify the registration state of the specified device. Only the device itself can make this request. If the claimable parameter is true, the duration parameter must also be specified.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain API key of the matching device.
Request body
Content type: application/x-www-form-urlencoded
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
claimable | boolean | Yes | Set device to be claimable if it is true. | |
deviceId | integer | Yes | ID of device to be modified. | |
duration | integer | No | Duration of the claimable state in seconds. |
Request example
deviceId=34327&claimable=true&duration=1000Responses
200 Successfully set the specified device to the new state.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
claimExpirationTime | string | Yes | read-only (server-generated) | Claim Expiration Timestamp |
Response example
{
"claimExpirationTime": "2019-12-18T01:11:33Z"
}401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |