> This page is for version v2024-05-25 (default).
> For other versions, use one of these documentation indexes:
> - v2024-05-25 (default): https://docs.monite.com/v-2024-05-25/llms.txt
> - v2024-01-31: https://docs.monite.com/v2024-01-31/llms.txt
> - v2023-09-01: https://docs.monite.com/v2023-09-01/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Update a tax rate

PATCH https://api.sandbox.monite.com/v1/accounting_tax_rates/{tax_rate_id}
Content-Type: application/json

Only tax rates that were manually added by the entity (as indicated by `is_external` = `false`) can be updated.

Tax rates fetched from accounting systems as part of the [accounting integration](https://docs.monite.com/accounting/integration/index) (indicated by `is_external` = `true`) cannot be updated from within Monite.

Reference: https://docs.monite.com/api/accounting-tax-rates/patch-accounting-tax-rates-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Path parameters

- `tax_rate_id` (string, required)

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

### Body (application/json)

This endpoint expects an object.

- `code` (string, optional) — The new reference code of the tax rate.
- `description` (string, optional) — The new description of the tax rate.
- `effective_tax_rate` (integer, optional) — The new tax rate value as the percentage multiplied by 100. For example, 12.5% is represented as 1250.
- `name` (string, optional) — The new display name of the tax rate.

## Response

### 200

Successful Response

- `id` (string, required) — A unique Monite-generated ID assigned to this tax rate. You can use this ID as the value of the `accounting_tax_rate_id` field in line items of payables, receivables, and receipts.
- `created_at` (datetime, required) — UTC date and time when this tax rate was created in Monite. Timestamps follow the ISO 8601 format.
- `updated_at` (datetime, required) — UTC date and time when this tax rate was last updated in Monite.
- `code` (string, optional) — The reference code of the tax rate.
- `components` (list of TaxComponentResponse, optional) — An array of tax components.
- `description` (string, optional) — An arbitrary description of the tax rate.
- `effective_tax_rate` (integer, optional) — The effective tax rate value as the percentage multiplied by 100. For example, 12.5% is represented as 1250. For manually created tax rates (`is_external`=`false`), this is the tax rate value defined by the user. For tax rates fetched from accounting systems (`is_external`=`true`), the effective tax rate is calculated based on the `components`. * In case of QuickBooks, `effective_tax_rate` is the same as `total_tax_rate` and is the sum of all tax components. * In case of Xero, the effective rate can be higher than the sum total. This happens in the _compounded_ tax rate scenarios, where multiple taxes are applied in a sequence and later taxes are applied to amounts that already include earlier taxes.
- `is_external` (boolean, optional, default: false) — `true` if this tax rate was fetched from the connected accounting system, or `false` if it was created manually by the entity.
- `name` (string, optional) — The display name of the tax rate.
- `status` (string, optional)
- `total_tax_rate` (integer, optional) — Used only in tax rates fetched from accounting systems (`is_external`=`true`). Specifies the total (not compounded) tax rate value as the sum of all components. The value is the percentage multiplied by 100. For example, 12.5% is represented as 1250. For QuickBoooks, `total_tax_rate` is the same as `effective_tax_rate`.

## Errors

### 400 Patch Accounting Tax Rates ID Request Bad Request Error

Bad Request

- `error` (ErrorSchema, required)

### 401 Patch Accounting Tax Rates ID Request Unauthorized Error

The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.

- `error` (ErrorSchema, required)

### 403 Patch Accounting Tax Rates ID Request Forbidden Error

The specified access token does not have permissions to perform this operation.

- `error` (ErrorSchema, required)

### 404 Patch Accounting Tax Rates ID Request Not Found Error

Not found

- `error` (ErrorSchema, required)

### 409 Patch Accounting Tax Rates ID Request Conflict Error

Business logic error

- `error` (ErrorSchema, required)

### 422 Patch Accounting Tax Rates ID Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 429 Patch Accounting Tax Rates ID Request Too Many Requests Error

API rate limit has been exceeded. Check the response headers for the rate limit information.

- `any`

## Types

### TaxComponentResponse

- `is_compound` (boolean, optional) — A flag to indicate with the tax is calculated using the principle of compounding.
- `name` (string, optional)
- `rate` (integer, optional) — Component tax rate as a percentage multiplied by 100. For example, 12.5% is represented as 1250.

### ErrorSchema

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItem

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "id",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "code": "code",
  "components": [
    {
      "is_compound": true,
      "name": "name",
      "rate": 1
    }
  ],
  "description": "description",
  "effective_tax_rate": 1,
  "is_external": true,
  "name": "name",
  "status": "status",
  "total_tax_rate": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id"

payload = {}
headers = {
    "x-monite-version": "2024-05-25",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id';
const options = {
  method: 'PATCH',
  headers: {
    'x-monite-version': '2024-05-25',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-monite-version", "2024-05-25")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-monite-version"] = '2024-05-25'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id")
  .header("x-monite-version", "2024-05-25")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-05-25',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-monite-version", "2024-05-25");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-05-25",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/accounting_tax_rates/tax_rate_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```