- Retrieve active accounts from the AS
- Retrieve all Accounts (active and archived) from Pleo
- Match AS accounts to Pleo Accounts by
externalIdto determine what action is needed
Prerequisites
Before you begin:- You’re familiar with the Chart of Accounts Sync Overview and the Integration Design for Syncing Accounts
- Your integration is authenticated using one of the supported authentication methods
- Your integration can call Pleo’s Chart of Accounts API endpoints
Scenario
This how-to uses a consistent example to illustrate each step. The table below shows the starting state in both systems before this sync runs.| Account (AS) | externalId | AS Status | Account (Pleo) | Pleo Status |
|---|---|---|---|---|
| 1000 - Office Supplies | ext-1000 | Active | 1000 - Office Supplies | Active |
| 2000 - Travel | ext-2000 | Active | 2000 - Travel | Archived |
| 3000 - Software | ext-3000 | Active | — | Does not exist |
| 4000 - Marketing | ext-4000 | Active | 4000 - Advertising | Active |
| — | 5000 | — | 5000 - Entertainment | Active |
Steps
1. Retrieve Active Accounts from the Accounting System
Fetch all active accounts from the Chart of Accounts in the AS. Example Pseudo:Example Result
| Account | externalId | AS Status |
|---|---|---|
| 1000 - Office Supplies | ext-1000 | Active |
| 2000 - Travel | ext-2000 | Active |
| 3000 - Software | ext-3000 | Active |
| 4000 - Marketing | ext-4000 | Active |
2. Retrieve All Accounts from Pleo
API Endpoint: POST/v1/chart-of-accounts:search
Example parameters:
- companyId:
12abc3d4-e567-890e-1234-abc56e78fabc - includeArchived:
true
Example Request
- OAuth 2.0
- API Key
Example Response
Example Result
| Account (Pleo) | externalId | Pleo Status |
|---|---|---|
| 1000 - Office Supplies | ext-1000 | Active |
| 2000 - Travel | ext-2000 | Archived |
| 4000 - Advertising | ext-4000 | Active |
| 5000 - Entertainment | 5000 | Active |
What it looks like in Pleo Web App


3. Match AS Accounts to Pleo Accounts by externalId
For each active AS account, attempt to find a matching Account in Pleo usingexternalId.
Example Pseudo:
Example Result
| AS Account | Pleo Account | Pleo Status | Action |
|---|---|---|---|
| 1000 - Office Supplies | 1000 - Office Supplies | Active, matches | No action |
| 2000 - Travel | 2000 - Travel | Archived | Unarchive |
| 3000 - Software | — | Does not exist | Create |
| 4000 - Marketing | 4000 - Advertising | Active, differs | Update |
| — | 5000 - Entertainment | Active | Archive |
What Comes Next?
this how-to is part of:
Related Reading
- How to Create, Update, and Archive Accounts
- Sync Accounts Integration Design
- Data Mapping
- Platform Capabilities: Chart of Accounts Sync