Sandbox documentation. Base URL https://n8nsandbox.undtec.com/webhook. Figures come from sandbox data and may be mid-revision.

The sandbox runs the calculation engine without the billing and API-key layer, so two paths differ: /v1/calculate is /webhook/slapi/internal/v3/calculate here, and /v1/historical-rates is /webhook/sltax_history_list. The X-API-Key header is shown for parity and is not checked.

API Documentation

Welcome to the Surplus Lines Tax API documentation. This API provides accurate surplus lines tax calculations for all 50 U.S. states, the District of Columbia, Puerto Rico, and the U.S. Virgin Islands.

Base URL

https://n8nsandbox.undtec.com/webhook

The API is designed to provide:

  • Real-time tax rate information for all jurisdictions
  • Accurate tax calculations with state-specific rounding rules
  • Support for special coverage types (wet marine, fire insurance, etc.)
  • Detailed fee breakdowns including stamping fees, filing fees, and surcharges

Authentication

All API endpoints require authentication. Include your API key in the X-API-Key header:

X-API-Key: YOUR_API_KEY

Keep Your API Key Secure

Never expose your API key in client-side code or public repositories. Always make API calls from your server.

Obtaining an API Key

To get an API key:

  1. Create an account at app.surpluslinesapi.com
  2. Navigate to the API Keys section in your dashboard
  3. Generate a new API key

New accounts include 100 free API calls to get started.

Quick Start

Two required fields, state and premium. Everything else refines the answer: a fee travels on the side that charged it, lob names the coverage, and effective_date asks for a particular date.

curl -X POST https://n8nsandbox.undtec.com/webhook/slapi/internal/v3/calculate \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "California",
    "premium": 10000,
    "carrier_fees": 250,
    "lob": "SLT-PROP"
  }'

The response carries the money under calculation, and every charge names itself and cites the document that sets it.

{
  "success": true,
  "state": "California",
  "calculation": {
    "premium": 10000,
    "breakdown": {
      "base_tax": {
        "rate": "3%",
        "amount": 307.5,
        "name": "Surplus Line Premium Tax",
        "source": "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=INS&sectionNum=1775.5"
      },
      "stamping_fee": {
        "rate": "0.18%",
        "amount": 18.45,
        "name": "Stamping Fee",
        "source": "https://www.slacal.com/resources/broker-taxes-fees"
      }
    },
    "total_tax": 325.95,
    "total_due": 10575.95,
    "fees_taxable": 250,
    "fees_exempt": 0
  }
}

Send that same $250 as broker_fees and California leaves it out of the taxable amount: the tax becomes 318.00 instead of 325.95. Who charged the fee decides the answer in 10 of the 53 jurisdictions.

POST /v1/calculate

Three things decide the answer: who charged the fee, which coverage, and the date. Send the fee as carrier_fees (the insurer required it) or broker_fees (the broker charges and keeps it) — not added into premium. {"state":"California","premium":1000,"carrier_fees":250} returns tax 39.75; the same call with broker_fees returns 31.80.

Calculate surplus lines taxes for a specific state and premium amount. This endpoint performs calculations using the same logic as the web calculator.

Request Body

Parameter Type Required Description
state string Yes State name or 2-letter abbreviation (case-insensitive). Examples: "Texas" or "TX", "California" or "CA".
Alabama (AL), Alaska (AK), Arizona (AZ), Arkansas (AR), California (CA), Colorado (CO), Connecticut (CT), Delaware (DE), District of Columbia (DC), Florida (FL), Georgia (GA), Hawaii (HI), Idaho (ID), Illinois (IL), Indiana (IN), Iowa (IA), Kansas (KS), Kentucky (KY), Louisiana (LA), Maine (ME), Maryland (MD), Massachusetts (MA), Michigan (MI), Minnesota (MN), Mississippi (MS), Missouri (MO), Montana (MT), Nebraska (NE), Nevada (NV), New Hampshire (NH), New Jersey (NJ), New Mexico (NM), New York (NY), North Carolina (NC), North Dakota (ND), Ohio (OH), Oklahoma (OK), Oregon (OR), Pennsylvania (PA), Puerto Rico (PR), Rhode Island (RI), South Carolina (SC), South Dakota (SD), Tennessee (TN), Texas (TX), Utah (UT), Vermont (VT), Virgin Islands (VI), Virginia (VA), Washington (WA), West Virginia (WV), Wisconsin (WI), Wyoming (WY)
premium number Yes Premium amount in USD (must be positive)
carrier_fees number No A fee the insurer required as a condition of the policy - a policy, inspection or underwriting fee. Taxable in almost every state. Do not add it into premium.
broker_fees number No A fee the broker charges the insured for its own services and keeps. California and Louisiana leave it out of the taxable amount; Vermont taxes it.
broker_fee_conditions_met boolean No Your declaration that the state's conditions for excluding your own fee are met. Only an explicit true changes anything, and the response records it as your assertion. carrier_fee_conditions_met behaves the same way.
lob string No One of the nine coverage codes. Optional, but send it: omitted, no coverage exemption or rate override is applied and the full rate is charged. A Florida cargo policy is 3.08 with SLT-CARGO and 509.43 without any code — the response warns, but the number is already wrong by $506.
jurisdiction string No Kentucky only. The 4-digit jurisdiction code or city name, for the local government premium tax - set by 417 jurisdictions and often larger than the state tax. Left out, the response says the municipal tax was excluded.
effective_date string No Optional: Date for historical calculation in YYYY-MM-DD format (e.g., "2024-06-15"). Leave empty for current rates. Automatically falls back to current rates if historical data is unavailable.

