Api >

Service Portal REST API

Create Routing Prefix Extension with only basic data
Given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with only basic data
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with only basic data
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with only basic data
Given I am authenticated as Admin
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 201 Created with http://localhost:9998/api/customers/K0002/targets/routing-prefix/17
with following body:
{
  "href": "/api/customers/K0002/targets/routing-prefix/17"
}
Given I am authenticated as Admin
Then request /api/customers/K0002/targets/routing-prefix/17 returns HTTP/1.1 200 OK with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Create Routing Prefix Extension with links
Given I am authenticated as customer K0002
And there are
  • blacklistProfile with id 43
  • and customerContract with salesForceId 800D0000003ARnKIAW
  • and a Routing Prefix Extension with ID 555
And there is a Trunk with ID 12
which:
  • has baseNumber: +48 (22) 123456
  • has numberblockStart: 0
  • has numberblockEnd: 20
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with links
Given I am authenticated as System Integrator S0002
And there are
  • blacklistProfile with id 43
  • and customerContract with salesForceId 800D0000003ARnKIAW
  • and a Routing Prefix Extension with ID 555
And there is a Trunk with ID 12
which:
  • has baseNumber: +48 (22) 123456
  • has numberblockStart: 0
  • has numberblockEnd: 20
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with links
Given I am authenticated as Operator C0002
And there are
  • blacklistProfile with id 43
  • and customerContract with salesForceId 800D0000003ARnKIAW
  • and a Routing Prefix Extension with ID 555
And there is a Trunk with ID 12
which:
  • has baseNumber: +48 (22) 123456
  • has numberblockStart: 0
  • has numberblockEnd: 20
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with links
Given I am authenticated as Admin
And there are
  • blacklistProfile with id 43
  • and customerContract with salesForceId 800D0000003ARnKIAW
  • and a Routing Prefix Extension with ID 555
And there is a Trunk with ID 12
which:
  • has baseNumber: +48 (22) 123456
  • has numberblockStart: 0
  • has numberblockEnd: 20
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 201 Created
with following body:
{
  "href": "/api/customers/K0002/targets/routing-prefix/17"
}
Given I am authenticated as Admin
Then request /api/customers/K0002/targets/routing-prefix/17 returns HTTP/1.1 200 OK with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }]
}
Create Routing Prefix Extension with Geographic settings
Given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "dialPrefix",
    "value": "9"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with Geographic settings
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "dialPrefix",
    "value": "9"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with Geographic settings
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "dialPrefix",
    "value": "9"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing Prefix Extension with Geographic settings
Given I am authenticated as Admin
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "language",
    "value": "en"
  }, {
    "name": "dialPrefix",
    "value": "9"
  }]
}
Then I should receive HTTP/1.1 201 Created
with following body:
{
  "href": "/api/customers/K0002/targets/routing-prefix/17"
}
Given I am authenticated as Admin
Then request /api/customers/K0002/targets/routing-prefix/17 returns HTTP/1.1 200 OK with following body:
{
  "data": [{
    "name": "language",
    "value": "en"
  }, {
    "name": "dialPrefix",
    "value": "9"
  }]
}
Create Routing prefix Extension with Configuration settings
Given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "costCenter",
    "value": "Cost Center"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing prefix Extension with Configuration settings
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "costCenter",
    "value": "Cost Center"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing prefix Extension with Configuration settings
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "costCenter",
    "value": "Cost Center"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Create Routing prefix Extension with Configuration settings
Given I am authenticated as Admin
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "costCenter",
    "value": "Cost Center"
  }]
}
Then I should receive HTTP/1.1 201 Created
with following body:
{
  "href": "/api/customers/K0002/targets/routing-prefix/17"
}
Given I am authenticated as Admin
Then request /api/customers/K0002/targets/routing-prefix/17 returns HTTP/1.1 200 OK with following body:
{
  "data": [{
    "name": "costCenter",
    "value": "Cost Center"
  }]
}
DialPrefix has invalid value
Given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "dialPrefix",
    "value": "48"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
