Look up the automatic sales tax rate for an address
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/sales-tax/v1-misc-calc-tax.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
POST/
Returns the US sales tax rate YoPrint's automatic sales tax would apply when shipping to an address, and whether shipping is taxable. It returns a rate, not a tax amount, and saves nothing.
The rate is tax-free (type tax_free, total 0) when your team is not on a US plan, the customer is tax exempt, the address is outside the US, your team has no nexus address in the address's state, or that state has no sales tax. Otherwise YoPrint locates the address and looks up its combined rate, applying each state's origin or destination rules.
total is the combined rate as the percentage × 10,000: 8.25% is 82500. This is not the thousandths used for other rates in the API (where 8.25% is 8250).
Business rules
address_idis required. Withcustomer_id, the address must belong to that customer or to your team.- Only US destinations get a rate; everything else is tax-free.
Side effects
- Looks the address up with an external geocoding service and a tax rate service. Results are cached, so repeat lookups are fast. Nothing is charged to your team.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
Request body
application/json, required.
The ship-to address id: one of the customer's addresses, or one of your team's.
customer_idstringOptional. The customer: their tax exemption applies, and the address must be theirs or your team's.
Response
200Successful response.
Child fields (3)
Whether shipping charges are taxed at this address. On a tax-free answer it is often
trueand means nothing: nothing is taxed.The combined rate, as the percentage × 10,000: 8.25% is
82500. A string ("82500") or a number (82500), depending on the state;0when tax-free. Parse both.single_tax: one combined rate intotal.- One of:
"tax_free","single_tax"
- One of:
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- The address or customer does not exist on this team, or the address belongs to another customer.
- Fix
- Use an address of this customer or of your team.
422The request was refused and changed nothing:
validation_failedlists what to fix inerror.fields, other codes name a business rule. When the team's plan does not include the feature, the body is only{"message": "This feature is not available to your team's plan."}.- When
- Your plan does not include automatic sales tax (a plain
{"message": "This feature is not available to your team's plan."}body). - Fix
- Upgrade the plan, or set tax on the order yourself.
- When
address_idis missing, oraddress_idorcustomer_idis not an id of this team (validation_failed;error.fieldsnames the field).- Fix
- Send the ship-to address id.
- When
- The rate could not be looked up (
auto_tax_calculation_failed, "Auto Tax calculation failed. Please retry later."). - Fix
- Retry later.
Notes
- A tax-free answer does not say why (not US, exempt, no nexus in that state, or a state without sales tax). Check the customer's exemption and your nexus addresses if you expected tax.
