---
title: "Calculate tax for a cart"
method: POST
path: "/v1/cart/calculate"
tags: ["Rates"]
---

# Calculate tax for a cart

`POST /v1/cart/calculate`

## Request

- Base URL: `https://api.taxlocus.com`
- URL: `https://api.taxlocus.com/v1/cart/calculate`
- Auth: HTTP bearer

Compute per-line and total tax for a multi-line cart shipped to a single destination.

## Request body

- object
  - `lat` number
  - `lng` number
  - `address` object
    - `line1` string, required
    - `city` string, required
    - `state` string, required
    - `postal_code` string, required
  - `as_of` string, date
  - `line_items` object[], required
    - `item_id` string
    - `product_category` string, required
    - `quantity` number, required
    - `unit_price` number, required
    - `sku` string
    - `b2b` boolean
  - `customer_ref` string

## Response `200`

Per-line and total cart tax.

- object

## Other responses

- `400`: Error response.
- `401`: Error response.
- `429`: Error response.
- `500`: Error response.

---

[API](https://skmtc.dev/taxlocus/apis/taxlocus-rest-api.md) · [All operations](https://skmtc.dev/taxlocus/apis/taxlocus-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/taxlocus/apis/taxlocus-rest-api/revisions/f3d4b84bdc56?raw)
