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
For reseller devices, an "unpaid" plan will be used, and billed on the next cycle.
If you are on legacy reseller billing, this endpoint will not work. Instead see /api/devices/{id}/activateOnResellerPlan and /api/devices/{id}/deactivate routes

Authorizations

ApiKeyAuth
TypeAPI Key (header: Authorization)

Parameters

Path Parameters

id*

Device ID

Typeinteger
Required

Request Body

JSON
{
"renewOnto": 0,
"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
}

Samples