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.
If the device was previously deactivated, this action will also activate the device.
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)
Example
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Parameters
Path Parameters
id*
Device ID
Typeinteger
RequiredRequest Body
application/json
JSON
{
"renewOnto": 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
}