Skip to content

Number

A phone number that you own.

app.onsim.uk/team/numbers/442079460123
442079460123number
United Kingdomcountry
Inbound
Support300
inbound
Outbound
outbound
FieldTypeWhat it isOn app.onsim
idstringThe ID of the Number: its digits, with the country code and no plus.The number itself.
numberstringThe digits of the Number, with the country code and no plus.The number beside the mark. It is also in the address of the page.
countryoptionalstringThe country of the Number, in English. A number of no one country has none.The Country column.
areaoptionalstringThe area of the Number.Not shown.
type"mobile" | "landline"mobile for a mobile number. landline for every other.The Type badge on the page of the Number: Mobile or Landline.
state"regular" | "legacy" | "unassigned"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.A Legacy Number has a lock on its page.
inboundoptionalPartyWhat takes the calls to the Number: a User, a Hunt Group or an IVR, by its extension. A line with no extension shows by its account. A Number that nothing takes the calls of has none.The Inbound column. It is empty when nothing takes the calls.
outboundlist of PartyEach User that shows the Number on the calls that they make, by its extension.The Outbound column: the Users that show the Number.

Calls come in on a Number, and one thing takes them: inbound. Calls go out from each User that shows the Number: outbound. A User can show a Number that it does not hold, such as the Number of a Hunt Group.

Each is a Party, the object that the whole API uses to point at someone. Most have an extension, which a User, a Hunt Group and an IVR also have. A line with no extension that takes the calls of a Number has an account.

{
"id": "442079460123",
"number": "442079460123",
"country": "United Kingdom",
"area": "London",
"type": "landline",
"state": "regular",
"inbound": {
"extension": "300"
},
"outbound": [
{
"extension": "201"
},
{
"extension": "203"
}
]
}

The list gives the Numbers of one state, so it needs state: regular, legacy or unassigned. To get every Number, ask one time for each state.

Terminal window
curl "https://api.customer.onsim.uk/v1/numbers?state=regular" \
-H "x-api-key: $ONSIM_API_KEY"

The list gives each one with id, number, country, area, type and state only. The get gives every field.