Endpoint
GET /api/v1/services
Returns a paginated list of hosting services (and other product subscriptions) associated with the authenticated client.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status |
string | Filter by status: active, suspended, pending, cancelled |
page |
integer | Page number (default: 1) |
per_page |
integer | Results per page (default: 15, max: 100) |
Request Examples
List all services:
curl "https://billing.example.com/api/v1/services" \
-H "Authorization: Bearer {your-token}"
List only active services:
curl "https://billing.example.com/api/v1/services?status=active" \
-H "Authorization: Bearer {your-token}"
Paginate with 25 per page:
curl "https://billing.example.com/api/v1/services?per_page=25&page=2" \
-H "Authorization: Bearer {your-token}"
Response
{
"data": [
{
"id": 101,
"name": "Starter Hosting",
"domain": "mysite.com",
"status": "active",
"product_name": "Starter Hosting Plan",
"billing_cycle": "monthly",
"amount": 500,
"currency_code": "USD",
"next_due_date": "2026-05-01",
"created_at": "2025-04-01T10:00:00Z"
},
{
"id": 102,
"name": "Business Email",
"domain": "mysite.com",
"status": "active",
"product_name": "Business Email Add-on",
"billing_cycle": "annually",
"amount": 4800,
"currency_code": "USD",
"next_due_date": "2027-04-01",
"created_at": "2025-04-01T10:05:00Z"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 2
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id |
integer | Unique service ID |
name |
string | Service display name |
domain |
string | Primary domain for this service, or null |
status |
string | active, suspended, pending, or cancelled |
product_name |
string | Name of the product this service is based on |
billing_cycle |
string | monthly, quarterly, semi_annually, annually, biennially, triennially |
amount |
integer | Recurring amount in the smallest currency unit (e.g., cents) |
currency_code |
string | Three-letter ISO currency code |
next_due_date |
string | ISO 8601 date when the next invoice is due |
created_at |
string | ISO 8601 timestamp when the service was created |
[!IMPORTANT]
amountis in the smallest currency unit. For USD,500means $5.00. Divide by 100 for display purposes with two-decimal currencies.
Status Values
| Status | Meaning |
|---|---|
active |
Service is active and running |
pending |
Awaiting provisioning after purchase |
suspended |
Suspended — typically due to an unpaid invoice |
cancelled |
Cancelled and deprovisioned |
[!TIP] Filter by
status=suspendedto build a dashboard alert that highlights services at risk of termination due to non-payment.