RespireSoft InvoicingAPI docsReferenceWebhooks

Tax rates

VAT and other taxes.

List tax rates

GET /v1/tax_rates

Key scope catalog:read

Newest first, 20 at a time. See pagination.

Query: country, kind, limit, starting_after

curl
curl "https://api.invoicing.respiresoft.com/v1/tax_rates?limit=10" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/tax_rates?limit=10", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
  },
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/tax_rates?limit=10");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("GET", "https://api.invoicing.respiresoft.com/v1/tax_rates?limit=10",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()

Retrieve tax rate

GET /v1/tax_rates/{id}

Key scope catalog:read

curl
curl "https://api.invoicing.respiresoft.com/v1/tax_rates/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/tax_rates/ID", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
  },
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/tax_rates/ID");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("GET", "https://api.invoicing.respiresoft.com/v1/tax_rates/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()

Create tax rate

POST /v1/tax_rates

Key scope catalog:write. Send an Idempotency-Key header

FieldTypeMeaning
name requiredstring
basis_points requiredinteger2100 is 21%.
countrystring
inclusivebooleanPrices already include it.
kindstring
curl
curl -X POST "https://api.invoicing.respiresoft.com/v1/tax_rates" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"VAT 21%","basis_points":2100,"country":"NL"}'
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/tax_rates", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "VAT 21%",
    "basis_points": 2100,
    "country": "NL"
  }),
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/tax_rates");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
        "Idempotency-Key: " . bin2hex(random_bytes(16)),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "name" => "VAT 21%",
        "basis_points" => 2100,
        "country" => "NL",
    ]),
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("POST", "https://api.invoicing.respiresoft.com/v1/tax_rates",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
      "name": "VAT 21%",
      "basis_points": 2100,
      "country": "NL"
    },
)
data = res.json()

Update tax rate

PATCH /v1/tax_rates/{id}

Key scope catalog:write

Send only what changes. POST to the same address works too.

FieldTypeMeaning
namestring
basis_pointsinteger2100 is 21%.
countrystring
inclusivebooleanPrices already include it.
kindstring
curl
curl -X PATCH "https://api.invoicing.respiresoft.com/v1/tax_rates/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"VAT 21%","basis_points":2100,"country":"NL"}'
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/tax_rates/ID", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "VAT 21%",
    "basis_points": 2100,
    "country": "NL"
  }),
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/tax_rates/ID");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "name" => "VAT 21%",
        "basis_points" => 2100,
        "country" => "NL",
    ]),
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("PATCH", "https://api.invoicing.respiresoft.com/v1/tax_rates/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
    json={
      "name": "VAT 21%",
      "basis_points": 2100,
      "country": "NL"
    },
)
data = res.json()

Delete tax rate

DELETE /v1/tax_rates/{id}

Key scope catalog:write

curl
curl -X DELETE "https://api.invoicing.respiresoft.com/v1/tax_rates/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/tax_rates/ID", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
  },
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/tax_rates/ID");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("DELETE", "https://api.invoicing.respiresoft.com/v1/tax_rates/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()