curl --request POST \
--url https://api.exowpee.com/v1/catalog/taxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"fixed_amount": 1,
"default_stockable_price_inclusion_policy": "<string>",
"is_active": true
}
'import requests
url = "https://api.exowpee.com/v1/catalog/taxes"
payload = {
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"fixed_amount": 1,
"default_stockable_price_inclusion_policy": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
rate: 499.9999995,
fixed_amount: 1,
default_stockable_price_inclusion_policy: '<string>',
is_active: true
})
};
fetch('https://api.exowpee.com/v1/catalog/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/taxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'code' => '<string>',
'rate' => 499.9999995,
'fixed_amount' => 1,
'default_stockable_price_inclusion_policy' => '<string>',
'is_active' => 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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/taxes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"fixed_amount\": 1,\n \"default_stockable_price_inclusion_policy\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/catalog/taxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"fixed_amount\": 1,\n \"default_stockable_price_inclusion_policy\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/taxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"fixed_amount\": 1,\n \"default_stockable_price_inclusion_policy\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}Create a tax
Creates a custom tax (rate or fixed amount) for items or orders.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/taxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"fixed_amount": 1,
"default_stockable_price_inclusion_policy": "<string>",
"is_active": true
}
'import requests
url = "https://api.exowpee.com/v1/catalog/taxes"
payload = {
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"fixed_amount": 1,
"default_stockable_price_inclusion_policy": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
code: '<string>',
rate: 499.9999995,
fixed_amount: 1,
default_stockable_price_inclusion_policy: '<string>',
is_active: true
})
};
fetch('https://api.exowpee.com/v1/catalog/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/taxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'code' => '<string>',
'rate' => 499.9999995,
'fixed_amount' => 1,
'default_stockable_price_inclusion_policy' => '<string>',
'is_active' => 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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/taxes"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"fixed_amount\": 1,\n \"default_stockable_price_inclusion_policy\": \"<string>\",\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/catalog/taxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"fixed_amount\": 1,\n \"default_stockable_price_inclusion_policy\": \"<string>\",\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/taxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"fixed_amount\": 1,\n \"default_stockable_price_inclusion_policy\": \"<string>\",\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}taxes.create
Conditions
- The tax is created in the fiscal profile of the current company.
- code must be unique within the profile (organization, country, fiscal status), including taxes that were removed.
- amount_type percentage requires rate and refuses fixed_amount; fixed requires fixed_amount and refuses rate.
- rate is between 0 and 999.999999 with at most 6 decimals; fixed_amount is a whole number of minor units, at least 0.
- For application_scope stockable, default_stockable_price_inclusion_policy is required and default_order_calculation_base is refused; for order it is the other way round.
- Adds a custom tax (kind standard, not built-in) to the profile; it changes no stored price until it is assigned.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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
Name of the tax, up to 250 characters.
250Code of the tax, up to 50 characters, unique within the company's fiscal profile.
50percentage: the tax is a rate (rate required, fixed_amount refused). fixed: the tax is a fixed amount (fixed_amount required, rate refused).
percentage, fixed Order amount the tax is computed on: items_net_total, items_tax_total or items_gross_total. Required when application_scope is order; not accepted for item-scope taxes.
items_net_total, items_tax_total, items_gross_total stockable: the tax applies to item prices. order: it applies to the whole order. Cannot be changed later.
stockable, order Rate of a percentage tax, 0 to 999.999999 with up to 6 decimals. Required when amount_type is percentage; refused when it is fixed.
0 <= x <= 999.999999Amount of a fixed tax, a whole number in minor units, at least 0. Required when amount_type is fixed; refused when it is percentage.
x >= 0inclusive or exclusive: whether item prices include this tax by default. Required when application_scope is stockable; not accepted for order-scope taxes.
Whether the tax is active. Defaults to true when omitted.
Response
Resource (only with response=resource).
Identifier of the tax (27-character KSUID string).
Country of the fiscal profile the tax belongs to (the company's country).
Fiscal status of the profile the tax belongs to.
vat: the system VAT node of the profile. standard: any other tax.
True for taxes created by the system; they cannot be changed or deleted.
Name of the tax.
Unique code of the tax within its fiscal profile.
percentage: the tax is a rate applied on a base. fixed: the tax is a fixed amount.
Rate of a percentage tax, up to 6 decimals, sent as a decimal string; null for a fixed tax and for the VAT node, whose rates are VAT rates.
Amount of a fixed tax, in minor units (divide by 10 to the power currency_exponent); null for a percentage tax.
For item-scope taxes: whether prices include the tax by default (inclusive) or add it on top (exclusive). Null for order-scope taxes.
For order-scope taxes: the order amount the tax is computed on (items_net_total, items_tax_total or items_gross_total). Null for item-scope taxes.
stockable: applied to item prices. order: applied to the whole order.
Whether the tax can still be used; an inactive tax is not applied to new assignments.
Taxes this tax is calculated on top of: a list of tax_id and operator (add or substract). Present when the dependency links are loaded.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).