suppressLineNo possible values are: DEFAULT(use the trunk setting), ON, OFF
When I send/api/customers/K0002/devices/external-line with application/json; charset=UTF-8 {
"links": [{
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/External%20Line"
}, {
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}],
"data": [{
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}, {
"name": "suppressLineno",
"value": "DEFAULT"
}, {
"name": "setE164DidInTo",
"value": false
}, {
"name": "cidScreening",
"value": "ALLOW_ANY"
}, {
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/devices?_q=External%20Line HTTP/1.1 200 OK {
"offset": 0,
"total": 1,
"size": 1,
"links": [],
"items": [{
"links": [],
"data": [{
"name": "deviceType",
"value": "External Line"
}, {
"name": "active",
"value": true
}, {
"name": "deviceMasterCategory",
"value": "FMC"
}, {
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}]
}
/api/customers/K0002/devices/external-line with application/json; charset=UTF-8 {
"links": [{
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/External%20Line"
}, {
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}],
"data": [{
"name": "associatedMobilePhoneNumber",
"value": "+1232456789"
}, {
"name": "suppressLineno",
"value": "DEFAULT"
}, {
"name": "setE164DidInTo",
"value": false
}, {
"name": "cidScreening",
"value": "ALLOW_ANY"
}]
}
Then I should receive HTTP/1.1 400 Bad Request
/api/customers/K0002/devices/external-line
with application/json; charset=UTF-8 {
"links": [{
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/External%20Line"
}, {
"rel": "site",
"href": "/api/customers/K0003/sites/anotherSite"
}],
"data": [{
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}
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 [anotherSite] 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
with application/json; charset=UTF-8 {
"links": [{
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/External%20Line"
}, {
"rel": "site",
"href": "/api/customers/K0002/sites/not-existing"
}],
"data": [{
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}
Then I should receive HTTP/1.1 404 Not Found {
"detail": "Site [not-existing] not found for Customer [K0002]",
"described_by": "http://api.nfon.net/probs/site-not-found"
}
/api/customers/K0404/devices/external-line
with application/json; charset=UTF-8 {
"links": [{
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/External%20Line"
}, {
"rel": "site",
"href": "/api/customers/K0002/sites/a062000000HbAsd"
}],
"data": [{
"name": "associatedMobilePhoneNumber",
"value": "+1234567890333"
}]
}
Then I should receive HTTP/1.1 404 Not Found {
"title": "Customer not found",
"detail": "Customer with identifier K0404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}