# Subscriptions
NOTE
The URI for the API endpoint is often the same for multiple endpoints, the difference being in HTTP methods.
# List Subscriptions
GET https://api.wolfeo.me/v1/subscriptions
Returns a paginated list of subscriptions, ordered by most recent first.
# Example Request
curl --request GET "https://api.wolfeo.me/v1/subscriptions?status=active&per_page=25" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| period | string | Time range to filter by (see possible values below) |
| range | string | Custom date range — only used when period=between |
| status | string | Filter by status: active, inactive, error |
| page | integer | Page number (default: 1) |
| per_page | integer | Results per page — max 100 (default: 50) |
# Possible values for period
| Value | Description |
|---|---|
all | All subscriptions ever |
today | Subscriptions created today |
yesterday | Subscriptions created yesterday |
last7days | Subscriptions created in the last 7 days |
last30days | Subscriptions created in the last 30 days |
between | Custom date range (requires range) |
# Sample Return
{
"success": true,
"data": [
{
"id": 12,
"id_customer": 133,
"email": "john@doe.ie",
"firstname": "John",
"lastname": "Doe",
"status": "active",
"name": "Pro mensuel",
"amount": 97.00,
"currency": "EUR",
"payment_source": "stripe",
"rate": "1 month(s)",
"trial": false,
"payments_left": "unlimited",
"rebill_date": "2024-08-01 00:00:00",
"created_at": "2024-01-01T09:00:00.000000Z"
}
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 50,
"total": 127
}
}
TIP
payments_left is either "unlimited" or an integer representing the number of remaining billing cycles.
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| INVALID_STATUS | 400 | Invalid status value |
| INVALID_PERIOD | 400 | Invalid period or missing range |
# Retrieve Subscription
GET https://api.wolfeo.me/v1/subscription
# Example Request
curl --request GET "https://api.wolfeo.me/v1/subscription?subscription_id=12" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| subscription_id* | integer | The subscription ID |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"id": 12,
"id_customer": 133,
"email": "john@doe.ie",
"firstname": "John",
"lastname": "Doe",
"status": "active",
"name": "Pro mensuel",
"amount": 97.00,
"currency": "EUR",
"payment_source": "stripe",
"rate": "1 month(s)",
"trial": false,
"payments_left": "unlimited",
"rebill_date": "2024-08-01 00:00:00",
"created_at": "2024-01-01T09:00:00.000000Z"
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Subscription not found |
# What's next
- Contacts — manage contacts, tags, and sequences
- Orders — retrieve orders and revenue data
- Financials — transactions, invoices, credit notes
← Orders Custom Fields →