Skip to main content
This how-to covers the fetch and match phase of Tax Sync: retrieving tax codes 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 Tax Codes. Your integration must:
  • Retrieve relevant active tax codes from the AS (filtering out irrelevant or inactive codes)
  • Retrieve all Tax Codes (active and archived) from Pleo
  • Match AS tax codes to Pleo Tax Codes by code 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 Relevant Active Tax Codes from the Accounting System

Fetch all active tax codes from the AS, then filter them:
  • Exclude tax codes not relevant to expense management (for example: Sales VAT)
  • Exclude blocked, inactive, or archived tax codes
Example Pseudo:

Example Result


2. Retrieve All Tax Codes from Pleo

API Endpoint: POST /v0/tax-codes:search Fetch both active and archived Tax Codes from Pleo. Including archived Tax Codes allows unarchiving rather than creating duplicates. Example Pseudo:

Example Request

Example Response

Example Result

What it looks like in Pleo Web App

Active Tax Codes Tab

Archived Tax Codes Tab

3. Match AS Tax Codes to Pleo Tax Codes by code

For each relevant active AS tax code, attempt to find a matching Tax Code in Pleo using code. Matching is case insensitive. Example Pseudo:

Example Result


What Comes Next?


this how-to is part of: