VAT API
Ендпоінт категорій VAT
Ендпоінт categories надає повний доступ до актуальних ставок VAT і податкових категорій для конкретних країн, включаючи знижені ставки для відповідних товарів і послуг.
GET
/
v1
/
categories
/
Ендпоінт категорій VAT
curl --request GET \
--url https://vat.cleariflow.com/v1/categories/import requests
url = "https://vat.cleariflow.com/v1/categories/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://vat.cleariflow.com/v1/categories/', 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://vat.cleariflow.com/v1/categories/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vat.cleariflow.com/v1/categories/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vat.cleariflow.com/v1/categories/")
.asString();require 'uri'
require 'net/http'
url = URI("https://vat.cleariflow.com/v1/categories/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"category": "some agricultural inputs",
"country_code": "DE",
"description": "Reduced VAT rate (some agricultural inputs)",
"rate": "0.070"
},
{
"category": "taxation of some gold coins and jewellery",
"country_code": "DE",
"description": "Reduced VAT rate (taxation of some gold coins and jewellery)",
"rate": "0.070"
},
{
"category": "cut flowers and plants for decorative use and food production",
"country_code": "DE",
"description": "Reduced VAT rate (cut flowers and plants for decorative use and food production)",
"rate": "0.070"
},
{
"category": "e-books",
"country_code": "DE",
"description": "Reduced VAT rate (e-books)",
"rate": "0.070"
},
..................
{
"category": "standard",
"country_code": "DE",
"description": "Standard VAT rate",
"rate": "0.190"
},
{
"category": "newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising)",
"country_code": "DE",
"description": "Reduced VAT rate (newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising))",
"rate": "0.070"
},
{
"category": "some timber for industrial use",
"country_code": "DE",
"description": "Reduced VAT rate (some timber for industrial use)",
"rate": "0.070"
}
]
Початок роботи
Базовий URL
https://vat.cleariflow.com/v1/categories/
Ендпоінт категорій
Ендпоінтcategories потребує вашого унікального API-ключа та країни, яку потрібно перевірити:
https://vat.cleariflow.com/v1/categories/
? api_key = YOUR_UNIQUE_API_KEY
& country_code = DE
[
{
"category": "some agricultural inputs",
"country_code": "DE",
"description": "Reduced VAT rate (some agricultural inputs)",
"rate": "0.070"
},
{
"category": "taxation of some gold coins and jewellery",
"country_code": "DE",
"description": "Reduced VAT rate (taxation of some gold coins and jewellery)",
"rate": "0.070"
},
{
"category": "cut flowers and plants for decorative use and food production",
"country_code": "DE",
"description": "Reduced VAT rate (cut flowers and plants for decorative use and food production)",
"rate": "0.070"
},
{
"category": "e-books",
"country_code": "DE",
"description": "Reduced VAT rate (e-books)",
"rate": "0.070"
},
..................
{
"category": "standard",
"country_code": "DE",
"description": "Standard VAT rate",
"rate": "0.190"
},
{
"category": "newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising)",
"country_code": "DE",
"description": "Reduced VAT rate (newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising))",
"rate": "0.070"
},
{
"category": "some timber for industrial use",
"country_code": "DE",
"description": "Reduced VAT rate (some timber for industrial use)",
"rate": "0.070"
}
]
Параметри запиту
String
обов'язково
Ваш унікальний API-ключ. Зверніть увагу: у кожного користувача є унікальні API-ключі для кожного API Cleariflow, тому ключ API перевірки VAT не працюватиме для API геолокації IP, наприклад.
String
обов'язково
Дволітерний ISO 3166-1 alpha-2 код країни, для якої потрібно отримати категорії VAT.
Параметри відповіді
Відповідь API повертається у універсальному та легкому форматі JSON. Відповідь — масив об’єктів категорій, де кожен об’єкт містить:String
Дволітерний ISO 3166-1 alpha-2 код країни, для якої повертаються категорії.
String
Ставка VAT для цієї категорії у вигляді десяткового рядка (наприклад, «0.190» для 19%).
String
Назва категорії (наприклад, «standard», «e-books», «audiobooks»).
String
Опис категорії та її застосування.
⌘I
Ендпоінт категорій VAT
curl --request GET \
--url https://vat.cleariflow.com/v1/categories/import requests
url = "https://vat.cleariflow.com/v1/categories/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://vat.cleariflow.com/v1/categories/', 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://vat.cleariflow.com/v1/categories/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vat.cleariflow.com/v1/categories/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vat.cleariflow.com/v1/categories/")
.asString();require 'uri'
require 'net/http'
url = URI("https://vat.cleariflow.com/v1/categories/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"category": "some agricultural inputs",
"country_code": "DE",
"description": "Reduced VAT rate (some agricultural inputs)",
"rate": "0.070"
},
{
"category": "taxation of some gold coins and jewellery",
"country_code": "DE",
"description": "Reduced VAT rate (taxation of some gold coins and jewellery)",
"rate": "0.070"
},
{
"category": "cut flowers and plants for decorative use and food production",
"country_code": "DE",
"description": "Reduced VAT rate (cut flowers and plants for decorative use and food production)",
"rate": "0.070"
},
{
"category": "e-books",
"country_code": "DE",
"description": "Reduced VAT rate (e-books)",
"rate": "0.070"
},
..................
{
"category": "standard",
"country_code": "DE",
"description": "Standard VAT rate",
"rate": "0.190"
},
{
"category": "newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising)",
"country_code": "DE",
"description": "Reduced VAT rate (newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising))",
"rate": "0.070"
},
{
"category": "some timber for industrial use",
"country_code": "DE",
"description": "Reduced VAT rate (some timber for industrial use)",
"rate": "0.070"
}
]