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

PropertyTypeRequiredConstraintsDescription
claimablebooleanYesSet device to be claimable if it is true.
deviceIdintegerYesID of device to be modified.
durationintegerNoDuration of the claimable state in seconds.

Request example

deviceId=34327&claimable=true&duration=1000

Responses

200 Successfully set the specified device to the new state.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
claimExpirationTimestringYesread-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

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of invalid data or denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.