List Numbers
const url = 'https://api.customer.onsim.uk/v1/numbers?state=regular';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.customer.onsim.uk/v1/numbers?state=regular' \ --header 'x-api-key: <x-api-key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The state of the Numbers to list. One request gives the Numbers of one state.
Responses
Section titled “Responses”OK
A Number, as a list gives it. Get the Number for what takes its calls and who shows it.
object
The ID of the Number: its digits, with the country code and no plus.
The digits of the Number, with the country code and no plus.
The country of the Number, in English. A number of no one country has none.
The area of the Number.
mobile for a mobile number. landline for every other.
regular when an extension takes the calls to the Number. legacy for a Number from before app.onsim, which cannot move to another holder. unassigned when nothing takes its calls.
Example
[ { "type": "mobile", "state": "regular" }]The request is not valid
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}The API key is missing or not valid, or: This request is not permitted
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}The request is too large
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}Too many requests, or: The daily quota is used up
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}The request failed
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}Your records are not available now
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}The request took too long
An error, as RFC 9457 Problem Details.
object
A URI that names the kind of error. It is also a page of the docs.
A short summary of the kind of error.
The HTTP status.
What went wrong in this request.
Each parameter that is not valid. Only an invalid-request error has it.
object
The parameter that is not valid.
Why it is not valid.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "detail": "example" } ]}