VAT API
VAT検証エンドポイント
validateエンドポイントはVAT番号を処理し、その真正性を検証するとともに、企業詳細、住所、国の登録情報を含む包括的な企業情報を返します。
GET
/
v1
/
validate
/
VAT検証エンドポイント
curl --request GET \
--url https://vat.cleariflow.com/v1/validate/import requests
url = "https://vat.cleariflow.com/v1/validate/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://vat.cleariflow.com/v1/validate/', 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/validate/",
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/validate/"
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/validate/")
.asString();require 'uri'
require 'net/http'
url = URI("https://vat.cleariflow.com/v1/validate/")
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{
"company": {
"address": "8 RUE DE LONDRES\n75009 PARIS",
"name": "EURL GOOGLE FRANCE"
},
"country": {
"code": "FR",
"name": "France"
},
"valid": true,
"vat_number": "FR64443061841"
}
はじめに
ベースURL
https://vat.cleariflow.com/v1/validate/
検証エンドポイント
validateエンドポイントには、固有のAPIキーと確認したいVAT番号が必要です。
https://vat.cleariflow.com/v1/validate/
? api_key = YOUR_UNIQUE_API_KEY
& vat_number = FR64443061841
{
"company": {
"address": "8 RUE DE LONDRES\n75009 PARIS",
"name": "EURL GOOGLE FRANCE"
},
"country": {
"code": "FR",
"name": "France"
},
"valid": true,
"vat_number": "FR64443061841"
}
リクエストパラメータ
String
必須
固有のAPIキーです。各ユーザーはCleariflowの各APIごとに固有のAPIキーを持っているため、VAT検証・税率APIのキーはIPジオロケーションAPIなどでは動作しません。
String
必須
検証するVAT番号です。
レスポンスパラメータ
APIレスポンスは、汎用的で軽量な JSON形式 で返されます。String
検証するVAT番号です。
Boolean
送信されたVAT番号が有効な場合に true です。
Object
企業情報を含むオブジェクトです。
String
VAT番号に関連する企業の名前です。
String
VAT番号に関連する企業の住所です。
Object
国情報を含むオブジェクトです。
String
VAT番号に関連する国の2文字ISO 3166-1 alpha-2コードです。
String
VAT番号に関連する国の名前です。
⌘I
VAT検証エンドポイント
curl --request GET \
--url https://vat.cleariflow.com/v1/validate/import requests
url = "https://vat.cleariflow.com/v1/validate/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://vat.cleariflow.com/v1/validate/', 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/validate/",
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/validate/"
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/validate/")
.asString();require 'uri'
require 'net/http'
url = URI("https://vat.cleariflow.com/v1/validate/")
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{
"company": {
"address": "8 RUE DE LONDRES\n75009 PARIS",
"name": "EURL GOOGLE FRANCE"
},
"country": {
"code": "FR",
"name": "France"
},
"valid": true,
"vat_number": "FR64443061841"
}