/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "displayName",
"value": "New Name"
}]
}
Then I should receive HTTP/1.1 200 OK
/api/customers/K0002/targets/routing-prefix/17
returns HTTP/1.1 200 OK
with following body:
{
"data": [{
"name": "displayName",
"value": "New Name"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "extensionNumber",
"value": "1717"
}]
}
Then I should receive HTTP/1.1 200 OK
with following body:
{
"href": "/api/customers/K0002/targets/routing-prefix/1717"
}
/api/customers/K0002/targets/routing-prefix/1717
returns HTTP/1.1 200 OK
with following body:
{
"data": [{
"name": "extensionNumber",
"value": "1717"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "blacklistProfile",
"href": "/api/customers/K0002/blacklist-profiles/77"
}, {
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/012345ABCDEF"
}]
}
Then I should receive HTTP/1.1 200 OK /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/77"
}, {
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/012345ABCDEF"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/ABCDEF012345"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "Primary device ABCDEF012345 must be on Phone Extension devices list",
"path": "primaryDevice",
"value": null
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "language",
"value": "en"
}, {
"name": "dialPrefix",
"value": "9"
}]
}
Then I should receive HTTP/1.1 200 OK /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"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "costCenter",
"value": "New Cost Center"
}]
}
Then I should receive HTTP/1.1 200 OK /api/customers/K0002/targets/routing-prefix/17
returns HTTP/1.1 200 OK
with following body:
{
"href": "/api/customers/K0002/targets/routing-prefix/17",
"links": [{
"rel": "devices",
"href": "/api/customers/K0002/targets/routing-prefix/17/devices"
}, {
"rel": "inboundTrunkNumbers",
"href": "/api/customers/K0002/targets/routing-prefix/17/inbound-trunk-numbers"
}, {
"rel": "blacklistProfile",
"href": "/api/customers/K0002/blacklist-profiles/5"
}, {
"rel": "availableBlacklistProfiles",
"href": "/api/customers/K0002/blacklist-profiles"
}],
"data": [{
"name": "extensionNumber",
"value": "17"
}, {
"name": "displayName",
"value": "Routing Prefix Extension"
}, {
"name": "language",
"value": "de"
}, {
"name": "costCenter",
"value": "New Cost Center"
}, {
"name": "dialPrefix",
"value": null
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"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"
}]
}
/api/customers/K0002/targets/routing-prefix/17
returns HTTP/1.1 200 OK
with following body:
{
"data": [{
"name": "dialPrefix",
"value": "0"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "blacklistProfile",
"href": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Blacklist Profile cannot be null",
"path": "blacklistProfile",
"value": null
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": null
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Primary Device cannot be null if there are attached devices",
"path": "primaryDevice",
"value": null
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "displayName",
"value": "New Routing Prefix Extension"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0002]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "blacklistProfile",
"href": "/api/customers/K0003/blacklist-profiles/78"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/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"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "blacklistProfile",
"href": "/api/customers/K0003/blacklist-profiles/78"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"errors": [{
"message": "Given Blacklist Profile with ID 78 is not available for Customer K0002",
"path": "blacklistProfile"
}]
}
/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"
}]
}
/api/customers/K0003/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0003/devices/standard/012345ABCDEF"
}]
}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0002/targets/routing-prefix/17
returns HTTP/1.1 200 OK
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/ABCDEF012345"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/012345ABCDEF"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "Primary device 012345ABCDEF must be on Phone Extension devices list",
"path": "primaryDevice",
"value": null
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/routing-prefix/17
returns HTTP/1.1 200 OK
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/ABCDEF012345"
}]
}
/api/customers/K0002/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0003/devices/standard/012345ABCDEF"
}]
}
Then I should receive HTTP/1.1 400 Bad Request {
"detail": "Could not create or update resource due to constraint violations",
"title": "Validation error",
"errors": [{
"message": "Primary device 012345ABCDEF must be on Phone Extension devices list",
"path": "primaryDevice",
"value": null
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/routing-prefix/17
returns HTTP/1.1 200 OK
with following body:
{
"links": [{
"rel": "primaryDevice",
"href": "/api/customers/K0002/devices/standard/ABCDEF012345"
}]
}
/api/customers/K404/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{
"data": [{
"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"
}
/api/customers/K0002/targets/routing-prefix/404 as application/json; charset=UTF-8
with following body:
{
"data": [{
"name": "displayName",
"value": "Routing Prefix Extension"
}]
}
Then I should get HTTP/1.1 404 Not Found {
"detail": "routing prefix extension with extension number 404 has not been found",
"title": "Routing prefix extension not found",
"described_by": "http://api.nfon.net/probs/extension-not-found"
}
/api/customers/K0003/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}
/api/customers/K0003/targets/routing-prefix/17 as application/json; charset=UTF-8
with following body:
{}
Then I should receive HTTP/1.1 403 Forbidden {
"title": "Access forbidden",
"detail": "Access denied to [Customer] with id [K0003]",
"described_by": "http://api.nfon.net/probs/invalid-authorization"
}