DialPrefix has invalid value
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "dialPrefix",
    "value": "48"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
DialPrefix has invalid value
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "dialPrefix",
    "value": "48"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
DialPrefix has invalid value
Given I am authenticated as Admin
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }, {
    "name": "dialPrefix",
    "value": "48"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request with following body:
{
  "errors": [{
    "message": "Invalid value for dialPrefix '48', expected no value, 0 or 9",
    "path": "dialPrefix",
    "value": "48"
  }]
}
Given I am authenticated as Admin
Then request /api/customers/K0002/targets/routing-prefix/17 returns HTTP/1.1 404 Not Found
Link is of incorrect type
Given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Link is of incorrect type
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Link is of incorrect type
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Link is of incorrect type
Given I am authenticated as Admin
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "title": "Invalid resource type",
  "detail": "Resource at /api/customers/K0002 is of incorrect type",
  "described_by": "http://api.nfon.net/probs/invalid-resource-type"
}
BlacklistProfile is null
Given I am authenticated as customer K0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": null
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
BlacklistProfile is null
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": null
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
BlacklistProfile is null
Given I am authenticated as Operator C0002
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": null
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
BlacklistProfile is null
Given I am authenticated as Admin
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": null
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Blacklist Profile cannot be null",
    "path": "blacklistProfile",
    "value": null
  }]
}
Customer tries to access another Customer's Routing Prefix Extension
Given I am authenticated as K0003
When I send /api/customers/K0002/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
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"
}
Customer tries to assign another Customer's Blacklist Profile
Given I am authenticated as K0003
And there is a Blacklist Profile with id 43 that belongs to Customer K0002
When I send /api/customers/K0003/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Required role is missing",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
SystemIntegrator tries to assign another Customer's Blacklist Profile
Given I am authenticated as System Integrator S0002
And there is a Blacklist Profile with id 43 that belongs to Customer K0002
When I send /api/customers/K0003/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Access denied to [Customer] with id [K0003]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator tries to assign another Customer's Blacklist Profile
Given I am authenticated as Operator C0002
And there is a Blacklist Profile with id 43 that belongs to Customer K0002
When I send /api/customers/K0003/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 403 Forbidden
with following body:
{
  "detail": "Access denied to [Customer] with id [K0003]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Admin tries to assign another Customer's Blacklist Profile
Given I am authenticated as Admin
And there is a Blacklist Profile with id 43 that belongs to Customer K0002
When I send /api/customers/K0003/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "links": [{
    "rel": "blacklistProfile",
    "href": "/api/customers/K0002/blacklist-profiles/43"
  }],
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
  "errors": [{
    "message": "Given Blacklist Profile with ID 43 is not available for Customer K0003",
    "path": "blacklistProfile"
  }]
}
Missing customer
Given I am authenticated as customer K0002
When I send /api/customers/K404/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should get HTTP/1.1 403 Forbidden
{
  "detail": "Access denied to [Customer] with id [K404]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Missing customer
Given I am authenticated as System Integrator S0002
When I send /api/customers/K404/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should get HTTP/1.1 403 Forbidden
{
  "detail": "Access denied to [Customer] with id [K404]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Missing customer
Given I am authenticated as Operator C0002
When I send /api/customers/K404/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
Then I should get HTTP/1.1 403 Forbidden
{
  "detail": "Access denied to [Customer] with id [K404]",
  "title": "Access forbidden",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Missing customer
Given I am authenticated as Admin
When I send /api/customers/K404/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
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 create Routing Prefix Extension for Customer that does not belong to him
Given I am authenticated as System Integrator S0002
When I send /api/customers/K0003/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
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 create Routing Prefix Extension for Customer that does not belong to him
Given I am authenticated as Operator C0002
When I send /api/customers/K0003/targets/routing-prefix as application/json; charset=UTF-8 with following body:
{
  "data": [{
    "name": "extensionNumber",
    "value": "17"
  }, {
    "name": "displayName",
    "value": "Routing Prefix Extension"
  }]
}
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"
}