Update a tax
curl --request PUT \
--url https://core.nozle.app/api/v1/taxes/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tax": {
"name": "TVA",
"code": "french_standard_vat",
"rate": "20.0",
"description": "French standard VAT",
"applied_to_organization": true
}
}
'import requests
url = "https://core.nozle.app/api/v1/taxes/{code}"
payload = { "tax": {
"name": "TVA",
"code": "french_standard_vat",
"rate": "20.0",
"description": "French standard VAT",
"applied_to_organization": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tax: {
name: 'TVA',
code: 'french_standard_vat',
rate: '20.0',
description: 'French standard VAT',
applied_to_organization: true
}
})
};
fetch('https://core.nozle.app/api/v1/taxes/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/taxes/{code}"
payload := strings.NewReader("{\n \"tax\": {\n \"name\": \"TVA\",\n \"code\": \"french_standard_vat\",\n \"rate\": \"20.0\",\n \"description\": \"French standard VAT\",\n \"applied_to_organization\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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(string(body))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/taxes/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tax\": {\n \"name\": \"TVA\",\n \"code\": \"french_standard_vat\",\n \"rate\": \"20.0\",\n \"description\": \"French standard VAT\",\n \"applied_to_organization\": true\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/taxes/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tax' => [
'name' => 'TVA',
'code' => 'french_standard_vat',
'rate' => '20.0',
'description' => 'French standard VAT',
'applied_to_organization' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://core.nozle.app/api/v1/taxes/{code}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax\": {\n \"name\": \"TVA\",\n \"code\": \"french_standard_vat\",\n \"rate\": \"20.0\",\n \"description\": \"French standard VAT\",\n \"applied_to_organization\": true\n }\n}")
.asString();{
"tax": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Taxes
Update a tax
This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.
PUT
/
taxes
/
{code}
Update a tax
curl --request PUT \
--url https://core.nozle.app/api/v1/taxes/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tax": {
"name": "TVA",
"code": "french_standard_vat",
"rate": "20.0",
"description": "French standard VAT",
"applied_to_organization": true
}
}
'import requests
url = "https://core.nozle.app/api/v1/taxes/{code}"
payload = { "tax": {
"name": "TVA",
"code": "french_standard_vat",
"rate": "20.0",
"description": "French standard VAT",
"applied_to_organization": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tax: {
name: 'TVA',
code: 'french_standard_vat',
rate: '20.0',
description: 'French standard VAT',
applied_to_organization: true
}
})
};
fetch('https://core.nozle.app/api/v1/taxes/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/taxes/{code}"
payload := strings.NewReader("{\n \"tax\": {\n \"name\": \"TVA\",\n \"code\": \"french_standard_vat\",\n \"rate\": \"20.0\",\n \"description\": \"French standard VAT\",\n \"applied_to_organization\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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(string(body))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/taxes/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tax\": {\n \"name\": \"TVA\",\n \"code\": \"french_standard_vat\",\n \"rate\": \"20.0\",\n \"description\": \"French standard VAT\",\n \"applied_to_organization\": true\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/taxes/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tax' => [
'name' => 'TVA',
'code' => 'french_standard_vat',
'rate' => '20.0',
'description' => 'French standard VAT',
'applied_to_organization' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://core.nozle.app/api/v1/taxes/{code}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax\": {\n \"name\": \"TVA\",\n \"code\": \"french_standard_vat\",\n \"rate\": \"20.0\",\n \"description\": \"French standard VAT\",\n \"applied_to_organization\": true\n }\n}")
.asString();{
"tax": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The code of the tax. It serves as a unique identifier associated with a particular tax. The code is typically used for internal or system-level identification purposes.
Example:
"french_standard_vat"
Body
application/json
Tax update payload
Show child attributes
Show child attributes
Response
Tax updated
Show child attributes
Show child attributes