/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/targets/phone-extensions/201/lync/134 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/phone-extensions/201/lync/134",
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}, {
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/LYNC"
}],
"data": [{
"name": "extensionNumber",
"value": "201"
}, {
"name": "inboundNumber",
"value": "+48 (22) 1111-119"
}, {
"name": "lync",
"value": "Lync Site"
}]
}
And there is attached Lync Softphone Device
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/targets/phone-extensions/201/lync/134 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/phone-extensions/201/lync/134",
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}, {
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/LYNC"
}],
"data": [{
"name": "extensionNumber",
"value": "201"
}, {
"name": "inboundNumber",
"value": "+48 (22) 1111-119"
}, {
"name": "lync",
"value": "Lync Site"
}]
}
And there is attached Lync Softphone Device
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/targets/phone-extensions/201/lync/134 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/phone-extensions/201/lync/134",
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}],
"data": [{
"name": "extensionNumber",
"value": "201"
}, {
"name": "inboundNumber",
"value": "+48 (22) 1111-119"
}, {
"name": "lync",
"value": "Lync Site"
}]
}
And there is attached Lync Softphone Device
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/targets/phone-extensions/201/lync/134 HTTP/1.1 200 OK {
"href": "/api/customers/K0002/targets/phone-extensions/201/lync/134",
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}, {
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/LYNC"
}],
"data": [{
"name": "extensionNumber",
"value": "201"
}, {
"name": "inboundNumber",
"value": "+48 (22) 1111-119"
}, {
"name": "lync",
"value": "Lync Site"
}]
}
And there is attached Lync Softphone Device
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 201 Created
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}, {
"rel": "deviceType",
"href": "/api/customers/K0002/device-types/LYNC"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "PhoneExtension 201 has already Lync Option assigned"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": []
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "Value must be provided",
"path": "lyncSite"
}, {
"message": "Value must be provided",
"path": "inboundTrunkNumber"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/phone-extensions/301/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "Inbound Trunk Number does not belong to PhoneExtension 301",
"path": "inboundTrunkNumber",
"value": null
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "Customer contract type does not allow to add more Devices"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0002/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 400 Bad Request application/api-problem+json {
"title": "Validation error",
"detail": "Could not create or update resource due to constraint violations",
"errors": [{
"message": "Cannot add more devices to a phone extension in this contract type exception",
"path": "phones"
}],
"described_by": "http://api.nfon.net/probs/validation-error"
}
/api/customers/K0404/targets/phone-extensions/201/lync as application/json; charset=UTF-8
with following body:
{
"links": [{
"rel": "lyncSite",
"href": "/api/customers/K0002/lync/sites/500"
}, {
"rel": "inboundTrunkNumber",
"href": "/api/customers/K0002/targets/phone-extensions/201/inbound-trunk-numbers/0048.22.1111-119"
}]
}
Then I should receive HTTP/1.1 404 Not Found application/api-problem+json {
"title": "Customer not found",
"detail": "Customer with identifier K0404 has not been found",
"described_by": "http://api.nfon.net/probs/customer-not-found"
}