suppressLineNo possible values are: DEFAULT(use the trunk setting), ON, OFF
When I send/api/customers/K0002/devices/external-line/device123 with application/json; charset=UTF-8 {
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/site"
}],
"data": [{
"name": "suppressLineno",
"value": "DEFAULT"
}, {
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}
Then I should receive HTTP/1.1 204 No Content
/api/customers/K0002/devices/external-line/device123 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/devices/external-line/device123",
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/site"
}],
"data": [{
"name": "suppressLineno",
"value": DEFAULT
}, {
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}
suppressLineNo possible values are: DEFAULT(use the trunk setting), ON, OFF
When I send/api/customers/K0002/devices/external-line/device123 with application/json; charset=UTF-8 {
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/site"
}],
"data": [{
"name": "suppressLineno",
"value": "DEFAULT"
}, {
"name": "associatedMobilePhoneNumber",
"value": "+9999999999"
}]
}
Then I should receive HTTP/1.1 400 Bad Request
/api/customers/K0002/devices/external-line/device123 with application/json; charset=UTF-8 {
"data": [{
"name": "concurrentLines",
"value": 8
}, {
"name": "setE164DidInTo",
"value": true
}]
}
Then I should receive HTTP/1.1 400 Bad Request
with following body:
{
"errors": [{
"message": "Invalid field.",
"path": "concurrentLines"
}]
}
/api/customers/K0002/devices/external-line/device123 with application/json; charset=UTF-8 {
"data": [{
"name": "concurrentLines",
"value": 8
}, {
"name": "setE164DidInTo",
"value": false
}, {
"name": "cidScreening",
"value": "ALLOW_ANY"
}]
}
Then I should receive HTTP/1.1 204 No Content
/api/customers/K0002/devices/external-line/device123 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/devices/external-line/device123",
"data": [{
"name": "concurrentLines",
"value": 8
}, {
"name": "setE164DidInTo",
"value": false
}]
}
/api/customers/K0002/devices/external-line/device123 with application/json; charset=UTF-8 {
"links": [{
"rel": "site",
"href": "/api/customers/K0003/sites/site"
}]
}
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": "Site not allowed",
"detailMessage": "Site [site] is not reachable for customer [K0002]",
"path": "site",
"value": null
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/devices/external-line/device123 HTTP/1.1 200 OK {
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/1"
}]
}
/api/customers/K0002/devices/external-line/device123
with application/json; charset=UTF-8 {
"links": [{
"rel": "site",
"href": "/api/customers/K0002/sites/not_existing"
}]
}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
"detail": "Site [not_existing] not found for Customer [K0002]",
"described_by": "http://api.nfon.net/probs/site-not-found"
}
/api/customers/K0002/devices/external-line/ABCDEF012345 with application/json; charset=UTF-8 {}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
"title": "Device not found",
"detail": "Device with unique identifier ABCDEF012345 has not been found",
"described_by": "http://api.nfon.net/probs/device-not-found"
}
/api/customers/K0404/devices/external-line/device123
with application/json; charset=UTF-8 {}
Then I should receive HTTP/1.1 404 Not Found
with following body:
{
"described_by": "http://api.nfon.net/probs/customer-not-found",
"title": "Customer not found",
"detail": "Customer with identifier K0404 has not been found"
}
/api/customers/K0002/devices/xcapi/device123
with application/json; charset=UTF-8 {}
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/K0003/devices/external-line/device123
with application/json; charset=UTF-8 {}
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/devices/external-line/device123
with application/json; charset=UTF-8 {}
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"
}