# Reconcile Bank, AR, AP, Intercompany, or Other Accounts

> Reconciles one ledger account for a client over a period, so an accountant can see what has matched and what still needs attention. It needs the clientid…

POST /api/v1/skills/accounts.reconcile/invoke

Reconciles one ledger account for a client over a period, so an accountant can see what has matched and what still needs attention. It needs the client_id and account_code, and accepts a period start and end and a switch for automatic matching. It returns the reconciliation_id, the matched and unmatched counts, whether the account reconciled, the remaining difference and any findings.

Body parameters

client_id string · uuid Required

UUID of the client whose account is reconciled.

account_code string Required

Chart-of-accounts code of the account to reconcile.

period_start string · date

First day of the reconciliation period as an ISO 8601 date.

period_end string · date

Last day of the reconciliation period as an ISO 8601 date.

auto_match boolean · default true

Whether Archie should match obvious items automatically.

Returns

Skill executed successfully

skill string Required

Example reconcile_accounts

output object Required

output.stub_fields array of strings

output.warnings array of strings

output.reconciliation_id string · uuid

output.matched_count integer · default 0

output.unmatched_count integer · default 0

output.reconciled boolean · default false

output.difference number or string · default 0

output.findings array of values

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Next Suggest Month-End Accruals →](https://heyarchie.com/en-gb/developers/api-reference/transactions/suggest-month-end-accruals/)

```
curl https://uk.heyarchie.com/api/v1/skills/accounts.reconcile/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "client_id": "00000000-0000-0000-0000-000000000000",
       "account_code": "string",
       "period_start": null,
       "period_end": null,
       "auto_match": false
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "accounts.reconcile",
    client_id="00000000-0000-0000-0000-000000000000",
    account_code="string",
    period_start=None,
    period_end=None,
    auto_match=False,
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("accounts.reconcile", {
  "client_id": "00000000-0000-0000-0000-000000000000",
  "account_code": "string",
  "period_start": null,
  "period_end": null,
  "auto_match": false
});
console.log(result);
```

Response

```
{
  "skill": "reconcile_accounts",
  "output": {
    "difference": 125.4,
    "matched_count": 48,
    "reconciled": false,
    "reconciliation_id": "9d3e7b52-4a18-4c6f-b0e9-2a7f5c1d8e34",
    "unmatched_count": 2
  },
  "correlation_id": "<string>"
}
```

```
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
```

Every response also carries X-Request-ID. Quote it if you write to us about a call.
