> 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 all counterparts

GET https://api.sandbox.monite.com/v1/counterparts

Reference: https://docs.monite.com/api/counterparts/get-counterparts

## 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

- `iban` (string, optional) — The IBAN of the counterpart's bank account.
- `sort_code` (string, optional) — The bank's sort code.
- `account_number` (string, optional) — The bank account number. Required for US bank accounts to accept ACH payments. US account numbers contain 9 to 12 digits. UK account numbers typically contain 8 digits.
- `tax_id` (string, optional) — The tax ID of the counterpart.
- `vat_id` (string, optional) — The VAT ID of the counterpart.
- `id__in` (string, optional) — A list of counterpart IDs to search through.
- `order` (enum, optional) — Sort order (ascending by default). Typically used together with the `sort` parameter.
  - Allowed values: `asc`, `desc`
- `limit` (integer, optional, default: 100) — The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page.
- `pagination_token` (string, optional) — A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. If not specified, the first page of results will be returned.
- `sort` ("counterpart_name", optional) — The field to sort the results by. Typically used together with the `order` parameter.
- `type` (enum, optional)
  - Allowed values: `individual`, `organization`
- `counterpart_name` (string, optional)
- `counterpart_name__iexact` (string, optional)
- `counterpart_name__contains` (string, optional)
- `counterpart_name__icontains` (string, optional)
- `is_vendor` (boolean, optional)
- `is_customer` (boolean, optional)
- `email` (string, optional)
- `email__contains` (string, optional)
- `email__icontains` (string, optional)
- `created_at__gt` (datetime, optional)
- `created_at__lt` (datetime, optional)
- `created_at__gte` (datetime, optional)
- `created_at__lte` (datetime, optional)
- `address.country` (string, optional)
- `address.city` (string, optional)
- `address.postal_code` (string, optional)
- `address.state` (string, optional)
- `address.line1` (string, optional)
- `address.line2` (string, optional)
- `tag_ids__in` (string, optional)

### 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 CounterpartResponse, required)
- `next_pagination_token` (string, optional) — A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page).
- `prev_pagination_token` (string, optional) — A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page).

## Errors

### 401 Get Counterparts Request Unauthorized Error

Unauthorized

- `error` (ErrorSchema, required)

### 403 Get Counterparts Request Forbidden Error

Forbidden

- `error` (ErrorSchema, required)

### 422 Get Counterparts Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Get Counterparts Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema, required)

## Types

### CounterpartResponse