Example Request

curl -X POST "https://n8nsandbox.undtec.com/webhook/slapi/internal/v3/calculate" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "California",
    "premium": 10000,
    "carrier_fees": 250,
    "lob": "SLT-PROP"
  }'

Response

{
  "state": "California",
  "premium": 10000,
  "fees": 250,
  "carrier_fees": 250,
  "broker_fees": 0,
  "wholesaler_fees": 0,
  "fee_split_given": true,
  "fees_as_sent": 0,
  "conditions_met": {
    "carrier": false,
    "broker": false,
    "wholesaler": false
  },
  "lob": "SLT-PROP",
  "effective_date": null,
  "jurisdiction": null,
  "success": true,
  "rates_from": "current-v3",
  "useHistoricalRates": false,
  "stateData": {
    "state": "California",
    "state_code": "CA",
    "legislative_source": "https://www.slacal.com/resources/broker-taxes-fees",
    "effective_from": null,
    "effective_to": null,
    "data_source": "v3"
  },
  "calculation": {
    "premium": 10000,
    "breakdown": {
      "base_tax": {
        "rate": "3%",
        "amount": 307.5,
        "name": "Surplus Line Premium Tax",
        "source": "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=INS&sectionNum=1775.5"
      },
      "stamping_fee": {
        "rate": "0.18%",
        "amount": 18.45,
        "name": "Stamping Fee",
        "source": "https://www.slacal.com/resources/broker-taxes-fees"
      }
    },
    "total_tax": 325.95,
    "total_due": 10575.95,
    "fees_taxable": 250,
    "fees_exempt": 0
  },
  "state_rules": {
    "rounding": {
      "applied": "cent",
      "rule": {
        "exists": "yes",
        "unit": "dollar",
        "when": "aggregate",
        "applies_to": [
          "premium",
          "tax",
          "fees",
          "total"
        ],
        "citation": "Cal. Dep't of Insurance Form FS-006, surplus line broker tax return instructions (2025 rev. 11)"
      }
    },
    "fee_cap": {
      "exists": "conditional",
      "amount": 250,
      "exceeded": false,
      "verified_against_transaction": false,
      "citation": "Cal. Ins. Code s 1764.1(a)(2), (b) notice para. 8, (d)(2) (amended Stats. 2019, Ch. 201, s 9); Cal. Ins. Code s 1623(a)(3); 10 CCR tit. 10, ss 2189.1, 2189.3, 2189.5(d)"
    },
    "both_fees_allowed": null,
    "commission_rules": null
  },
  "notes": [
    "Line of business: SLT-PROP (property)",
    "CA restricts what a broker may charge the insured (Cal. Ins. Code s 1764.1(a)(2), (b) notice para. 8, (d)(2) (amended Stats. 2019, Ch. 201, s 9); Cal. Ins. Code s 1623(a)(). Not verified against this transaction.",
    "carrier fee 250 is inside the taxable base (PRIMARY (broker side): letter of Dennis C. Ward, Chief, Enforcement Division, California Department of Insurance, to the)"
  ],
  "stamp": [
    {
      "instrument": "D1 signed at application",
      "ordinal": 1,
      "wording": "IMPORTANT NOTICE: 1. The insurance policy that you are applying to purchase is being issued by an insurer that is not licensed by the State of California. ... [abbreviated here; the API returns all 8 numbered paragraphs, about 2,500 characters]",
      "how_it_must_appear": "boldface 16-point type on a FREESTANDING document that the applicant SIGNS; the broker keeps the signed copy 5 years. Not required for a renewal with the same carrier, nor for an industrial insured (s 1764.1(c)).",
      "style": { "pt": 16, "bold": true },
      "citation": "D-1, signed at application. Cal. Ins. Code s 1764.1(b), leginfo.legislature.ca.gov, retrieved 2026-08-13.",
      "provenance": "state_first_party",
      "provenance_note": null,
      "verified_at": "2026-08-17"
    },
    {
      "instrument": "D2 affixed to policy",
      "ordinal": 2,
      "wording": "IMPORTANT NOTICE: 1. The insurance policy that you have purchased is being issued by an insurer that is not licensed by the State of California. ... [abbreviated here]",
      "how_it_must_appear": "boldface 16-point type, contained in or affixed to the FRONT of the policy or certificate. No signature.",
      "style": { "pt": 16, "bold": true },
      "citation": "D-2, affixed to the policy. Cal. Ins. Code s 1764.1(b), leginfo.legislature.ca.gov, retrieved 2026-08-13.",
      "provenance": "state_first_party",
      "provenance_note": null,
      "verified_at": "2026-08-17"
    }
  ]
}

