Skip to content

Sets a device plan

PUT
/devices/{id}/plan

Sets the plan that the device is currently using, and optionally the plan that it should renew onto.
For user devices, the user must have already purchased or been allocated the target plan, and it should be available in their plan pool, see GET /users/plans
For reseller devices, an "unpaid" plan will be used, and billed on the next cycle.

Authorizations

ApiKeyAuth

API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.

TypeAPI Key (header: Authorization)
ExampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Parameters

Path Parameters

id*

Device ID

Typeinteger
Required

Request Body

application/json
JSON
{
"renewOnto": {
"defined": true,
"value": 0
},
"ignoreSubscriptionSetup": true,
"planId": 0,
"renewUntil": "string"
}

Responses

OK
application/json
JSON
{
"_stripeSubscriptionId": "string",
"created": "string",
"deviceId": 0,
"expires": "string",
"id": 0,
"plan": {
"displayName": "string",
"features": "string",
"id": 0,
"name": "string",
"onoWhitelistId": 0,
"prices": {
"eur": [
[
]
],
"gbp": [
[
]
],
"tax": "[Circular Reference]",
"usd": [
[
]
]
},
"sku": "string",
"sleepLimit": 0,
"wakeLimit": 0
},
"planId": 0,
"renewOnto": 0,
"userId": 0
}

Playground

Authorization
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python