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.
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.

Type
API Key (header: Authorization)
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parameters​

Path Parameters

id*

Device ID

Type
integer
Required

Request Body​

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

Request example

Responses​

OK

application/json
JSON
{
  
"_stripeSubscriptionId": "string",
  
"created": "string",
  
"deviceId": 0,
  
"expires": "string",
  
"id": 0,
  
"plan": {
  
  
"description": "string",
  
  
"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,
  
"userId": 0
}
Try this endpoint

Playground​

Authorization
Variables
Key
Value
Body