Tax

DayZero supports configurable tax rates and tax codes that apply to invoices and bills.

Tax Rates

Tax rates define specific tax percentages by jurisdiction.

Create a Tax Rate

bash
curl -X POST "https://api.ondayzero.com/api/v1/tax/rates" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "California Sales Tax",
    "rate": 7.25,
    "country": "US",
    "state": "CA"
  }'

List Tax Rates

bash
curl "https://api.ondayzero.com/api/v1/tax/rates?active_only=true&state=CA" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"
Parameter Type Description
active_only boolean Only return active rates (default: true)
country string Filter by country code
state string Filter by state/region

Get Default Rate

bash
curl "https://api.ondayzero.com/api/v1/tax/rates/default" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Tax Codes

Tax codes group one or more tax rates and can be assigned to line items on invoices and bills.

Create a Tax Code

bash
curl -X POST "https://api.ondayzero.com/api/v1/tax/codes" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Standard Sales Tax",
    "tax_rate_ids": ["TAX_RATE_UUID"]
  }'

List Tax Codes

bash
curl "https://api.ondayzero.com/api/v1/tax/codes" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Seed Defaults

Populate standard tax codes for your jurisdiction:

bash
curl -X POST "https://api.ondayzero.com/api/v1/tax/codes/seed-defaults" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

AI Rate Suggestions

Get AI-powered tax rate suggestions based on your business location and type:

bash
curl -X POST "https://api.ondayzero.com/api/v1/tax/suggest-rates" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Deleting Rates and Codes

Delete (deactivate) a tax rate or code:

bash
curl -X DELETE "https://api.ondayzero.com/api/v1/tax/rates/{rate_id}" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

This performs a soft deactivation — the rate remains in historical records but is no longer available for new documents.