# Orders
NOTE
The URI for the API endpoint is often the same for multiple endpoints, the difference being in HTTP methods.
# List Orders
GET https://api.wolfeo.me/v1/orders
Returns a paginated list of orders, ordered by most recent first.
# Example Request
curl --request GET "https://api.wolfeo.me/v1/orders?period=last30days&status=completed" \
--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 order status (see possible values below) |
| page | integer | Page number (default: 1) |
| per_page | integer | Results per page — max 100 (default: 50) |
# Possible values for period
| Value | Description |
|---|---|
all | All orders ever |
today | Orders placed today |
yesterday | Orders placed yesterday |
last7days | Orders placed in the last 7 days |
last30days | Orders placed in the last 30 days |
between | Custom date range (requires range) |
# Possible values for status
| Value | Description |
|---|---|
completed | Successfully paid |
waiting | Pending payment |
cancelled | Cancelled |
refunded | Refunded |
# Sample Return
{
"success": true,
"data": [
{
"id": 1725,
"id_order": "FI4629U0-1773595409",
"id_customer": 679,
"email": "john@doe.ie",
"firstname": "John",
"lastname": "Doe",
"type": "Stripe",
"status": "completed",
"amount": 297.00,
"currency": "USD",
"created_at": "2024-01-01T09:00:00.000000Z"
}
],
"meta": {
"current_page": 1,
"last_page": 24,
"per_page": 50,
"total": 1180
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| INVALID_STATUS | 400 | Invalid status value |
| INVALID_PERIOD | 400 | Invalid period or missing range |
# Retrieve Order
GET https://api.wolfeo.me/v1/order
# Example Request
curl --request GET "https://api.wolfeo.me/v1/order?id_order=FI4629U0-1773595409" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| id_order* | string | The order's string identifier |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"id": 1725,
"id_order": "FI4629U0-1773595409",
"id_customer": 679,
"email": "john@doe.ie",
"firstname": "John",
"lastname": "Doe",
"type": "Stripe",
"status": "completed",
"amount": 297.00,
"currency": "USD",
"created_at": "2024-01-01T09:00:00.000000Z"
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Order not found |
# Retrieve Sales Amount
GET https://api.wolfeo.me/v1/sales-amount
Returns the total revenue from completed and pending orders over a given time range.
# Example Request
curl --request GET "https://api.wolfeo.me/v1/sales-amount?period=last30days" \
--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 |
* denotes a required parameter
# Possible values for period
| Value | Description |
|---|---|
all | All orders ever |
today | Orders placed today |
yesterday | Orders placed yesterday |
last7days | Orders placed in the last 7 days |
last30days | Orders placed in the last 30 days |
between | Custom date range (requires range) |
# Format for range
Pass two dates separated by to:
2023-06-01to2023-06-29
# Example URLs
https://api.wolfeo.me/v1/sales-amount?period=all
https://api.wolfeo.me/v1/sales-amount?period=today
https://api.wolfeo.me/v1/sales-amount?period=last7days
https://api.wolfeo.me/v1/sales-amount?period=between&range=2023-06-01to2023-06-29
# Sample Return
[
{
"amount": 1234.56
}
]
TIP
amount is the sum in the account's default currency, rounded to 2 decimal places.
WARNING
This endpoint does not yet follow the standard {"success": true, "data": ...} envelope. Errors return {"success": false} with an HTTP 400 or 401 status and no error object.
← Funnels Subscriptions →