State codes and filing
The codes a return asks for, and who it goes to.
State codes
Each part's ids repeats what the state's rate data says about that tax: its codes, and who collects it. The whole
location's codes are in locationIds. Keys are the publisher's own column names and values are exactly as published,
leading zeros and all; we don't check them against a return's code list. Census FIPS codes are in code, never in ids. locationIds is {} when the address could be in areas whose ids differ.
To find the location's filing code without knowing the state, read locationIds[reporting.locationKey]. Read a code by its exact key, and treat every key as possibly absent: fall
back to your own lookup rather than guess when it's missing. Keep values as strings. locationCode is OpenTaxRate's own key, not a filing code. The OpenAPI spec names each locationIds key below, so a generated client has them as
optional fields.
"parts": [
{ "kind": "state", "name": "Alabama", "code": "45:01", "rate": 0.04, "ids": {} },
{ "kind": "county", "name": "MONTGOMERY COUNTY", "code": "00:101", "rate": 0.025,
"ids": { "Locality Code": "7051", "County Number": "51", "Administered": "SELF" } },
{ "kind": "city", "name": "MONTGOMERY", "code": "01:51000", "rate": 0.035,
"ids": { "Locality Code": "9454", "County Number": "51", "Administered": "SELF" } }
] | State | Keys in ids |
|---|---|
| Alabama | Locality Code, County Number, Administered (STATE, SELF or a private collector). A county rate made of several codes lists each, comma-separated. |
| Texas | TAID; CMPTRL_CNTY_NBR and FIPS_ST_CNTY_CD for counties, Transit_Type, SPD_Type |
| Illinois | Location Code with its check digit (048-0002-8), County Name |
| Louisiana | Domicile Code, Parish, Parish Code |
| Arizona | RegionCode, and County or FIPS |
| New Mexico | locat_cdr, locat_cd1, locat_cd2 |
| Colorado, Alaska | placeId, placeTypeId (the state lookup's own ids) |
| Missouri | Jurisdiction Code, District Code 1 to 5; the location's Jurisdiction Code is also in locationIds |
| California | None on parts; the location's Tax Area Code (CDTFA's 12 characters, 19034D900000) and Local Tax Area Code (its first five digits, 19034: county and city, 998 unincorporated, as CDTFA-531-FL1 lists them for a return's schedules) in locationIds. No district tax codes yet. |
| Streamlined states | None on parts; the location's Composite SER Code in locationIds where the state fills it (zero-padded in Washington: 01726; Washington also gets the DOR's four-digit Location Code, 1726, the code My DOR files under) |
| Everywhere else | None yet: {} |
Reporting
reporting says where the tax is filed.
| Field | Description |
|---|---|
agency | The state agency the return goes to, and its sales tax page. |
form | The return most sellers file there. |
notes | Filing that doesn't go through the state: cities that collect their own tax, a separate program for remote sellers. |
locationKey | The locationIds key the return files the location under: Location Code in Washington, Local Tax Area Code in California, Jurisdiction Code in Missouri; null elsewhere. |