---
title: "Compliance & Tax API"
description: "Statutory filings, tax registrations, withholding certificates and e-invoice files — generate, override, finalize and mark filed."
url: "https://bareledger.app/guides/api-compliance"
category: "Developers & API"
updated: "2026-10-04"
publisher: "BareLedger (Syneria Technologies OPC)"
---

# Compliance & Tax API

> Statutory filings, tax registrations, withholding certificates and e-invoice files — generate, override, finalize and mark filed.

## Tax Rates

| Method & Path | Permission | Purpose | Side effects |
|---|---|---|---|
| `GET tax-rates` | `tax.view` | List tenant tax rates | — |
| `POST tax-rates` | `tax.manage` | Create custom rate | Audit |
| `PATCH tax-rates/{taxRate}` | `tax.manage` | Update rate | Blocks code/rate/kind changes once referenced by documents; audit |

## Filings (`feature:compliance_filings`)

| Method & Path | Permission | Purpose | Side effects |
|---|---|---|---|
| `GET compliance/forms` | `compliance.view` | Statutory forms applicable to this tenant | — |
| `GET compliance/obligations` | `compliance.view` | Filing calendar/obligations | — |
| `GET compliance/filings` / `GET compliance/filings/{filing}` | `compliance.view` | List / detail | — |
| `POST compliance/filings` | `compliance.generate` | Generate a filing for a period | Builds filing snapshot from the ledger |
| `POST compliance/filings/{filing}/regenerate` | `compliance.generate` | Rebuild from current ledger | — |
| `PATCH compliance/filings/{filing}` | `compliance.generate` | Override/clear one filing line (draft only) | — |
| `POST compliance/filings/{filing}/finalize` | `compliance.finalize` | Lock filing figures | Returns warnings |
| `POST compliance/filings/{filing}/mark-filed` | `compliance.finalize` | Mark as filed with the authority | — |
| `GET compliance/filings/{filing}/export` | `compliance.view` | Export filing | Streams file |

## WHT Certificates & Credits (`feature:wht_certificates`, `country:PH`)

| Method & Path | Permission | Purpose | Side effects |
|---|---|---|---|
| `GET compliance/wht-certificates` | `compliance.view` | Certificates issued to payees | — |
| `POST compliance/wht-certificates` | `compliance.generate` | Generate BIR Form 2307 for a contact/quarter | Reads posted purchase documents |
| `GET compliance/wht-certificates/{certificate}/pdf` | `compliance.view` | Stream certificate PDF | — |
| `POST compliance/wht-certificates/{certificate}/void` | `compliance.generate` | Void for reissue | — |
| `GET compliance/wht-credits` / `GET .../{credit}` | `compliance.view` | List / detail — credits received from customers | — |
| `POST compliance/wht-credits` | `compliance.generate` | Manually record a credit (pre-system invoices) | — |
| `PATCH compliance/wht-credits/{credit}` | `compliance.generate` | Update / advance pipeline | — |
| `POST compliance/wht-credits/{credit}/validate` | `compliance.finalize` | Mark certificate validated | — |
| `POST compliance/wht-credits/{credit}/apply` | `compliance.finalize` | Apply credit | Posts to the creditable-WHT control account |
| `POST compliance/wht-credits/{credit}/void` | `compliance.generate` | Void credit | — |
| `GET/POST wht-credits/{credit}/attachments` | `compliance.view`/`compliance.generate` | Form 2307 scan attachments | Stores file, audit |
