curl --request PUT \
--url https://api.exowpee.com/v1/catalog/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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 taxes of an item
Chooses which taxes apply to one item, or lets it inherit from its category.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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/stockables/{stockable}/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": {}
}variant_taxes.update, bundle_taxes.update
Conditions
- The permission depends on the type of item: variant_taxes.update or bundle_taxes.update.
- At least one of tax_configuration_mode, is_taxable, vat_rate_id or tax_ids must be sent, and no other field is accepted.
- In custom mode is_taxable must be known: sent now or already stored; it cannot be null.
- In inherit mode tax_ids must be empty; listing taxes explicitly is refused.
- vat_rate_id must be an active VAT rate of the organization’s tax profile; every tax in tax_ids must be active, of item scope, not of kind VAT and listed only once.
- The change is refused when it would make a stored price of this item impossible to calculate, unless it was already impossible.
- Writes the item’s tax configuration for the current fiscal profile; the mode defaults to inherit when none exists. In inherit mode is_taxable and vat_rate_id are stored as null and the item follows its category.
- Replaces the item’s explicit taxes with tax_ids, keeping the order sent; in inherit mode it deletes any explicit tax of the item.
- Changes how stored prices of this item are taxed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the sellable item (stockable): the stockable record of a product variant or of a bundle, not the variant or bundle identifier itself.
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 item is taxed, used in custom mode (required then, sent or already stored). Ignored and stored as null in inherit mode.
Identifier of an active VAT rate of the organization's tax profile, used in custom mode. null clears it; omitted keeps the stored value; stored as null in inherit mode.
27inherit: the item follows its category and no explicit taxes are allowed (existing ones are deleted); custom: the item uses its own taxable flag, VAT rate and taxes. When omitted, the stored mode is kept, or inherit when none exists.
inherit, custom Identifiers (27-character KSUID strings) of the item's additional taxes, in the order they apply. The list replaces the stored one. Must be empty in inherit mode; taxes must be active, of item scope, not of kind VAT, and listed once. At least one of the four fields is required.
27Response
Resource (only with response=resource).
Items of this page.
Show child attributes
Show child attributes