curl --request POST \
--url https://api.exowpee.com/v1/catalog/vat-rates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"is_default": true,
"is_active": true
}
'import requests
url = "https://api.exowpee.com/v1/catalog/vat-rates"
payload = {
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"is_default": True,
"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,
is_default: true,
is_active: true
})
};
fetch('https://api.exowpee.com/v1/catalog/vat-rates', 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/vat-rates",
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,
'is_default' => true,
'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/vat-rates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"is_default\": true,\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/vat-rates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"is_default\": true,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vat-rates")
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 \"is_default\": true,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"country_code": "<string>",
"fiscal_status": "<string>",
"name": "<string>",
"code": "<string>",
"rate": "<string>",
"treatment": "<string>",
"is_default": true,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Create a VAT rate
Defines a new VAT rate, optionally making it the default one.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/vat-rates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"is_default": true,
"is_active": true
}
'import requests
url = "https://api.exowpee.com/v1/catalog/vat-rates"
payload = {
"name": "<string>",
"code": "<string>",
"rate": 499.9999995,
"is_default": True,
"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,
is_default: true,
is_active: true
})
};
fetch('https://api.exowpee.com/v1/catalog/vat-rates', 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/vat-rates",
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,
'is_default' => true,
'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/vat-rates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"is_default\": true,\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/vat-rates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"rate\": 499.9999995,\n \"is_default\": true,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vat-rates")
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 \"is_default\": true,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"country_code": "<string>",
"fiscal_status": "<string>",
"name": "<string>",
"code": "<string>",
"rate": "<string>",
"treatment": "<string>",
"is_default": true,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}vat_rates.create
Conditions
- code must be unique within the fiscal profile.
- rate is required, between 0 and 999.999999, with at most 6 decimals.
- A VAT rate cannot be both default and inactive.
- Creating the new default must not make a stored price impossible to calculate.
- When is_default is true the previous default rate of the profile loses its default flag; the new default applies to every taxable item without its own rate.
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, name, code, rate, treatment, is_default, is_active, 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 VAT rate, up to 250 characters.
250Code of the rate, up to 50 characters, unique within the company's fiscal profile.
50VAT rate, 0 to 999.999999 with up to 6 decimals.
0 <= x <= 999.999999standard, reduced, zero_rated or exempt. Defaults to standard when omitted.
standard, reduced, zero_rated, exempt Makes this the profile's default rate, replacing the current one. Defaults to false; a default rate must be active.
Whether the rate is active. Defaults to true.
Response
Resource (only with response=resource).
Identifier of the VAT rate (27-character KSUID string).
Country of the fiscal profile the rate belongs to.
Fiscal status of the profile the rate belongs to.
Name of the VAT rate.
Unique code of the rate within its fiscal profile.
VAT rate, up to 6 decimals, sent as a decimal string.
standard, reduced, zero_rated or exempt: how VAT is treated for goods using this rate.
True for the profile's fallback rate, used by taxable items without their own rate. At most one rate per profile is the default.
Whether the rate can be assigned.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).