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 booked per customer and 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, go to Manage Key metrics instead.
Parameters
Passed in the query string.list[string]
Specify the names of the customers from which revenue should be fetched. Not setting it means “all customers”.
integer
default:"100"
Numbers of rows to fetch. Max
1000.string
The route is paginated: pass the previous page’s
next_cursor to fetch the next page. PS: has_more from the output 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
}