---
title: "Read learned merchant rules for an assigned customer"
method: GET
path: "/accountant/companies/{customerId}/merchant-rules"
tags: ["Accountant Portal"]
---

# Read learned merchant rules for an assigned customer

`GET /accountant/companies/{customerId}/merchant-rules`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/merchant-rules`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

#2383 read route for the bookkeeping service token. Lists every rule that can categorize this customer's transactions: its company rules first, then the global rules, paged (follow meta.nextCursor while meta.hasMore is true; scope=company or scope=global narrows it). Does not create or update a rule. Assignment is required; an unassigned company is forbidden.

## Response `200`

Success envelope of merchant rules for this customer only

- object
  - `success` boolean
  - `data` object[]

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
