---
title: "Read accounts"
description: "Search receivable/payable accounts, retrieve one account, or list its ledger movements. Use customerId for receivables and supplierId for payables."
language: en
canonical_url: "https://exac.mx/docs/en/mcp/tools/get_accounts"
md_url: "https://exac.mx/docs/en/mcp/tools/get_accounts.md"
---

# Read accounts

Search receivable/payable accounts, retrieve one account, or list its ledger movements. Use customerId for receivables and supplierId for payables.

Tool: `get_accounts`

## Purpose

Search accounts, read one account, or inspect its ledger movements.

### Use when

You need current receivable or payable balances and activity.

### Do not use when

You need to record a payment or correct a balance.

| Detail | Value |
| --- | --- |
| Permissions | By input.kind: receivable → receivables:read; payable → payables:read |
| Side effects | None |
| Idempotency | Idempotent |

## Input schema

```json
{
  "type": "object",
  "properties": {
    "input": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "search"
            },
            "kind": {
              "type": "string",
              "enum": [
                "receivable",
                "payable"
              ],
              "description": "receivable is customer debt; payable is debt owed to a supplier"
            },
            "query": {
              "type": "string",
              "minLength": 1
            },
            "cursor": {
              "type": "string"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "required": [
            "operation",
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "get"
            },
            "kind": {
              "type": "string",
              "const": "receivable"
            },
            "customerId": {
              "type": "string"
            }
          },
          "required": [
            "operation",
            "kind",
            "customerId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "movements"
            },
            "kind": {
              "type": "string",
              "const": "receivable"
            },
            "customerId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "required": [
            "operation",
            "kind",
            "customerId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "get"
            },
            "kind": {
              "type": "string",
              "const": "payable"
            },
            "supplierId": {
              "type": "string"
            }
          },
          "required": [
            "operation",
            "kind",
            "supplierId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "movements"
            },
            "kind": {
              "type": "string",
              "const": "payable"
            },
            "supplierId": {
              "type": "string"
            },
            "cursor": {
              "type": "string"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "required": [
            "operation",
            "kind",
            "supplierId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "input"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "data": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "accounts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "customerId": {
                    "type": "string"
                  },
                  "customerName": {
                    "type": "string"
                  },
                  "supplierId": {
                    "type": "string"
                  },
                  "supplierName": {
                    "type": "string"
                  },
                  "rfc": {
                    "type": "string"
                  },
                  "operationalBalance": {
                    "type": "number"
                  },
                  "fiscalPpdBalance": {
                    "type": "number"
                  },
                  "totalBalance": {
                    "type": "number"
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "customerId",
                      "customerName"
                    ]
                  },
                  {
                    "required": [
                      "supplierId",
                      "supplierName"
                    ]
                  }
                ],
                "additionalProperties": true
              }
            },
            "nextCursor": {
              "type": [
                "string",
                "null"
              ]
            },
            "hasMore": {
              "type": "boolean"
            }
          },
          "required": [
            "accounts",
            "nextCursor",
            "hasMore"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "movements": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "movementId": {
                    "type": "string"
                  },
                  "entryType": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "balanceAfter": {
                    "type": "number"
                  },
                  "documentLabel": {
                    "type": "string"
                  }
                },
                "required": [
                  "movementId",
                  "entryType",
                  "date",
                  "amount",
                  "balanceAfter",
                  "documentLabel"
                ],
                "additionalProperties": true
              }
            },
            "nextCursor": {
              "type": [
                "string",
                "null"
              ]
            },
            "hasMore": {
              "type": "boolean"
            }
          },
          "required": [
            "movements",
            "nextCursor",
            "hasMore"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "customerId": {
              "type": "string"
            },
            "customerName": {
              "type": "string"
            },
            "supplierId": {
              "type": "string"
            },
            "supplierName": {
              "type": "string"
            },
            "rfc": {
              "type": "string"
            },
            "operationalBalance": {
              "type": "number"
            },
            "fiscalPpdBalance": {
              "type": "number"
            },
            "totalBalance": {
              "type": "number"
            }
          },
          "anyOf": [
            {
              "required": [
                "customerId",
                "customerName"
              ]
            },
            {
              "required": [
                "supplierId",
                "supplierName"
              ]
            }
          ],
          "additionalProperties": true
        }
      ]
    },
    "error": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "validation_error",
            "unauthenticated",
            "forbidden",
            "not_found",
            "method_not_allowed",
            "conflict",
            "idempotency_conflict",
            "operation_in_progress",
            "recovery_required",
            "rate_limited",
            "provider_unavailable",
            "internal"
          ]
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "retryable": {
              "type": "boolean"
            },
            "retryAfterSeconds": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "oneOf": [
    {
      "required": [
        "data"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
```

## Related tools

- [`record_payment`](/docs/en/mcp/tools/record_payment.md) — **Record payment**: Record money received from a customer or paid to a supplier and allocate it to open balances. Use the same idempotencyKey when retrying the exact payment.

- [`adjust_account_balance`](/docs/en/mcp/tools/adjust_account_balance.md) — **Adjust account balance**: Correct one receivable or payable balance with an auditable reason. kind selects the account family; balanceType selects an operational document or fiscal PPD balance.

## Related workflow

[See the canonical workflows in the introduction](/docs/en.md)

## Equivalent REST operations

- [`GET /v1/accounts/receivables`](/docs/en/api/accounts-payments/accounts/list-receivable-accounts.md)

- [`GET /v1/accounts/receivables/{customerId}`](/docs/en/api/accounts-payments/accounts/get-receivable-account.md)

- [`GET /v1/accounts/receivables/{customerId}/transactions`](/docs/en/api/accounts-payments/accounts/list-receivable-transactions.md)

- [`GET /v1/accounts/payables`](/docs/en/api/accounts-payments/accounts/list-payable-accounts.md)

- [`GET /v1/accounts/payables/{supplierId}`](/docs/en/api/accounts-payments/accounts/get-payable-account.md)

- [`GET /v1/accounts/payables/{supplierId}/transactions`](/docs/en/api/accounts-payments/accounts/list-payable-transactions.md)

Complete documentation: https://exac.mx/docs/en.md
Agent documentation index: https://exac.mx/docs/en/llms.txt
