Api >

Service Portal REST API

DELETE removes requested Softphone Device
Given I am authenticated as Admin
and there is a deactivated Softphone Device with ID 123456789abc and with name sofphone
When I send /api/customers/K0002/devices/softphone/123456789abc
Then I should receive HTTP/1.1 204 No Content
Given I am authenticated as customer K0002
When I send /api/customers/K0002/devices/standard/123456789abc
Then I should receive HTTP/1.1 404 Not Found
Cannot DELETE Device for missing Customer
Given I am authenticated as Admin
When I send /api/customers/K0404/devices/softphone/123456789abc
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
  "described_by": "http://api.nfon.net/probs/customer-not-found",
  "title": "Customer not found",
  "detail": "Customer with identifier K0404 has not been found"
}
Cannot DELETE missing Device
Given I am authenticated as Admin
And there is no Standard device with id ABCDEF012345
When I send /api/customers/K0002/devices/softphone/ABCDEF012345
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
  "title": "Device not found",
  "detail": "Device with unique identifier ABCDEF012345 has not been found",
  "described_by": "http://api.nfon.net/probs/device-not-found"
}
Cannot DELETE active Device
Given I am authenticated as Admin
and there is a activated Softphone Device with ID 123456789abc and with name softphone
When I send /api/customers/K0002/devices/softphone/123456789abc
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Cannot delete active device"
  }]
}