Deactivate Device
Admin-or-support, dry-run-first deactivation by epd DeviceId. Missing app records produce warnings and do not block IoT deactivation. An optional previousDeviceObjectId from the admin search allows orphaned paper assignments to be detached; without a known app id, papers remain unchanged. A dry run is the default and returns the papers currently attached plus a confirmationToken. Papers and their cross-paper references are preserved. To execute, repeat with dryRun=false and that token. After a confirmed IoT reset, cleanup can be retried with the same token without resetting the device again; a completed request returns its saved result. Cleanup only affects the original database device and detaches its remaining paper references. Change counts describe the successful cleanup attempt.
Middlewares: authMiddleware, validateAdminOrSupport
API key for authentication
In: header
Path Parameters
Epaper device serial / DeviceId
^epd[a-z0-9]*-[a-z0-9][a-z0-9-]*$length <= 128Query Parameters
Historical app device ObjectId from the admin search. Used only if the current app record is missing, to detach orphaned paper assignments.
^[a-f0-9]{24}$/iDefaults to true. Set to false only after obtaining a confirmationToken from a dry run.
"true""true" | "false"Confirmation token returned by the latest dry run. Required when dryRun=false.
^[a-f0-9]{64}$Response Body
application/json
curl -X DELETE "https://api.paperlesspaper.de/v1/devices/by-device-id/epd-0000000000"{
"dryRun": true,
"deactivated": true,
"preview": {
"device": {
"id": "string",
"deviceId": "string",
"kind": "string",
"organizationId": "string"
},
"appDeviceMissing": true,
"warnings": [
"string"
],
"papersToDetach": {
"count": 0,
"ids": [
"string"
]
},
"iotDeviceWillBeDeactivated": true,
"confirmationToken": "string"
},
"deleted": {
"devices": 0
},
"updated": {
"papers": 0
},
"iotDeviceDeactivated": true
}Create a new device POST
Create a new device and associate it with the current organization. Middlewares: `authMiddleware`, `validateBodyOrganization`, `validateOrganizationDelete`
Delete a device DELETE
Remove the specified device from the system. Middlewares: `authMiddleware`, `validateDevice`, `validateOrganizationDelete`