# Get a service

`GET https://console.advinservers.com/api/v1/client/billing/managed-services/{service}`

### Overview

Returns current billing details for one service, using the same fields as the service list. Use the account's numeric service ID, not a UUID.

### Permissions

Requires the `billing.read` (View billing) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Path parameters

- `service` (string, required): The service ID returned by the billing endpoints.

## Response 200

The record, as a JSON object. There is no envelope.

- `service_id` (integer, required): The service id ID.
- `name` (string, required): The name shown to customers.
- `hostname` (string | null, required): The fully qualified hostname.
- `status` (string | null, required): The value of `status`.
- `billing_cycle` (string | null, required): How often the service renews and is billed.
- `recurring_amount` (string | null, required): The amount charged each billing cycle.
- `currency` (string | null, required): The three-letter currency code used for monetary amounts.
- `server_id` (string | null, required): The server id ID.
- `next_due_date` (string | null, required): The value of `next_due_date`.
- `period` (object | null, required): The value of `period`.
  - `starts_at` (string, required): The date and time for starts at, in UTC.
  - `ends_at` (string, required): The date and time for ends at, in UTC.
  - `total_days` (integer, required): The value of `total_days`.
  - `days_remaining` (integer, required): The value of `days_remaining`.
  - `days_overdue` (integer, required): Zero rather than a negative `days_remaining`, so a caller never has to decide which of the two fields to believe.
  - `remaining_fraction` (number, required): The share of the period still to run.
  - `state` (string, required): `healthy`, `due_soon`, `critical` or `overdue`, named on the server so every surface showing a term agrees about when one has become worth worrying about.
- `autopay` (boolean, required): Whether anything will be charged automatically. The tick or the cross in the Autopay column.
- `autopay_ending` (boolean, required): Autopay that has been turned off but has not stopped yet. Its own state, drawn between the tick and the cross.
- `subscription` (object | null, required): The value of `subscription`.
  - `uuid` (string, required): The uuid UUID.
  - `uuid_short` (string, required): The value of `uuid_short`.
  - `status` (string, required): The payment provider's current status.
  - `next_charge_at` (string | null, required): Null once nothing further will be charged, including for a subscription that is merely winding down.
  - `ends_at` (string | null, required): When an agreed cancellation actually takes effect.
  - `amount` (string | null, required): Excludes tax.
  - `currency` (string | null, required): The three-letter currency code used for monetary amounts.
  - `paypal_account` (string | null, required): The email address of the saved PayPal account it is charged to, when it is one.
  - `payment_card` (string | null, required): The saved card it is charged to, such as "Visa ending 4242", when it is one.
- `cancellation` (object | null, required): The value of `cancellation`.
  - `requested_at` (string | null, required): The date and time for requested at, in UTC.
  - `type` (string | null, required): The type of operation or resource.
  - `type_label` (string | null, required): The value of `type_label`.
  - `reason` (string | null, required): The value of `reason`.
- `can_start_subscription` (boolean, required): Whether the customer can start subscription.
- `can_cancel_subscription` (boolean, required): Whether the customer can cancel subscription.
- `can_change_cycle` (boolean, required): Whether the customer can change cycle.
- `can_cancel_service` (boolean, required): Whether the customer can cancel service.
- `can_withdraw_cancellation` (boolean, required): Whether the customer can withdraw cancellation.
- `immediate_refund` (string | null, required): What stopping this service today would put back on the account, in the currency beside it.
- `pays_from_credit` (boolean, required): Whether renewals of this service are paid out of the account's credit balance where there is one. True unless the customer has turned it off, which is what the balance does by default.
- `can_change_credit` (boolean, required): Whether that can be changed from here. False where the installation does not offer account credit at all, or cannot enforce the answer per service.
- `autopay_provider` (string | null, required): The value of `autopay_provider`.
- `autopay_details` (string | null, required): The value of `autopay_details`.
- `suspension_reason` (string | null, required): The value of `suspension_reason`.
- `autopay_by_account` (boolean, required): Whether it is charged because automatic payments are on for the whole account, which is where they are turned off.
- `credit_by_account` (boolean, required): Whether the credit setting is the account's, chosen on Billing while automatic payments are on for the whole account, rather than this service's own.
- `postpaid_monthly_price` (string | null, required): The value of `postpaid_monthly_price`.

```json
{
  "service_id": 7312,
  "name": "Standard 4 GB",
  "hostname": "lambda-core.blackmesa.example.com",
  "status": "Active",
  "billing_cycle": "Monthly",
  "recurring_amount": "12.00",
  "currency": "USD",
  "server_id": "ecc6f4f1",
  "next_due_date": "2026-10-02",
  "period": {
    "starts_at": "2026-09-02",
    "ends_at": "2026-10-02",
    "total_days": 30,
    "days_remaining": 18,
    "days_overdue": 0,
    "remaining_fraction": 0.6,
    "state": "healthy"
  },
  "autopay": true,
  "autopay_ending": false,
  "subscription": {
    "uuid": "a216c52c-ccea-430f-b3bf-09aaf1025a44",
    "uuid_short": "Uuid short",
    "status": "active",
    "next_charge_at": "2026-10-02T19:15:08+00:00",
    "ends_at": null,
    "amount": "12.00",
    "currency": "USD",
    "paypal_account": "Paypal account",
    "payment_card": "Payment card"
  },
  "cancellation": null,
  "can_start_subscription": false,
  "can_cancel_subscription": true,
  "can_change_cycle": true,
  "can_cancel_service": true,
  "can_withdraw_cancellation": false,
  "immediate_refund": "7.20",
  "pays_from_credit": true,
  "can_change_credit": true,
  "autopay_provider": "card",
  "autopay_details": "active",
  "suspension_reason": null,
  "autopay_by_account": true,
  "credit_by_account": true,
  "postpaid_monthly_price": null
}
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/billing/managed-services/{service}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
