curl --request PUT \
--url https://api.exowpee.com/v1/catalog/categories/{category}/taxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_taxable": true,
"vat_rate_id": "<string>",
"tax_ids": [
"<string>"
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/categories/{category}/taxes"
payload = {
"is_taxable": True,
"vat_rate_id": "<string>",
"tax_ids": ["<string>"]
}
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({is_taxable: true, vat_rate_id: '<string>', tax_ids: ['<string>']})
};
fetch('https://api.exowpee.com/v1/catalog/categories/{category}/taxes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/categories/{category}/taxes",
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([
'is_taxable' => true,
'vat_rate_id' => '<string>',
'tax_ids' => [
'<string>'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/categories/{category}/taxes"
payload := strings.NewReader("{\n \"is_taxable\": true,\n \"vat_rate_id\": \"<string>\",\n \"tax_ids\": [\n \"<string>\"\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))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/categories/{category}/taxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_taxable\": true,\n \"vat_rate_id\": \"<string>\",\n \"tax_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/categories/{category}/taxes")
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 \"is_taxable\": true,\n \"vat_rate_id\": \"<string>\",\n \"tax_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"country_code": "<string>",
"fiscal_status": "<string>",
"kind": "<string>",
"is_builtin": true,
"name": "<string>",
"code": "<string>",
"amount_type": "<string>",
"rate": "<string>",
"fixed_amount": 123,
"default_stockable_price_inclusion_policy": "<string>",
"default_order_calculation_base": "<string>",
"application_scope": "<string>",
"is_active": true,
"dependencies": [
"<unknown>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "<string>",
"errors": {}
}Set a category's taxes
Defines whether a category is taxable, its VAT rate and the other taxes applied to its items.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/categories/{category}/taxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_taxable": true,
"vat_rate_id": "<string>",
"tax_ids": [
"<string>"
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/categories/{category}/taxes"
payload = {
"is_taxable": True,
"vat_rate_id": "<string>",
"tax_ids": ["<string>"]
}
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({is_taxable: true, vat_rate_id: '<string>', tax_ids: ['<string>']})
};
fetch('https://api.exowpee.com/v1/catalog/categories/{category}/taxes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/categories/{category}/taxes",
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([
'is_taxable' => true,
'vat_rate_id' => '<string>',
'tax_ids' => [
'<string>'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/categories/{category}/taxes"
payload := strings.NewReader("{\n \"is_taxable\": true,\n \"vat_rate_id\": \"<string>\",\n \"tax_ids\": [\n \"<string>\"\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))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/categories/{category}/taxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_taxable\": true,\n \"vat_rate_id\": \"<string>\",\n \"tax_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/categories/{category}/taxes")
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 \"is_taxable\": true,\n \"vat_rate_id\": \"<string>\",\n \"tax_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"country_code": "<string>",
"fiscal_status": "<string>",
"kind": "<string>",
"is_builtin": true,
"name": "<string>",
"code": "<string>",
"amount_type": "<string>",
"rate": "<string>",
"fixed_amount": 123,
"default_stockable_price_inclusion_policy": "<string>",
"default_order_calculation_base": "<string>",
"application_scope": "<string>",
"is_active": true,
"dependencies": [
"<unknown>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "<string>",
"errors": {}
}category_taxes.update
Conditions
- At least one of is_taxable, vat_rate_id or tax_ids must be sent, and no other field is accepted.
- The vat_rate_id must be an active VAT rate of the organization’s tax profile (same country and fiscal status as the company).
- Every tax in tax_ids must exist in the organization’s current profile, be active, have the item scope, not be of kind VAT, and appear only once.
- When taxes are assigned, the profile must have exactly one active item-scope VAT tax and every tax reached through dependencies must be active, otherwise the call is refused.
- The change is refused when it would make a stored price of an item in this category impossible to calculate, unless it was already impossible.
- Rewrites the category’s tax configuration (taxable flag and VAT rate) for the current fiscal profile when is_taxable or vat_rate_id is sent.
- Replaces the whole list of additional taxes with tax_ids, keeping the order sent; an empty list removes them all.
- Changes how stored prices of items that inherit from this category are taxed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the category (27-character KSUID string).
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, country_code, fiscal_status, kind, is_builtin, name, code, amount_type, rate, fixed_amount, default_stockable_price_inclusion_policy, default_order_calculation_base, application_scope, is_active, dependencies, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .
Body
Whether the category is taxable in the company's current fiscal profile. When omitted, the stored value is kept (false when no configuration exists yet).
Identifier of an active VAT rate of the organization matching the company's country and fiscal status. Send null to clear it; when omitted, the stored value is kept.
27Identifiers (27-character KSUID strings) of the additional taxes of the category, in the order they apply. The list replaces the stored one; an empty list removes all of them. Taxes must be active, of item scope, not of kind VAT, and listed once. At least one of is_taxable, vat_rate_id or tax_ids is required.
27Response
Resource (only with response=resource).
Items of this page.
Show child attributes
Show child attributes