California is one of eight states that prescribe more than one instrument: D-1 is signed at application, D-2 is affixed to the policy, and both are returned. The wording above is abbreviated to keep this page readable — the API returns each notice in full, about 2,500 characters. See the stamp block for the field meanings.

Example Request - Historical Calculation

curl -X POST https://n8nsandbox.undtec.com/webhook/slapi/internal/v3/calculate \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "California",
    "premium": 10000,
    "carrier_fees": 250,
    "lob": "SLT-PROP",
    "effective_date": "2022-06-01"
  }'

Response - Historical

The charges in force on that date. California's stamping fee was 0.25% before 2023, so the tax is higher than today's.

{
  "success": true,
  "state": "California",
  "effective_date": "2022-06-01",
  "rates_from": "historical",
  "calculation": {
    "premium": 10000,
    "breakdown": {
      "base_tax": {
        "rate": "3%",
        "amount": 307.5,
        "name": "Surplus Line Premium Tax",
        "source": "https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=INS&sectionNum=1775.5"
      },
      "stamping_fee": {
        "rate": "0.25%",
        "amount": 25.63,
        "name": "Stamping Fee",
        "source": "https://www.slacal.com/resources/2023-stamping-fee-decrease-procedures"
      }
    },
    "total_tax": 333.13,
    "total_due": 10583.13,
    "fees_taxable": 250,
    "fees_exempt": 0
  }
}

Response Fields

Money sits under calculation. The fields around it record what was asked, what was applied, and why.

Field Type Description
success boolean True when the calculation completed. Errors return error: true with a code.
state string The state as resolved, in full.
premium number What was received. carrier_fees and broker_fees are echoed separately so the side used is visible.
conditions_met object Which side declarations you sent. Recorded as your assertion, never assumed.
lob, effective_date, jurisdiction string The coverage, date and Kentucky jurisdiction used.
rates_from string Whether the charges came from today or from a dated period.
calculation.premium number The premium the charges were applied to.
calculation.breakdown object One entry per charge, each with rate, amount, name - the name that state itself uses - and source, a URL for the document that sets it. Unused slots are null.
calculation.total_tax number Every charge added together.
calculation.total_due number premium + fees + total_tax.
calculation.fees_taxable number How much of the fee ended inside the taxable amount.
calculation.fees_exempt number How much was left out. notes gives the authority.
state_rules.rounding object applied is what this calculation did; rule is what the state requires, including whether it applies per policy or on the return, with a citation.
state_rules.fee_cap object Any cap the state places on a broker fee, with its citation. Reported, not enforced.
notes array Why a fee was taxed or exempted, and which authority says so.
warnings array Where a state publishes an exemption a single call cannot verify. Never applied silently.

A dated calculation does not need this endpoint: send effective_date to /v1/calculate and the charges in force on that date are applied. Use this endpoint when you want the rates themselves rather than a tax figure.

GET /v1/historical-rates

Retrieve historical surplus lines tax rates for any state at a specific date. Look up what tax rates were in effect on any given date to verify past calculations or audit historical policies.

