Skip to main content
This how-to covers the write operations for Tax Sync: creating new Tax Codes, updating or unarchiving existing Tax Codes, and archiving Tax Codes that are no longer active in the Accounting System. Run this after How to Fetch and Match Tax Codes, which covers fetching and matching tax codes from both systems.

Prerequisites

Before you begin:

Scenario

This how-to continues from the How to Fetch and Match Tax Codes scenario. After matching, the following actions are required:

Steps

1. Create Tax Codes for New AS Entries

API Endpoint: POST /v0/tax-codes If an AS tax code has no matching Pleo Tax Code, create a new Tax Code. Example Pseudo:

Type Mapping

The Pleo Web App labels these Standard and Reverse; see Tax Sync Data Mapping for the full naming note.

Example Request

Example Response

What it looks like in Pleo Web App

Active Tax Codes Tab with Zero Rated added

2. Unarchive or Update Existing Tax Codes

API Endpoint: PUT /v0/tax-codes/{taxCodeId} If a matching Tax Code is found:
  • AS tax code is active, Pleo Tax Code is archived: Unarchive by setting archived: false and update name, rate, and type if they differ.
  • AS tax code is active, Pleo Tax Code details differ: Update the Tax Code to match the AS.
  • AS tax code is active, Pleo Tax Code details match: No action required.
Example Pseudo:

Unarchive

Example Request

The “VAT5 - Reduced (5%)” Tax Code is unarchived in this example.

Example Response

What it looks like in Pleo Web App

Active Tax Codes Tab with VAT5 unarchived

Archived Tax Codes Tab now empty

Update

Example Request

The “REV - Reverse Charge” Tax Code’s rate is updated from 20% to match the AS rate of 10% in this example.

Example Response

What it looks like in Pleo Web App

Active Tax Codes Tab with Reverse Charge code updated

3. Archive Tax Codes with No Matching AS Entry

API Endpoint: PUT /v0/tax-codes/{taxCodeId} If a Pleo Tax Code is active but its corresponding AS tax code is no longer active (or does not exist), archive the Tax Code. Do not delete Tax Codes. Archiving is non-destructive and reversible. Example Pseudo:

Example Request

Example Response

What it looks like in Pleo Web App

Active Tax Codes Tab without Exempt

Archived Tax Codes Tab showing Exempt as archived

4. Handle Duplicate Codes in Pleo

API Endpoint: PUT /v0/tax-codes/{taxCodeId} If two or more Pleo Tax Codes share the same code, resolve the conflict before completing the sync:
  • Retain the Tax Code whose rate matches the rate from the corresponding AS tax code.
  • Archive the duplicate using archived: true.
  • If all duplicates match the rate, retain one and archive the rest.
Example Pseudo:

Result

The table below recaps what happened to each Tax Code across all steps. Pleo now reflects the current active, relevant tax codes from the AS.

What Comes Next?


this how-to is part of: