> ## Documentation Index
> Fetch the complete documentation index at: https://docs.centsless.org/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /jurisdiction/{state} — Resolve by state or location

> Retrieve the rounding rule for a state, state+county, or state+county+city combination. Returns enforcement level, rounding mode, and legislation reference.

Use these endpoints to look up jurisdiction rules when you have structured address components rather than a ZIP code. The engine resolves the most locally specific rule available: if a city-level rule exists, it takes precedence over the county rule, which takes precedence over the state rule. All three endpoints return the same `JurisdictionRule` shape.

## Authentication

All requests require an `x-api-key` header.

## Endpoint variants

### Resolve by state

```
GET https://api.centsless.org/api/v1/jurisdiction/{state}
```

Returns the statewide rounding rule for the given two-letter state code.

<ParamField path="state" type="string" required>
  Two-letter U.S. state code. Example: `AZ`
</ParamField>

```bash theme={null}
curl https://api.centsless.org/api/v1/jurisdiction/AZ \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{
  "lookup_key": "AZ",
  "jurisdiction_id": "US-AZ",
  "jurisdiction_level": "state",
  "rounding_mode": "swedish_rounding",
  "enforcement": "mandatory",
  "status": "enacted",
  "legislation": "AZ HB 2938",
  "effective_date": "2025-01-01"
}
```

***

### Resolve by state and county

```
GET https://api.centsless.org/api/v1/jurisdiction/{state}/{county}
```

Returns the rounding rule for the specified county. Falls back to the state rule if no county-level rule exists.

<ParamField path="state" type="string" required>
  Two-letter U.S. state code. Example: `AZ`
</ParamField>

<ParamField path="county" type="string" required>
  County name. Example: `Maricopa`
</ParamField>

```bash theme={null}
curl https://api.centsless.org/api/v1/jurisdiction/AZ/Maricopa \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{
  "lookup_key": "AZ-Maricopa",
  "jurisdiction_id": "US-AZ-Maricopa",
  "jurisdiction_level": "county",
  "rounding_mode": "swedish_rounding",
  "enforcement": "mandatory",
  "status": "enacted",
  "legislation": "AZ HB 2938",
  "effective_date": "2025-01-01"
}
```

***

### Resolve by state, county, and city

```
GET https://api.centsless.org/api/v1/jurisdiction/{state}/{county}/{city}
```

Returns the most specific rounding rule available for the given location. The engine checks for a city-level rule first, then county, then state.

<ParamField path="state" type="string" required>
  Two-letter U.S. state code. Example: `AZ`
</ParamField>

<ParamField path="county" type="string" required>
  County name. Example: `Maricopa`
</ParamField>

<ParamField path="city" type="string" required>
  City name. Example: `Phoenix`
</ParamField>

```bash theme={null}
curl https://api.centsless.org/api/v1/jurisdiction/AZ/Maricopa/Phoenix \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{
  "lookup_key": "AZ-Maricopa-Phoenix",
  "jurisdiction_id": "US-AZ-Maricopa-Phoenix",
  "jurisdiction_level": "city",
  "rounding_mode": "swedish_rounding",
  "enforcement": "mandatory",
  "status": "enacted",
  "legislation": "AZ HB 2938",
  "effective_date": "2025-01-01"
}
```

## Response fields

<ResponseField name="lookup_key" type="string">
  The key used to look up this rule in the database. Example: `AZ`
</ResponseField>

<ResponseField name="jurisdiction_id" type="string">
  Jurisdiction identifier. Example: `US-AZ`
</ResponseField>

<ResponseField name="jurisdiction_level" type="string">
  The level in the hierarchy where the rule was found. One of: `federal`, `state`, `county`, `city`
</ResponseField>

<ResponseField name="rounding_mode" type="string">
  The rounding algorithm that applies. One of: `swedish_rounding`, `mandatory_round_down`, `mandatory_round_up`, `symmetrical_rounding`, `nearest_nickel`, `nearest_cent`, `nearest_dime`, `none`
</ResponseField>

<ResponseField name="enforcement" type="string">
  How strictly the rule applies. One of: `mandatory`, `permissive`, `voluntary`, `none`
</ResponseField>

<ResponseField name="status" type="string">
  Legislative status. One of: `enacted`, `pending`, `proposed`, `failed`, `no_legislation`
</ResponseField>

<ResponseField name="legislation" type="string">
  The bill or regulation that enacted this rule. Example: `AZ HB 2938`
</ResponseField>

<ResponseField name="effective_date" type="string">
  The date the rule took effect, in ISO 8601 date format.
</ResponseField>
