Create a shipping tax rule

POST https://api.tamio.com/v2/taxes/shipping-tax/create

Creates a new shipping tax rule. The tax can apply to all shipping methods or selected ones. Specify either a percentage rate or a fixed amount (when rate is 0). Rate and amount are mutually exclusive.

Body Parameters

label string*

Human-readable name for the shipping tax rule.

rate number*

Percentage tax rate (0–100). When 0, a fixed amount is required. Mutually exclusive with amount.

amount number

Fixed tax amount in smallest currency unit. Mutually exclusive with rate.

active boolean

Whether the shipping tax rule is active.

applies_to string

all_shippings — applies to every shipping method; selected_shippings — requires shippings array.

all_shippingsselected_shippings
shippings array of string

Shipping method UUIDs (required when applies_to is selected_shippings).

Responses

200 Shipping tax rule created

Shipping tax rule created

status integer
tax Tax
400 Validation or business-logic error
401 Missing or invalid API key
/taxes/shipping-tax/create
1const response = await fetch("https://api.tamio.com/v2/taxes/shipping-tax/create", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "tax": {
    "id": "string",
    "object": "tax",
    "rate": 0,
    "amount": 0,
    "label": "string",
    "active": false,
    "country": "string",
    "type": "product_tax",
    "applies_to": "string",
    "postcodes": [],
    "states": [],
    "payments": [],
    "categories": {},
    "products": []
  }
}