A Counterpart object contains information about an organization (juridical person) or individual (natural person) that provides goods and services to or buys them from an [SME](https://docs.monite.com/docs/glossary#sme).

### ErrorSchema

- `message` (string, required)

### ValidationError

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

### CounterpartIndividualRootResponse

Represents counterparts that are individuals (natural persons).

- `id` (string, required) — Unique ID of the counterpart.
- `created_at` (datetime, required) — Date and time when the counterpart was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the counterpart was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `individual` (CounterpartIndividualResponse, required) — Represents counterparts that are individuals (natural persons).
- `type` (enum, required) — The counterpart type: `organization` (juridical person) or `individual` (natural person).
  - Allowed values: `individual`, `organization`
- `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
- `created_by_entity_user_id` (string, optional) — Entity user ID of counterpart creator.
- `default_billing_address_id` (string, optional) — ID of the counterpart's billing address. If the counterpart is US-based and needs to accept ACH payments, this address must have all fields filled in. If `default_billing_address_id` is not defined, the default address is instead used as the billing address for ACH payments.
- `default_shipping_address_id` (string, optional) — ID of the shipping address.
- `external_reference` (string, optional) — A user-defined identifier of the counterpart. For example, the customer or vendor reference number in the entity's CRM system. If specified, it will be displayed in PDF invoices and other accounts receivable documents created by the entity.
- `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
  - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
- `reminders_enabled` (boolean, optional)
- `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID.

### CounterpartOrganizationRootResponse

Represents counterparts that are organizations (juridical persons).

- `id` (string, required) — Unique ID of the counterpart.
- `created_at` (datetime, required) — Date and time when the counterpart was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the counterpart was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `organization` (CounterpartOrganizationResponse, required) — Represents counterparts that are organizations (juridical persons).
- `type` (enum, required) — The counterpart type: `organization` (juridical person) or `individual` (natural person).
  - Allowed values: `individual`, `organization`
- `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
- `created_by_entity_user_id` (string, optional) — Entity user ID of counterpart creator.
- `default_billing_address_id` (string, optional) — ID of the counterpart's billing address. If the counterpart is US-based and needs to accept ACH payments, this address must have all fields filled in. If `default_billing_address_id` is not defined, the default address is instead used as the billing address for ACH payments.
- `default_shipping_address_id` (string, optional) — ID of the shipping address.
- `external_reference` (string, optional) — A user-defined identifier of the counterpart. For example, the customer or vendor reference number in the entity's CRM system. If specified, it will be displayed in PDF invoices and other accounts receivable documents created by the entity.
- `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
  - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
- `reminders_enabled` (boolean, optional)
- `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID.

### ValidationErrorLocItem

### CounterpartIndividualResponse

Represents counterparts that are individuals (natural persons).

- `first_name` (string, required) — The person's first name.
- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `last_name` (string, required) — The person's last name.
- `email` (string, optional) — The person's email address.
- `phone` (string, optional) — The person's phone number.
- `tags` (list of CounterpartTagSchema, optional) — The list of tags for this counterpart.
- `title` (string, optional) — The person's title or honorific. Examples: Mr., Ms., Dr., Prof.

### CounterpartOrganizationResponse

Represents counterparts that are organizations (juridical persons).

- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `legal_name` (string, required) — The legal name of the organization.
- `email` (string, optional) — The email address of the organization
- `phone` (string, optional) — The phone number of the organization
- `tags` (list of CounterpartTagSchema, optional) — The list of tags for this counterpart.

### CounterpartTagSchema

Represents a user-defined tag that can be assigned to resources to filter them.

- `id` (string, required) — A unique ID of this tag.
- `created_at` (datetime, required) — Date and time when the tag was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the tag was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `name` (string, required) — The tag name.
- `category` (enum, optional) — The tag category.
  - Allowed values: `document_type`, `department`, `project`, `cost_center`, `vendor_type`, `payment_method`, `approval_status`
- `created_by_entity_user_id` (string, optional) — ID of the user who created the tag.
- `description` (string, optional) — The tag description.

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "id",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "created_automatically": true,
      "created_by_entity_user_id": "created_by_entity_user_id",
      "default_billing_address_id": "default_billing_address_id",
      "default_shipping_address_id": "default_shipping_address_id",
      "external_reference": "123456789",
      "individual": {
        "email": "asingh@example.net",
        "first_name": "Adnan",
        "is_customer": true,
        "is_vendor": true,
        "last_name": "Singh",
        "phone": "5553211234",
        "tags": [
          {
            "id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
            "created_at": "2022-09-07T16:35:18Z",
            "updated_at": "2022-09-07T16:35:18Z",
            "category": "document_type",
            "created_by_entity_user_id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
            "description": "Tag for the Marketing Department",
            "name": "Marketing"
          }
        ],
        "title": "Mr."
      },
      "language": "ab",
      "reminders_enabled": true,
      "tax_id": "tax_id",
      "type": "individual"
    }
  ],
  "next_pagination_token": "next_pagination_token",
  "prev_pagination_token": "prev_pagination_token"
}
```

**SDK Code**

```python
import requests

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

querystring = {"sort_code":"123456"}

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/counterparts?sort_code=123456';
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/counterparts?sort_code=123456"

	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/counterparts?sort_code=123456")

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/counterparts?sort_code=123456")
  .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/counterparts?sort_code=123456', [
  '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/counterparts?sort_code=123456");
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/counterparts?sort_code=123456")! 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()
```