cURL
curl --request POST \
--url https://api.invopop.com/apps/gov-es/v1/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tax_id": "B98602031",
"name": "Provide One SL",
"correct": false
}
'import requests
url = "https://api.invopop.com/apps/gov-es/v1/lookup"
payload = {
"tax_id": "B98602031",
"name": "Provide One SL",
"correct": False
}
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({tax_id: 'B98602031', name: 'Provide One SL', correct: false})
};
fetch('https://api.invopop.com/apps/gov-es/v1/lookup', 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.invopop.com/apps/gov-es/v1/lookup",
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([
'tax_id' => 'B98602031',
'name' => 'Provide One SL',
'correct' => false
]),
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.invopop.com/apps/gov-es/v1/lookup"
payload := strings.NewReader("{\n \"tax_id\": \"B98602031\",\n \"name\": \"Provide One SL\",\n \"correct\": false\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.invopop.com/apps/gov-es/v1/lookup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax_id\": \"B98602031\",\n \"name\": \"Provide One SL\",\n \"correct\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/apps/gov-es/v1/lookup")
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 \"tax_id\": \"B98602031\",\n \"name\": \"Provide One SL\",\n \"correct\": false\n}"
response = http.request(request)
puts response.read_body{
"identified": true,
"name": "<string>"
}{
"message": "<unknown>"
}{
"message": "<unknown>"
}{
"message": "<unknown>"
}Spain
Verify tax ID
Verify a Spanish tax ID (NIF/CIF) against the AEAT census. The endpoint
always reports whether AEAT identified the tax ID. When correct is
true and the tax ID is identified, the official name registered with
AEAT is also returned.
POST
/
apps
/
gov-es
/
v1
/
lookup
cURL
curl --request POST \
--url https://api.invopop.com/apps/gov-es/v1/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tax_id": "B98602031",
"name": "Provide One SL",
"correct": false
}
'import requests
url = "https://api.invopop.com/apps/gov-es/v1/lookup"
payload = {
"tax_id": "B98602031",
"name": "Provide One SL",
"correct": False
}
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({tax_id: 'B98602031', name: 'Provide One SL', correct: false})
};
fetch('https://api.invopop.com/apps/gov-es/v1/lookup', 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.invopop.com/apps/gov-es/v1/lookup",
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([
'tax_id' => 'B98602031',
'name' => 'Provide One SL',
'correct' => false
]),
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.invopop.com/apps/gov-es/v1/lookup"
payload := strings.NewReader("{\n \"tax_id\": \"B98602031\",\n \"name\": \"Provide One SL\",\n \"correct\": false\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.invopop.com/apps/gov-es/v1/lookup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax_id\": \"B98602031\",\n \"name\": \"Provide One SL\",\n \"correct\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/apps/gov-es/v1/lookup")
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 \"tax_id\": \"B98602031\",\n \"name\": \"Provide One SL\",\n \"correct\": false\n}"
response = http.request(request)
puts response.read_body{
"identified": true,
"name": "<string>"
}{
"message": "<unknown>"
}{
"message": "<unknown>"
}{
"message": "<unknown>"
}Verify a Spanish tax ID (NIF/CIF) against the AEAT census without going through the registration flow. The response always reports whether AEAT identified the tax ID; set
correct to true to also receive the official name registered with AEAT when the tax ID is identified.Authorizations
Use the Bearer scheme with a valid JWT token to authenticate requests.
Example: Authorization: Bearer <token>
Body
application/json
Spanish tax ID (NIF/CIF) to verify against AEAT.
Example:
"B98602031"
Name to check against the tax ID. For individuals AEAT verifies that the name matches the tax ID on record; for companies the name is not required to confirm the tax ID exists.
Example:
"Provide One SL"
When true and the tax ID is identified, the response also
includes the official name as registered with AEAT.
Was this page helpful?