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"
}
]
リクエストパラメータ
固有のAPIキーです。各ユーザーはCleariflowの各APIごとに固有のAPIキーを持っているため、VAT検証APIのキーはIPジオロケーションAPIなどでは動作しません。
VATカテゴリを取得したい国の2文字ISO 3166-1 alpha-2コードです。
レスポンスパラメータ
APIレスポンスは、汎用的で軽量な JSON形式 で返されます。 レスポンスはカテゴリオブジェクトの配列で、各オブジェクトには次が含まれます。カテゴリが返される国の2文字ISO 3166-1 alpha-2コードです。
この特定カテゴリのVAT税率を小数文字列で表したものです(例:19%の場合は「0.190」)。
カテゴリの名前です(例:「standard」「e-books」「audiobooks」)。
カテゴリとその適用範囲に関する説明です。
前へ
はじめにCleariflowの銀行検証APIは、モダンなRESTful JSONインターフェースを通じて国際銀行口座番号(IBAN)とビジネス識別コード(BIC)の包括的な検証を提供し、50か国以上をサポートします。
次へ
⌘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"
}
]