Skip to main content
This how-to covers the fetch and match phase of Chart of Accounts Sync: retrieving accounts from the Accounting System and Pleo, then determining what action is needed for each. For the write operations, see How to Create, Update, and Archive Accounts. Your integration must:
  • Retrieve active accounts from the AS
  • Retrieve all Accounts (active and archived) from Pleo
  • Match AS accounts to Pleo Accounts by externalId to determine what action is needed

Prerequisites

Before you begin:

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.

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


2. Retrieve All Accounts from Pleo

API Endpoint: POST /v1/chart-of-accounts:search Example parameters:
  • companyId: 12abc3d4-e567-890e-1234-abc56e78fabc
  • includeArchived: true
Fetch both active and archived Accounts from Pleo. Including archived Accounts allows unarchiving rather than creating duplicates. Example Pseudo:

Example Request

Example Response

Example Result

What it looks like in Pleo Web App

Active Accounts Tab

Unarchived Accounts Tab

3. Match AS Accounts to Pleo Accounts by externalId

For each active AS account, attempt to find a matching Account in Pleo using externalId. Example Pseudo:

Example Result


What Comes Next?


this how-to is part of: