Api >

Service Portal REST API

GET retrieves available Snom Transfer
Given I am authenticated
When I send /api/customers/K0002/snom-transfer
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers/K0002/snom-transfer",
  "items": [{
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "ON"
    }]
  }, {
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "OFF"
    }]
  }, {
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "MIXED"
    }]
  }],
  "links": null
}
Missing Customer
Given I am authenticated as Admin
When I send /api/customers/K404/snom-transfer
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Customer not found",
  "detail": "Customer with identifier K404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
Customer can access Snom Transfer
Given I am authenticated as Customer K0002
When I send /api/customers/K0002/snom-transfer
Then I should receive HTTP/1.1 200 OK
And Content-Type header should be application/vnd.collection.next+json
with following body:
{
  "href": "/api/customers/K0002/snom-transfer",
  "items": [{
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "ON"
    }]
  }, {
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "OFF"
    }]
  }, {
    "href": null,
    "links": [],
    "data": [{
      "name": "name",
      "value": "MIXED"
    }]
  }],
  "links": null
}