Returns the charges in force for a state on a date - each one named as that state names it, with the document that sets it. A charge whose effective_from equals earliest_verified has been in force at least since that date rather than having changed then.

Query Parameters

Parameter Type Required Description
state string Yes State name or 2-letter abbreviation (case-insensitive). Examples: "Texas" or "TX", "Iowa" or "IA"
date string No Date to look up rates for in YYYY-MM-DD format. Example: "2025-01-15". Defaults to today's date if not provided.

Example Request

curl "https://n8nsandbox.undtec.com/webhook/sltax_history_list?state=Texas&date=2024-01-02" \
  -H "X-API-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "state": "Texas",
  "state_code": "TX",
  "effective_date": "2024-01-02",
  "rates_from": "historical",
  "charges": [
    {
      "key": "sl_tax",
      "name": "Surplus Lines Premium Tax",
      "rate": "4.85%",
      "basis": "percent",
      "source": "https://comptroller.texas.gov/taxes/insurance/surplus-lines.php",
      "effective_from": "2020-01-01"
    },
    {
      "key": "stamping_fee",
      "name": "Stamping Fee",
      "rate": "0.04%",
      "basis": "percent",
      "source": "https://www.sltx.org/brokers/billing-information/stamping-fees-taxes/",
      "effective_from": "2024-01-01"
    }
  ],
  "payment_frequency": null,
  "rounding_rule": "Whole dollars for premium, cents for the tax on the return total, not per policy. (Tex. Form 25-104 (printed column headings))",
  "legislative_source": "https://comptroller.texas.gov/taxes/insurance/surplus-lines.php",
  "earliest_verified": "2020-01-01",
  "account": {
    "balance": "9.62",
    "free_queries_remaining": 0,
    "was_free_query": false
  }
}

Example: Iowa Rate Lookup

curl "https://n8nsandbox.undtec.com/webhook/sltax_history_list?state=Iowa&date=2025-06-15" \
  -H "X-API-Key: YOUR_API_KEY"

