Developer Reference

Ziler Tax API

An internal REST API for Uganda tax calculations. Public developer access is coming soon.

Overview

The Ziler API provides programmatic access to Uganda's 2025 tax calculations. All responses are JSON. The API is currently used internally to power ziler.co. We're building a developer program to open access — see the API Access section below if you're interested in integrating.

Base URL

url
https://api.ziler.co/api

All endpoints are prefixed with /api. Requests must include Content-Type: application/json for POST endpoints.

List Supported Countries

Returns all countries currently supported by the API with their currency and tax year.

GEThttps://api.ziler.co/api/countries

EXAMPLE REQUEST

curl
curl https://api.ziler.co/api/countries

EXAMPLE RESPONSE

json
{
  "countries": [
    {
      "code": "UG",
      "name": "Uganda",
      "currency": "UGX",
      "year": 2025
    }
  ]
}

Calculate Net Pay

Calculate net pay from a gross salary. Returns a full breakdown of PAYE, NSSF, LST deductions, employer cost, and annual projections.

POSThttps://api.ziler.co/api/calculate/net

PARAMETERS

ParameterTypeDescription
grossnumberMonthly gross salary in local currency
countrystringCountry code (default: "UG")
nonCashBenefitsnumberValue of non-cash benefits (housing, transport)
deductLSTbooleanInclude Local Service Tax deduction
isLumpSumbooleanPay LST as annual lump sum instead of monthly

EXAMPLE REQUEST

curl
curl -X POST https://api.ziler.co/api/calculate/net \
  -H "Content-Type: application/json" \
  -d '{"gross": 1200000}'
javascript
const response = await fetch("https://api.ziler.co/api/calculate/net", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ gross: 1200000 })
});

const data = await response.json();
console.log(data.monthly.netPay); // 878000
python
import requests

response = requests.post("https://api.ziler.co/api/calculate/net", json={
    "gross": 1200000
})

data = response.json()
print(data["monthly"]["netPay"])  # 878000

Calculate Gross Pay

Reverse-calculate the gross salary needed for a desired net pay. Uses binary search to find the exact gross that produces the target net after all deductions.

POSThttps://api.ziler.co/api/calculate/gross

PARAMETERS

ParameterTypeDescription
netnumberDesired monthly net pay in local currency
countrystringCountry code (default: "UG")
nonCashBenefitsnumberValue of non-cash benefits
deductLSTbooleanInclude Local Service Tax
isLumpSumbooleanLST as annual lump sum

EXAMPLE REQUEST

curl
curl -X POST https://api.ziler.co/api/calculate/gross \
  -H "Content-Type: application/json" \
  -d '{"net": 1000000}'

Get Tax Rates

Returns the full tax configuration for a country including PAYE bands, NSSF rates, and LST brackets.

GEThttps://api.ziler.co/api/tax-rates/UG

EXAMPLE REQUEST

curl
curl https://api.ziler.co/api/tax-rates/UG

Error Handling

The API returns standard HTTP status codes. Errors include a JSON body with an error field describing what went wrong.

StatusMeaning
200Success
400Bad request — missing or invalid parameters
404Country not found
500Internal server error
json
{
  "error": "Invalid gross pay. Must be a positive number."
}

API Access

The Ziler API is currently restricted to internal use. We're building a developer program with authenticated API keys, usage dashboards, and generous rate limits for payroll, HR, and fintech integrations.

Request early access

Want to integrate Uganda tax calculations into your product? Reach out at api@ziler.co and we'll get you set up.