Api >

Service Portal REST API

DELETE a license subscription from extension 17
Given I am authenticated as admin
and there is a Phone Extension with
  • extension number 17
  • and display name Phone Extension
  • and there is a phoneextension subscription
  • and there is a mobility-option subscription
  • and there is a minute-pack subscription
When I send /api/customers/K0002/targets/license-subscriptions/6d7eec8c255bed0231665d558132
Then I should receive HTTP/1.1 204 No Content
Missing customer
Given I am authenticated as admin
When I send /api/customers/K404/targets/license-subscriptions/1
Then I should get HTTP/1.1 404 Not Found
{
  "title": "Customer not found",
  "detail": "Customer with identifier K404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
System Integrator cannot delete license subscriptions of customer that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/license-subscriptions/1
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator cannot delete license subscriptions of Ccstomer that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/license-subscriptions/1
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0003]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
DELETE returns 403 if Customer tries to delete another customer's license subscriptions
Given I am authenticated as K0003
When I send /api/customers/K0002/targets/license-subscriptions/1
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "title": "Access forbidden",
  "detail": "Access denied to [Customer] with id [K0002]",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}