Response (showing Iowa's 2025 rate during the phase-down period):

{
  "success": true,
  "state": "Iowa",
  "state_code": "IA",
  "effective_date": "2025-06-15",
  "rates_from": "historical",
  "charges": [
    {
      "key": "sl_tax",
      "name": "Premium Tax",
      "rate": "0.95%",
      "basis": "percent",
      "source": "https://www.legis.iowa.gov/docs/code/432.1.pdf",
      "effective_from": "2025-01-01"
    }
  ],
  "payment_frequency": null,
  "rounding_rule": null,
  "legislative_source": "https://www.legis.iowa.gov/docs/code/432.1.pdf",
  "earliest_verified": "2020-01-01",
  "account": {
    "balance": "9.62",
    "free_queries_remaining": 0,
    "was_free_query": false
  }
}

Error Response

If required parameters are missing:

{
  "error": true,
  "code": "MISSING_STATE",
  "message": "state is required. Send a two-letter code or a full name.",
  "statusCode": 400
}

Use Cases

  • Policy Audits: Verify that correct tax rates were applied to historical policies
  • Backdated Calculations: Calculate taxes for policies with inception dates in the past
  • Compliance Reports: Generate reports showing what rates were in effect at specific dates
  • Dispute Resolution: Confirm historical rates for billing or regulatory inquiries

Response Format

All API responses follow a consistent format:

Success Response

{
  "success": true,
  "state": "California",
  "calculation": {
    "premium": 10000,
    "breakdown": { "base_tax": { "rate": "3%", "amount": 307.50, "name": "Surplus Line Premium Tax", "source": "https://leginfo.legislature.ca.gov/..." } },
    "total_tax": 325.95,
    "total_due": 10575.95,
    "fees_taxable": 250,
    "fees_exempt": 0
  },
  "state_rules": { "rounding": { "applied": "cent", "rule": { "exists": "yes", "unit": "dollar", "when": "aggregate" } } },
  "notes": [ "carrier fee 250 is inside the taxable base (...)" ],
  "warnings": [],
  "lob": "SLT-PROP",
  "stamp": [
    {
      "instrument": "stamp",
      "ordinal": 1,
      "wording": "This insurance has been placed with an insurer that is not licensed by the state of Michigan...",
      "how_it_must_appear": "\"printed, typed, or stamped in RED INK upon its FACE, in not less than 10-point type\"",
      "style": { "pt": 10, "ink": "red" },
      "citation": "MCL 500.1922 (\"Notice on face of instrument evidencing surplus lines insurance\")",
      "provenance": "state_first_party",
      "provenance_note": null,
      "verified_at": "2026-08-14"
    }
  ]
}

The stamp block

stamp carries the notice the state requires on the policy, read from the state's own law. wording is the state's words unaltered. how_it_must_appear is the appearance rule as the statute states it, and style is the same rule as data — pt, bold, ink, caps — so you can render it without parsing prose.

Three things worth knowing before you rely on it:

  • It is an array, and eight states use more than one entry. Arizona and North Carolina each prescribe two notices that say the opposite about the insurer, so which one applies depends on the insurer rather than on preference.
  • An empty array is an answer. Four jurisdictions prescribe no wording: the District of Columbia and Indiana prescribe no notice at all, Oklahoma prescribes the format and the fact but no words, and Virginia prescribes a form its Commission has not published.
  • style.forms means the state permits a choice. Idaho allows either red ink at 10-point bold or black ink at 12-point bold. Neither is a default.

Where provenance is commercial_reproduction, the wording comes from a publisher's copy of a state that sells its code and publishes no free text, and provenance_note says so. Seven jurisdictions are in that position; display the note with the wording.

Error Response

{
  "error": true,
  "code": "FEE_TYPE_REQUIRED",
  "message": "CA taxes a fee differently depending on who charged it, so a total of 250 cannot be priced. Split it into carrier_fees, broker_fees or wholesaler_fees.",
  "statusCode": 400
}

Error Codes

Every error names itself and says what to do. Two of them exist because a wrong number is worse than no number:

Code HTTP When it happens
FEE_TYPE_REQUIRED 400 A fee was sent without saying who charged it, to one of the 10 jurisdictions that tax the sides differently. Send carrier_fees or broker_fees. The request is refused rather than priced on a guess.
NO_RATES_FOR_DATE 404 Nothing is on file in force on the requested date. Refused rather than returning zero. Verified data begins 2020-01-01.
MISSING_STATE / INVALID_STATE 400 No state, or one that could not be resolved from a code or full name.
INVALID_PREMIUM 400 Premium missing, non-numeric or negative.
MISSING_API_KEY / INVALID_API_KEY 401 No key, or a key that is not active.
INSUFFICIENT_BALANCE 402 No free queries left and the wallet cannot cover the call.
RATE_LIMIT_EXCEEDED 429 Too many requests in the window.
INTERNAL_ERROR 500 Something failed on our side. Nothing is charged.

An unsplit fee in California, and the reply:

{
  "error": true,
  "code": "FEE_TYPE_REQUIRED",
  "message": "CA taxes a fee differently depending on who charged it, so a total of 250 cannot be priced. Split it into carrier_fees (a policy, inspection, underwriting or filing fee the insurer required), broker_fees (your own charge for your own services, which you keep) and wholesaler_fees (a wholesaler or MGU's charge).",
  "statusCode": 400
}

A date with nothing on file:

{
  "error": true,
  "code": "NO_RATES_FOR_DATE",
  "message": "No surplus-lines rules are on file for CA effective 2019-01-01. Verified data for this state begins 2020-01-01.",
  "statusCode": 404
}

Coverage Codes

Send one of these nine codes as lob. The code decides which of a state's rules apply, so it changes the money: in Florida the same $10,000 policy is 3.08 as SLT-CARGO and 509.43 as SLT-PROP. A code we do not publish is refused with UNKNOWN_LOB rather than rated as though no line had been given.

The list is short on purpose. The market recognises many more lines — builders risk, liquor liability, umbrella, D&O, cyber — but no state's surplus lines law distinguishes them, so a longer list would promise a precision the statutes do not have. The third column says which market lines belong under each code. The NAIC annual statement line is given so you can check our classification against something neither we nor any vendor controls.

This list changes rarely and is published here rather than through an endpoint. If you need it programmatically, say so and we will expose it.

Code Line of business What falls under it NAIC line
SLT-APD Auto Physical Damage Commercial auto liability rates the same way (NAIC 19.3, 19.4) 21.1
SLT-AVIA Aviation Many states exempt aircraft in scheduled interstate flight 22
SLT-GL General / Casualty Includes liquor, umbrella and excess, completed operations, product liability 17
SLT-MEDMAL Medical Malpractice Medical professional liability only 11
SLT-MARINE Ocean / Wet Marine Wet marine and transportation insurance as the statutes name it 8
SLT-PROFL Professional Liability (non-medical) Includes E&O, D&O, employment practices, cyber 17
SLT-PROP Property Includes commercial property and builders risk (NAIC 05.0001) 1, 2.1
SLT-CARGO Transportation / Motor Truck Cargo Wet marine and transportation insurance, as the statutes name it. The line most often treated differently: 14 jurisdictions exempt it or apply another rate. 9
SLT-WC Workers Compensation Standard and alternative workers compensation, employers liability, excess and occupational accident (NAIC sub-types 16.0001–16.0005). Taxed at the full state rate everywhere — no surplus lines law treats it differently. This is the tax treatment, not whether the risk may be placed with a non-admitted insurer. 16

State-Specific Rules

These are not switches you set. The coverage, the fee side, the date and the jurisdiction you send are matched against each state's own rules, so the same request produces different charges in different states. Every figure below is a real response to $10,000 premium and a $250 fee.

What changes it Example Result
Coverage exempts the tax Florida, lob: SLT-CARGO (transportation) tax 3.08 - only the service fee applies; the 4.94% tax does not. The same policy as property is 509.43
Who charged the fee California, carrier_fees vs broker_fees 325.95 against 318.00. Louisiana behaves the same way; Vermont taxes a broker fee either way (307.50)
A local tax that needs a city Kentucky, with and without jurisdiction 1004.50 with a jurisdiction against 492.00 without one. The local government premium tax is set by 417 jurisdictions and here it is larger than the state tax. Left out, the response says it was excluded
One levy invoiced as two lines Louisiana 4.656% tax plus a 0.194% fire marshal share plus the 0.175% transaction fee, totalling 502.50 - matching the filing platform's own invoice
A per-transaction platform fee South Dakota tax plus a 0.175% transaction fee, 274.19. Nine states carry this charge and they file through two different operators, so each one is named as its own documents name it
The date California, effective_date: 2022-06-01 333.13 - the stamping fee was 0.25% before 2023

Rounding

Thirteen jurisdictions publish a rounding rule and they do not agree with each other, so the response tells you both what the state requires and what the calculation did.

State Rule
California To the whole dollar on the return total - so a single policy's tax still comes back to the cent
Illinois, South Carolina, Idaho To the whole dollar, per policy
Texas, West Virginia Whole dollars for premium, cents for the tax
New Jersey Rounding is prohibited; the return is filed to the cent
Everywhere else No published rule. Amounts come back to the cent

The forty jurisdictions with no published rule are left to the cent rather than rounded on an assumption.

Best Practices

Caching

Rates change on published dates, not continuously. Caching a result is safe as long as the cache key includes everything that changes the answer: state, premium, the fee and which side charged it, lob, jurisdiction and effective_date. A key of state plus premium alone will serve a wrong figure the moment a fee or a coverage differs.

Error Handling

Always check the success field in responses. Implement retry logic with exponential backoff for transient errors.

State Names

You can use either full state names (e.g., "Texas") or 2-letter abbreviations (e.g., "TX"). Both formats are case-insensitive.

Validating Inputs

Send the premium alone and the fee in its own field - adding the fee into premium silently removes the state's fee rule from the calculation. If you cannot tell who charged a fee, send it as carrier_fees: that is the taxable direction in almost every state, and over-collecting is recoverable while under-reporting a premium tax is not.

Testing

Compare a state that taxes a broker fee against one that does not - California returns 325.95 with carrier_fees and 318.00 with broker_fees on the same $10,000 and $250. If both come back identical, the fee is not reaching the API as a fee. New accounts include 100 free API calls.

SDKs and Libraries

The API is REST-based and can be called from any HTTP client. Here are examples for common languages:

JavaScript (Node.js)
const response = await fetch('https://n8nsandbox.undtec.com/webhook/slapi/internal/v3/calculate', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    state: 'California',
    premium: 25000,
    lob: 'SLT-PROP'
  })
});
const result = await response.json();
console.log(`Total: $${result.total_due.toLocaleString()}`);
Python
import requests

headers = {
    'X-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
}
payload = {
    'state': 'Texas',
    'premium': 50000,
    'lob': 'SLT-PROP'
}
response = requests.post('https://n8nsandbox.undtec.com/webhook/slapi/internal/v3/calculate',
                         json=payload, headers=headers)
result = response.json()
print(f"Total with taxes: ${result['total_due']:,.2f}")