Skip to content

Get the Services of an Identity

GET
/v1/services/{id}
curl --request GET \
--url https://api.customer.onsim.uk/v1/services/1 \
--header 'x-api-key: <x-api-key>'
id
required
integer

The ID of the Identity: of a User, a Hunt Group or an IVR.

OK

Media typeapplication/json
Array<object>

Something that an Identity has: a plan, a data allowance, call recording.

object
id
required

The ID of the Service. It is the same for every Identity that has the Service.

integer
type
required

The section of the Services tab that holds it: plan, data, recording, ai_insights or other. More values can come.

string
name
required

The name, as app.onsim shows it.

string
description

What the Service gives, as app.onsim shows it.

string
status
required

pending when the Service has not started yet. A pending Service takes the place of an active one of the same type.

string
Allowed values: active pending
starts_at

When the Service started, or will start. It is not there when the start is not known.

string format: date-time
ends_at

When the Service stops. A Service with no end runs until someone changes it.

string format: date-time
records

Only on a recording Service: what the Identity records.

object
calls
required

True when the calls of the Identity are recorded.

boolean
messages

True when the messages of the Identity are recorded. It is not there when we cannot read it at the time of the request.

boolean
price

What the Service costs. It is not there when the Service has no fee, as for a Hunt Group.

object
amount
required

The money for each period, with no tax. 0 for a Service that costs nothing.

number
currency
required

The currency of amount, as an ISO 4217 code, such as GBP.

string
period
required

The billing period of amount. More values can come.

string
Allowed values: month
Example
[
{
"status": "active",
"price": {
"period": "month"
}
}
]

The request is not valid

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
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

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

No such resource

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The request is too large

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

Too many requests, or: The daily quota is used up

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The request failed

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

Your records are not available now

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The request took too long

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}