Skip to main content
Use this endpoint to check the rounding rule for any location before processing a transaction. It returns the full resolution chain — city, then county, then state, then federal default — so you always get the most locally specific rule that applies. The database covers 33,791 U.S. ZIP codes mapped to their state, county, and city.

Endpoint

GET https://api.centsless.org/api/v1/jurisdiction/zip/{zip_code}

Authentication

All requests require an x-api-key header. Keys are issued per role — merchant, auditor, or admin.

Path parameters

zip_code
string
required
The 5-digit U.S. ZIP code to resolve. Example: 85001

Code example

curl https://api.centsless.org/api/v1/jurisdiction/zip/85001 \
  -H "x-api-key: YOUR_API_KEY"

Example response

{
  "jurisdiction_id": "US-AZ",
  "jurisdiction_level": "state",
  "rounding_mode": "swedish_rounding",
  "enforcement": "mandatory",
  "legislation": "AZ HB 2938",
  "status": "enacted",
  "effective_date": "2025-01-01",
  "notes": "Swedish rounding required for all cash transactions statewide.",
  "source_url": "https://leginfo.example.gov/az/hb2938"
}

Response fields

jurisdiction_id
string
Jurisdiction identifier. Example: US-AZ
jurisdiction_level
string
The level in the resolution hierarchy where the rule was found. One of: federal, state, county, city
rounding_mode
string
The rounding algorithm that applies at this location. One of: swedish_rounding, mandatory_round_down, mandatory_round_up, symmetrical_rounding, nearest_nickel, nearest_cent, nearest_dime, none
enforcement
string
How strictly the rule applies. One of: mandatory, permissive, voluntary, none
legislation
string
The bill or regulation that enacted this rule. Example: AZ HB 2938
status
string
Legislative status. One of: enacted, pending, proposed, failed, no_legislation
effective_date
string
The date the rule took effect, in ISO 8601 date format.
notes
string
Additional context about the rule or its scope.
source_url
string
URL to the authoritative legislative source.
You do not need to make a separate lookup before processing a transaction. Pass zip_code directly in your /transaction request body — the engine resolves the jurisdiction and applies the correct rounding rule automatically.