import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_revenue(customer_names=["c_123", "c_456"])
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getRevenue({
client,
throwOnError: true,
query: { customerNames: ['c_123', 'c_456'] },
});
curl "https://app.weflayr.com/api/revenue/?customer_names=c_123&customer_names=c_456" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"rows": [
{"revenue_id": "b3f2b160-6e12-4f1a-9c3d-0a2e7c9b5d41", "customer_name": "c_123", "metric_name": "revenue", "month": "2026-06", "amount": 1200.5, "source": "api"},
{"revenue_id": "f7a1d8e0-9b3c-4a2f-8e6d-1c4b7a9f2e05", "customer_name": "c_123", "metric_name": "revenue", "month": "2026-06", "amount": 300.0, "source": "stripe"},
{"revenue_id": "a1c9e4d2-7b60-4f8a-9e2d-3c4b7a9f1e08", "customer_name": "c_456", "metric_name": "revenue", "month": "2026-06", "amount": 800.0, "source": "api"}
],
"next_cursor": null,
"has_more": false
}
Revenue
Get revenue
List the revenue of each customer, per month.
GET
/
api
/
revenue
/
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_revenue(customer_names=["c_123", "c_456"])
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getRevenue({
client,
throwOnError: true,
query: { customerNames: ['c_123', 'c_456'] },
});
curl "https://app.weflayr.com/api/revenue/?customer_names=c_123&customer_names=c_456" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"rows": [
{"revenue_id": "b3f2b160-6e12-4f1a-9c3d-0a2e7c9b5d41", "customer_name": "c_123", "metric_name": "revenue", "month": "2026-06", "amount": 1200.5, "source": "api"},
{"revenue_id": "f7a1d8e0-9b3c-4a2f-8e6d-1c4b7a9f2e05", "customer_name": "c_123", "metric_name": "revenue", "month": "2026-06", "amount": 300.0, "source": "stripe"},
{"revenue_id": "a1c9e4d2-7b60-4f8a-9e2d-3c4b7a9f1e08", "customer_name": "c_456", "metric_name": "revenue", "month": "2026-06", "amount": 800.0, "source": "api"}
],
"next_cursor": null,
"has_more": false
}
On an internal project, use Get key metrics instead: this route is not refused there, it returns the revenue rows only, normally none.
Parameters
Passed in the query string.string[]
The customers whose revenue to get. Omit for every customer.
integer
default:"100"
Number of rows per page. Max
1000.string
The route is paginated: pass the previous page’s
next_cursor, as is, to get the next page. has_more says whether another page exists.import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_revenue(customer_names=["c_123", "c_456"])
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getRevenue({
client,
throwOnError: true,
query: { customerNames: ['c_123', 'c_456'] },
});
curl "https://app.weflayr.com/api/revenue/?customer_names=c_123&customer_names=c_456" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"rows": [
{"revenue_id": "b3f2b160-6e12-4f1a-9c3d-0a2e7c9b5d41", "customer_name": "c_123", "metric_name": "revenue", "month": "2026-06", "amount": 1200.5, "source": "api"},
{"revenue_id": "f7a1d8e0-9b3c-4a2f-8e6d-1c4b7a9f2e05", "customer_name": "c_123", "metric_name": "revenue", "month": "2026-06", "amount": 300.0, "source": "stripe"},
{"revenue_id": "a1c9e4d2-7b60-4f8a-9e2d-3c4b7a9f1e08", "customer_name": "c_456", "metric_name": "revenue", "month": "2026-06", "amount": 800.0, "source": "api"}
],
"next_cursor": null,
"has_more": false
}