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
TypeAPI Key (header: Authorization)

Parameters

Path Parameters

id*

Device ID

Typeinteger
Required

Request Body

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": {
"eur": 0,
"gbp": 20,
"usd": 0
},
"usd": [
[
]
]
},
"sku": "string",
"sleepLimit": 0,
"wakeLimit": 0
},
"planId": 0,
"renewOnto": 0,
"userId": 0
}

Playground

Authorization
Variables
Key
Value
Body
JSON

Samples

cURL
JavaScript
PHP
Python