Skip to main content

financialAnalytics

Requires at least one of the permissions analytics:invoices:read or analytics:payments:read.

Financial analytics for a period. Limited to the customers you may see.. Needs the invoices or payments analytics read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query FinancialAnalytics($period: AnalyticsPeriod!) {
financialAnalytics(period: $period) {
accountsPayable
accountsReceivable
cashFlow
expenses
grossMargin
profit
profitByCategory {
categoryName
categoryId
cost
margin
profit
revenue
}
}
}

Variables:

{
"period": "LAST_6_MONTHS"
}

Response:

{
"data": {
"financialAnalytics": {
"accountsPayable": 0,
"accountsReceivable": 0,
"cashFlow": 0,
"expenses": 0,
"grossMargin": 0,
"profit": 0,
"profitByCategory": [
{
"categoryName": "string",
"categoryId": "string",
"cost": 0,
"margin": 0,
"profit": 0,
"revenue": 0
}
]
}
}
}
financialAnalytics(
currency: String
period: AnalyticsPeriod!
): FinancialAnalytics!

Arguments​

financialAnalytics.currency ● String scalar​

Does not change the figures: totals are always reported in the organization's base currency.

financialAnalytics.period ● AnalyticsPeriod! non-null enum​

The reporting period to analyse.

Type​

FinancialAnalytics object​

Financial figures for the period.