Api >

Service Portal REST API

DELETE unassigns Skill Service's Inbound Trunk Number
Given I am authenticated as Customer K0002
and there is a Skill Service with service number 17
which has Inbound Trunk Number +48 (22) 1111-119
When I send /api/customers/K0002/targets/skill-services/17/inbound-trunk-numbers/0048.22.1111-119
Then I should receive HTTP/1.1 204 No Content
and Skill Service with service number 17 does not have assigned Inbound Trunk Number +48 (22) 1111-119
Missing Customer
Given I am authenticated as Admin
When I send /api/customers/K404/targets/skill-services/17/inbound-trunk-numbers/0048.22.1111-119
Then I should receive HTTP/1.1 404 Not Found
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"
}
Changing resource which belongs to another Customer
Given I am authenticated as customer K0002
When I send /api/customers/K0003/targets/skill-services/17/inbound-trunk-numbers/0048.22.1111-119
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"
}
System Integrator cannot remove Skill Service Inbound Trunk Number of Customer that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/skill-services/345/inbound-trunk-numbers/0048.22.1111-119
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 Skill Service Inbound Trunk Number of Customer that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/skill-services/345/inbound-trunk-numbers/0048.22.1111-119
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"
}