Revenue per month, recurring revenue, what is owed and the top customers
const url = 'https://api.motenya.app/v1/products/example/insights/overview';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.motenya.app/v1/products/example/insights/overview \ --header 'Authorization: Bearer <token>'Requires crm:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Months of history, 1–36 (default 12).
Months of history, 1–36 (default 12).
Responses
Section titled “Responses”Success
Per currency, never converted. Paid means not canceled or refunded, and paid or with no payment status.
object
object
“YYYY-MM”, UTC.
object
object
object
object
object
object
object
object
Contacts in the CRM.
Clients in the CRM.
Customers whose first order (not canceled or refunded) was placed in each month, oldest first: a client, or a contact for orders without one.
object
“YYYY-MM”, UTC.
Example generated
{ "revenue": [ { "month": "example", "currency": "example", "amount": "example" } ], "lifetimeRevenue": [ { "currency": "example", "amount": "example" } ], "outstanding": [ { "currency": "example", "amount": "example" } ], "overdue": [ { "currency": "example", "amount": "example" } ], "mrr": [ { "currency": "example", "amount": "example" } ], "activeSubscriptions": 1, "subscriptionMovements": [ { "month": "example", "started": 1, "canceled": 1 } ], "topCustomers": [ { "client": { "id": "example", "name": "example", "email": "example" }, "contact": { "id": "example", "name": "example", "email": "example" }, "currency": "example", "amount": "example", "orderCount": 1 } ], "contactCount": 1, "clientCount": 1, "newCustomers": [ { "month": "example", "count": 1 } ]}Invalid request
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing, invalid, revoked or expired API key
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing scope, API turned off, published article without publish scope, or account suspended
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Not found, or outside the knowledge bases this key may use
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Slug or translation already exists
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rejected by validation (e.g. unknown language or category)
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rate limited; see Retry-After
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Internal error