Api >

Service Portal REST API

DELETE remove given Frontdesk Service
Given I am authenticated as customer K0002
and there is a Frontdesk Service with serviceNumber 123
When I send /api/customers/K0002/targets/frontdesk-services/123
Then I should receive HTTP/1.1 204 No Content
and there should be no Frontdesk Service with serviceNumber 123
DELETE returns 404 if given Frontdesk Service does not exist
Given I am authenticated as customer K0002
and there is no Frontdesk Service with serviceNumber 404
When I send /api/customers/K0002/targets/frontdesk-services/404 Then I should receive HTTP/1.1 404 Not Found with following body:
{
  "detail": "Frontdesk Service with service number 404 not found",
  "title": "Frontdesk Service not found",
  "described_by": "http://api.nfon.net/probs/frontdesk-service-not-found"
}
Missing Customer
Given I am authenticated as Admin
When I send /api/customers/K404/targets/frontdesk-services/123
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Customer not found",
  "detail": "Customer with identifier K404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
DELETE returns 403 if Customer is trying to remove other Customer's Frontdesk Service
Given I am authenticated as K0003
and there is a Frontdesk Service with serviceNumber 123
When I send /api/customers/K0002/targets/frontdesk-services/123 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"
}
System Integrator cannot remove Frontdesk Service of Customer that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/frontdesk-services/123
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 remove Frontdesk Service of Customer that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/frontdesk-services/123
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"
}