# GET /api/v1/advisory-firms/{firm_id}/account-map

> Get the firm Account Master Map

- **Tag:** intercompany-cleanup
- **Operation ID:** `get_account_map_api_v1_advisory_firms__firm_id__account_map_get`

## Description

Every map entry for the firm, auto-seeded from all Plaid/Teal accounts across the firm's businesses that have no entry yet, with ingestion coverage windows computed from transaction data. Only ``entity_role`` requires human input.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `firm_id` (path, string, required)

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_AccountMapListResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (AccountMapListResponse)

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/advisory-firms/{firm_id}/account-map' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/advisory-firms/{firm_id}/account-map', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/advisory-firms/{firm_id}/account-map", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/intercompany-cleanup/get-account-map
- OpenAPI slice: https://www.ondayzero.com/docs/reference/intercompany-cleanup/get-account-map/openapi.json
- Other endpoints in **intercompany-cleanup**: https://www.ondayzero.com/docs/reference/intercompany-cleanup
