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

# Update Tax Profile

PATCH https://api.papertracc.com/v1/configs/tax/{id}
Content-Type: application/json

Updates a tax profile. `deduct_on` and `withholding_basis` can be changed on withholding tax profiles only. The tax `kind` cannot be changed after creation.

Requires the `can_modify_tax_profile` permission on the key owner's role.

**Keys:** secret key only.

Reference: https://api-docs.papertracc.com/core/configurations/tax-profiles/update-tax-profile

## Authentication

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

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Path parameters

- `id` (string, required)

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional)
- `rate` (double, optional)
- `is_active` (boolean, optional)
- `is_recoverable` (boolean, optional)
- `is_compound` (boolean, optional)
- `input_account_id` (string, optional)
- `output_account_id` (string, optional)
- `deduct_on` (enum, optional) — When withholding tax is deducted. Only applies to WHT profiles. PAYMENT deducts it when the vendor is paid or the customer pays. BILL is reserved and not yet supported for posting.
  - Allowed values: `PAYMENT`, `BILL`
- `withholding_basis` (enum, optional) — What the withholding rate applies to when a payment or receipt does not state its own base. `EXCL_VAT` uses the VAT-exclusive share of the amount being settled. `INCL_VAT` uses the full amount being settled. Only applies to WHT profiles. Rejected on VAT profiles.
  - Allowed values: `EXCL_VAT`, `INCL_VAT`

## Response

### 200

OK

- `status` (boolean, required)
- `message` (string, required)
- `data` (any, optional)

## Errors

### 401 Unauthorized Error

The API key is missing or invalid, the key owner is no longer an active member of the organisation, or the key owner is not a member of the workspace in the `identity` header.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

### 403 Forbidden Error

The key owner's role does not include the permission this endpoint needs. `permission` names the missing permission.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

## Examples

**Request**

```json
{
  "name": "VAT 7.5%",
  "rate": 7.5,
  "is_active": true,
  "is_recoverable": true,
  "is_compound": false,
  "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
  "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
}
```

**Response**

```json
{
  "status": true,
  "message": "Successfully updated tax profile"
}
```

**SDK Code**

```python Configurations_Tax Profiles_Update Tax Profile_example
import requests

url = "https://api.papertracc.com/v1/configs/tax/id"

payload = {
    "name": "VAT 7.5%",
    "rate": 7.5,
    "is_active": True,
    "is_recoverable": True,
    "is_compound": False,
    "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
    "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Configurations_Tax Profiles_Update Tax Profile_example
const url = 'https://api.papertracc.com/v1/configs/tax/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"VAT 7.5%","rate":7.5,"is_active":true,"is_recoverable":true,"is_compound":false,"input_account_id":"b85a9785-fbbd-4858-b9cd-c79ab926e70e","output_account_id":"2b0d1461-e52e-4a1a-a69c-11801431c2c9"}'
};

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

```go Configurations_Tax Profiles_Update Tax Profile_example
package main

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

func main() {

	url := "https://api.papertracc.com/v1/configs/tax/id"

	payload := strings.NewReader("{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"is_active\": true,\n  \"is_recoverable\": true,\n  \"is_compound\": false,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n}")

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

	req.Header.Add("Authorization", "Bearer <apiKey>")
	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 Configurations_Tax Profiles_Update Tax Profile_example
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/configs/tax/id")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"is_active\": true,\n  \"is_recoverable\": true,\n  \"is_compound\": false,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n}"

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

```java Configurations_Tax Profiles_Update Tax Profile_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.papertracc.com/v1/configs/tax/id")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"is_active\": true,\n  \"is_recoverable\": true,\n  \"is_compound\": false,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n}")
  .asString();
```

```php Configurations_Tax Profiles_Update Tax Profile_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.papertracc.com/v1/configs/tax/id', [
  'body' => '{
  "name": "VAT 7.5%",
  "rate": 7.5,
  "is_active": true,
  "is_recoverable": true,
  "is_compound": false,
  "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
  "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Configurations_Tax Profiles_Update Tax Profile_example
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/configs/tax/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"is_active\": true,\n  \"is_recoverable\": true,\n  \"is_compound\": false,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Configurations_Tax Profiles_Update Tax Profile_example
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "VAT 7.5%",
  "rate": 7.5,
  "is_active": true,
  "is_recoverable": true,
  "is_compound": false,
  "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
  "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/configs/tax/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()
```