Learn how to generate custom statistics for charts and reports.

Overview

The Monite analytics empowers users with real-time insights into their accounts payable processes. It provides aggregated data with detailed breakdowns, filterws, and metrics to help finance managers make data-driven decisions efficiently.

Roles and permissions

To access the analytics using an entity user token, this user must have a role with the payables.read permission.

If a partner-level token is used, no special permissions are needed.

Dimensions and metrics

When working with analytics, dimensions and metrics are fundamental concepts that define how data is structured and presented.

Dimensions

Dimensions are attributes or categories used to group, segment, or filter data. They provide the “context” for the data and are often non-numeric. In charts, dimensions appear as labels for categories or axes. Dimensions help users answer questions like:

  • “How many payables were paid in Q3?"
  • "Which counterpart contributed the most to revenue last year?”

Metrics

Metrics are quantitative measures used to calculate and display data values. They represent the “what” of the data and are always numerical. Metrics often appear as values or data points within a chart. Metrics allow users to evaluate performance, such as:

  • “What was the total overdue amount last month?"
  • "What is the average payment delay for supplier invoices?”

How they work together

Dimensions and metrics are interconnected. Dimensions provide the framework, while metrics fill that framework with measurable values. For example:

  • Chart example: A bar chart showing “Average payment delay” (metric) broken down by “Month” (dimension).
  • Table example: A data table showing “Payable Count” (metric) grouped by “Counterpart name” (dimension).

This combination ensures that users not only see the numbers but also understand the context, enabling better decision-making.

Retrieve aggregated analytics data

The GET /analytics/payables endpoint retrieves the aggregated analytics results for the payables. This endpoint enables users to access summarised data for various use cases, such as generating reports, visualising trends, or exporting metrics for a specified period.

The request fields are explained below:

ParameterDescriptionPossible values
metricAggregatable field from payables.id, total_amount
aggregation_functionHow the metric is aggregated.count, average, summary, min, max
dimensionThe payable field used to breakdown the result.created_at, status, counterpart_id, currency, issued_at, due_date, project_id
date_dimension_breakdownnIf a date-type field is passed as the dimension, you can specify here how the records should be grouped.daily, weekly, monthly, quarterly, yearly

Check the GET /analytics/payables endpoint for additional filters. You can also use any filters from GET /payables.

1curl -X GET 'https://api.sandbox.monite.com/v1/payables/analytics/payables?dimension=counterpart_id&metric=id&aggregation_function=count&date_dimension_breakdown=weekly' \
2 -H 'x-monite-version: 2025-05-25' \
3 -H 'Authorization: Bearer ACCESS_TOKEN' \
4 -H 'x-monite-entity-id: ENTITY_ID'

As a response, we will return not the payables models, but rather the metric values in each dimension.

1{
2 "data": [
3 {
4 "dimension_value": "counterpart_id",
5 "metric_value": 0
6 }
7 ]
8}

Example use cases

Here are some examples of aggregated results for specific use cases:

Average amount for payables of last week

Theese are the field values to get the average price of all payables from the last week:

  • metric = total_amount
  • aggregation_function = average
  • dimension = null - we want to extract just total as number without any breakdowns
  • created_at__gt = 01.11.2024 - or seven days ago
1curl -X GET 'https://api.sandbox.monite.com/v1/analytics/payables?metric=total_amount&aggregation_function=average&created_at__gt=2024-11-01' \
2 -H 'x-monite-version: 2025-05-25' \
3 -H 'Authorization: Bearer ACCESS_TOKEN' \
4 -H 'x-monite-entity-id: ENTITY_ID'

The response returns the total amount of payables:

1{
2 "data": [
3 {"metric_value": 106700, "dimension_value": null}
4 ]
5}

Number of payables in different statuses created last week

The field values to get the number of payables by status from last week:

  • metric = id
  • aggregation_function = count
  • dimension = status
  • created_at__gt = 07.10.2024 - or seven days ago
1curl -X GET 'https://api.sandbox.monite.com/v1/payables/analytics/payables?dimension=status&metric=id&aggregation_function=count' \
2 -H 'x-monite-version: 2025-05-25' \
3 -H 'Authorization: Bearer ACCESS_TOKEN' \
4 -H 'x-monite-entity-id: ENTITY_ID'

The example response shows 5 payables in the new status and 11 in the waiting_for_approval status:

1{
2 "data": [
3 {"metric_value": 5, "dimension_value": "new"},
4 {"metric_value": 11, "dimension_value": "waiting_for_approval"}
5 ]
6}

Yearly sum of payables by counterpart

The field values to get the total sum of payables for 2024, broken down by counterpart, for example:

  • metric = total_amount
  • aggregation_function = sum
  • dimension = counterpart_id
  • created_at__gt = 01.01.2024
1curl -X GET 'https://api.sandbox.monite.com/v1/payables/analytics/payables?dimension=counterpart_id&metric=total_amount&aggregation_function=sum' \
2 -H 'x-monite-version: 2025-05-25' \
3 -H 'Authorization: Bearer ACCESS_TOKEN' \
4 -H 'x-monite-entity-id: ENTITY_ID'

The response shows the total amount of payables (metric_value), split by counterpart IDs (dimension_value):

1{
2 "data": [
3 {"metric_value": 106700, "dimension_value": "2e662f22-0b57-4986-91f3-4f72b58a934c"},
4 {"metric_value": 320100, "dimension_value": "a723f2bd-cc2d-4c45-95b5-a48baa46fde5"},
5 {"metric_value": 55000, "dimension_value": "fa5ddbbf-1244-45bd-84e8-0f1ff88773fa"}
6 ]
7}

Chart of payables currently awaiting payment (not cumulative) by creation date

The field values to get a chart of payable creation dates for payables currently awaiting for payment (not cumulative):

  • metric = id
  • aggregation_function = count
  • dimension = created_at
  • date_dimension_breakdown = ‘daily’
  • status = ‘waiting_to_be_paid`
1curl -X GET 'https://api.sandbox.monite.com/v1/payables/analytics/payables?dimension=created_at&metric=id&aggregation_function=count&date_dimension_breakdown=daily&status=waiting_to_be_paid' \
2 -H 'x-monite-version: 2025-05-25' \
3 -H 'Authorization: Bearer ACCESS_TOKEN' \
4 -H 'x-monite-entity-id: ENTITY_ID'

The response contains each payable with their creation dates:

1{
2 "data": [
3 {"metric_value": 1, "dimension_value": "2024-10-08"},
4 {"metric_value": 1, "dimension_value": "2024-10-09"},
5 {"metric_value": 1, "dimension_value": "2024-10-16"},
6 {"metric_value": 1, "dimension_value": "2024-10-17"},
7 {"metric_value": 1, "dimension_value": "2024-10-22"},
8 {"metric_value": 1, "dimension_value": "2024-10-28"},
9 {"metric_value": 1, "dimension_value": "2024-11-02"},
10 {"metric_value": 1, "dimension_value": "2024-11-03"}
11 ]
12}