> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Get payables analytics

GET https://api.sandbox.monite.com/v1/analytics/payables

Retrieve aggregated statistics for payables with different breakdowns.

Reference: https://docs.monite.com/api/analytics/get-analytics-payables

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Query parameters

- `dimension` (enum, optional)
  - Allowed values: `created_at`, `status`, `counterpart_id`, `currency`, `issued_at`, `due_date`, `project_id`
- `metric` (enum, required)
  - Allowed values: `id`, `total_amount`, `amount_due`
- `aggregation_function` (enum, required)
  - Allowed values: `count`, `average`, `summary`, `min`, `max`
- `date_dimension_breakdown` (enum, optional)
  - Allowed values: `daily`, `weekly`, `monthly`, `quarterly`, `yearly`
- `limit` (integer, optional, default: 100) — The number of items (0 .. 400) to return in a single page of the response. The response may contain fewer items if it is the last or only page.
- `created_at__gt` (datetime, optional) — Return only payables created in Monite after the specified date and time. The value must be in the ISO 8601 format YYYY-MM-DDThh:mm[:ss[.ffffff]][Z|±hh:mm].
- `created_at__lt` (datetime, optional) — Return only payables created in Monite before the specified date and time.
- `created_at__gte` (datetime, optional) — Return only payables created in Monite on or after the specified date and time.
- `created_at__lte` (datetime, optional) — Return only payables created in Monite before or on the specified date and time.
- `status` (enum, optional) — Return only payables that have the specified [status](https://docs.monite.com/accounts-payable/payables/index). To query multiple statuses at once, use the `status__in` parameter instead.
  - Allowed values: `draft`, `new`, `approve_in_progress`, `waiting_to_be_paid`, `partially_paid`, `paid`, `canceled`, `rejected`
- `status__in` (enum, optional) — Return only payables that have the specified [statuses](https://docs.monite.com/accounts-payable/payables/index). To specify multiple statuses, repeat this parameter for each value: `status__in=draft&status__in=new`
  - Allowed values: `draft`, `new`, `approve_in_progress`, `waiting_to_be_paid`, `partially_paid`, `paid`, `canceled`, `rejected`
- `id__in` (string, optional) — Return only payables with specified IDs. Valid but nonexistent IDs do not raise errors but produce no results. To specify multiple IDs, repeat this parameter for each value: `id__in=<id1>&id__in=<id2>`
- `total_amount` (integer, optional) — Return only payables with the exact specified total amount. The amount must be specified in the minor units of currency. For example, $12.5 is represented as 1250.
- `total_amount__gt` (integer, optional) — Return only payables whose total amount (in minor units) exceeds the specified value.
- `total_amount__lt` (integer, optional) — Return only payables whose total amount (in minor units) is less than the specified value.
- `total_amount__gte` (integer, optional) — Return only payables whose total amount (in minor units) is greater than or equal to the specified value.
- `total_amount__lte` (integer, optional) — Return only payables whose total amount (in minor units) is less than or equal to the specified value.
- `amount` (integer, optional) — Return only payables with the specified amount.
- `amount__gt` (integer, optional) — Return only payables whose amount (in minor units) exceeds the specified value.
- `amount__lt` (integer, optional) — Return only payables whose amount (in minor units) is less than the specified value.
- `amount__gte` (integer, optional) — Return only payables whose amount (in minor units) is greater than or equal to the specified value.
- `amount__lte` (integer, optional) — Return only payables whose amount (in minor units) is less than or equal to the specified value.
- `currency` (enum, optional) — Return only payables that use the specified currency.
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `counterpart_name` (string, optional) — Return only payables received from counterparts with the specified name (exact match, case-sensitive). For counterparts of `type = individual`, the full name is formatted as `first_name last_name`.
- `counterpart_name__contains` (string, optional) — Return only payables received from counterparts whose name contains the specified string (case-sensitive).
- `counterpart_name__icontains` (string, optional) — Return only payables received from counterparts whose name contains the specified string (case-insensitive).
- `search_text` (string, optional) — Apply the `icontains` condition to search for the specified text in the `document_id` and `counterpart_name` fields in the payables.
- `due_date` (string, optional) — Return payables that are due on the specified date (YYYY-MM-DD)
- `due_date__gt` (string, optional) — Return payables that are due after the specified date (exclusive, YYYY-MM-DD).
- `due_date__lt` (string, optional) — Return payables that are due before the specified date (exclusive, YYYY-MM-DD).
- `due_date__gte` (string, optional) — Return payables that are due on or after the specified date (YYYY-MM-DD).
- `due_date__lte` (string, optional) — Return payables that are due before or on the specified date (YYYY-MM-DD).
- `issued_at` (string, optional) — Return payables that are issued at the specified date (YYYY-MM-DD)
- `issued_at__gt` (string, optional) — Return payables that are issued after the specified date (exclusive, YYYY-MM-DD).
- `issued_at__lt` (string, optional) — Return payables that are issued before the specified date (exclusive, YYYY-MM-DD).
- `issued_at__gte` (string, optional) — Return payables that are issued on or after the specified date (YYYY-MM-DD).
- `issued_at__lte` (string, optional) — Return payables that are issued before or on the specified date (YYYY-MM-DD).
- `document_id` (string, optional) — Return a payable with the exact specified document number (case-sensitive). The `document_id` is the user-facing document number such as INV-00042, not to be confused with Monite resource IDs (`id`).
- `document_id__contains` (string, optional) — Return only payables whose document number (`document_id`) contains the specified string (case-sensitive).
- `document_id__icontains` (string, optional) — Return only payables whose document number (`document_id`) contains the specified string (case-insensitive).
- `was_created_by_user_id` (string, optional) — Return only payables created in Monite by the entity user with the specified ID.
- `counterpart_id` (string, optional) — Return only payables received from the counterpart with the specified ID. Counterparts that have been deleted but have associated payables will still return results here because the payables contain a frozen copy of the counterpart data. If the specified counterpart ID does not exist and never existed, no results are returned.
- `source_of_payable_data` (enum, optional) — Return only payables coming from the specified source.
  - Allowed values: `ocr`, `user_specified`, `einvoicing`
- `ocr_status` (enum, optional) — Return only payables with specific OCR statuses.
  - Allowed values: `processing`, `error`, `success`
- `line_item_id` (string, optional) — Search for a payable by the identifier of the line item associated with it.
- `purchase_order_id` (string, optional) — Search for a payable by the identifier of the purchase order associated with it.
- `project_id` (string, optional) — Return only payables assigned to the project with the specified ID. Valid but nonexistent project IDs do not raise errors but return no results.
- `project_id__in` (string, optional) — Return only payables whose `project_id` include at least one of the project_id with the specified IDs. Valid but nonexistent project IDs do not raise errors but produce no results.
- `tag_ids` (string, optional) — Return only payables whose `tags` include at least one of the tags with the specified IDs. Valid but nonexistent tag IDs do not raise errors but produce no results.
- `tag_ids__not_in` (string, optional) — Return only payables whose `tags` do not include any of the tags with the specified IDs. Valid but nonexistent tag IDs do not raise errors but produce the results.
- `has_tags` (boolean, optional) — Filter objects based on whether they have tags. If true, only objects with tags are returned. If false, only objects without tags are returned.
- `origin` (enum, optional) — Return only payables from a given origin ['einvoice', 'upload', 'email']
  - Allowed values: `upload`, `email`, `einvoicing`
- `has_file` (boolean, optional) — Return only payables with or without attachments (files)

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

## Response

### 200

Successful Response

- `data` (list of AnalyticsDataPoint, required)

## Errors

### 401 Get Analytics Payables Request Unauthorized Error

Unauthorized

- `error` (ErrorSchema2, required)

### 403 Get Analytics Payables Request Forbidden Error

Forbidden

- `error` (ErrorSchema2, required)

### 422 Get Analytics Payables Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Get Analytics Payables Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema2, required)

## Types

### AnalyticsDataPoint

- `metric_value` (double, required)
- `dimension_value` (string, optional)

### ErrorSchema2

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItem

## Examples

**Response**

```json
{
  "data": [
    {
      "metric_value": 1.1,
      "dimension_value": "dimension_value"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/analytics/payables"

querystring = {"metric":"id","aggregation_function":"count"}

headers = {
    "x-monite-version": "2024-01-31",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count';
const options = {
  method: 'GET',
  headers: {
    'x-monite-version': '2024-01-31',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-monite-version", "2024-01-31")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-monite-version"] = '2024-01-31'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count")
  .header("x-monite-version", "2024-01-31")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-01-31',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count");
var request = new RestRequest(Method.GET);
request.AddHeader("x-monite-version", "2024-01-31");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-01-31",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/analytics/payables?metric=id&aggregation_function=count")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```