Introducción
La API Verifactu es una herramienta potente para que adaptes tu Software de Facturación o tu ERP Sistema de Facturación a Verifactu. Permite una integración sencilla con múltiples entornos de desarrollo. Te ofrecemos nuestra API como un servicio, hospedada en nuestros servidores como un SAAS. Para ti, menos preocupaciones, soporte y facilidad en la integración.
Link a nuestro GitHub: https://github.com/NemonInvocash
Descarga la colección Postman para realizar pruebas sobre la API Verifactu de NEMON INVOCASH aquí.
Pasos a seguir:
- Registrate en https://verifactuapi.es/ para obtener tus credenciales de acceso.
- Login para obtener token.
- Asignar el Token en Environment.
- Ejecutar alguno de los ejemplos de Registro de Alta, o Registro de Anulación.
- Si se ha definido WebHook, se notificará al EndPoint indicado cuando tengamos la respuesta de AEAT al envío.
- Con el Id obtenido, del POST de Alta o Anulación, se puede llamar también al GET Consulta Registro Alta indicando el Id.
- Cuando se haya comunicado a AEAT, tendrás disponible el campo Envío AEAT.
Endpoints con autenticación
Para autenticar las peticiones, incluye un encabezado Authorization con el valor "Bearer your-token".
Todos los endpoints autenticados están marcados con un badge requiere autenticación en la documentación a continuación.
Autentificación
LogIn
Iniciar sesión para obtener el token de la API y asi poder utilizar sus funcionalidades.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
],
'json' => {
"email": "ejemplo@verifatuAPI.com",
"password": "123456789"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "ejemplo@verifatuAPI.com",
"password": "123456789"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/login" \
--header "Content-Type: application/json" \
--data "{
\"email\": \"ejemplo@verifatuAPI.com\",
\"password\": \"123456789\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/login'
payload = {
"email": "ejemplo@verifatuAPI.com",
"password": "123456789"
}
headers = {
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"user_name": "VerifactuAPI",
"user_email": "ejemplo@verifatuAPI.com",
"message": "Inicio de sesión exitoso",
"token": "1234567890",
"expires_at": "2025-06-17 12:00:00",
}
Example response (401):
{
"success": false,
"message": "Credenciales incorrectas",
"error": 401,
"code": 401
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Login Emisor
Iniciar sesión como emisor para obtener el token de la API para utilizar las funcionalidades limitadas al propio nif del emisor usando la APIKey. Aqui se muestra como generar el APIKey y username para el emisor.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/loginEmisor';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
],
'json' => {
"username": "aa.aaaaaaaaa",
"api_key": "5d4f3d3bb1284e7cb3f5b7e7881d55d22ef5c1b35d693e6e4b9e5d2293ff1c16"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/loginEmisor"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"username": "aa.aaaaaaaaa",
"api_key": "5d4f3d3bb1284e7cb3f5b7e7881d55d22ef5c1b35d693e6e4b9e5d2293ff1c16"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/loginEmisor" \
--header "Content-Type: application/json" \
--data "{
\"username\": \"aa.aaaaaaaaa\",
\"api_key\": \"5d4f3d3bb1284e7cb3f5b7e7881d55d22ef5c1b35d693e6e4b9e5d2293ff1c16\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/loginEmisor'
payload = {
"username": "aa.aaaaaaaaa",
"api_key": "5d4f3d3bb1284e7cb3f5b7e7881d55d22ef5c1b35d693e6e4b9e5d2293ff1c16"
}
headers = {
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"user_name": "aa.aaaaaaaaa",
"message": "Inicio de sesión exitoso",
"token": "1234567890",
"expires_at": "2025-06-17 12:00:00"
}
Example response (404):
{
"success": false,
"message": "No se encontró el emisor especificado.",
"error": 401,
"code": 401
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Emisores
Listado de emisores
requires authentication
Obtener el listado de todos los emisores de la base de datos vinculados al usuario actual. Añadiendo los campos del body se puede filtrar el listado.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer Vh8P43afdbD5evEc6gZka16',
'Content-Type' => 'application/json',
],
'query' => [
'nif' => 'P1716358E',
'nombre' => 'Nombre del emisor',
'type' => 'verifactu',
'id_zona_tbai' => '1',
'id_emisor_autofactura' => '1',
'id_emisor_tercero' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor"
);
const params = {
"nif": "P1716358E",
"nombre": "Nombre del emisor",
"type": "verifactu",
"id_zona_tbai": "1",
"id_emisor_autofactura": "1",
"id_emisor_tercero": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Vh8P43afdbD5evEc6gZka16",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/emisor?nif=P1716358E&nombre=Nombre+del+emisor&type=verifactu&id_zona_tbai=1&id_emisor_autofactura=1&id_emisor_tercero=1" \
--header "Authorization: Bearer Vh8P43afdbD5evEc6gZka16" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor'
params = {
'nif': 'P1716358E',
'nombre': 'Nombre del emisor',
'type': 'verifactu',
'id_zona_tbai': '1',
'id_emisor_autofactura': '1',
'id_emisor_tercero': '1',
}
headers = {
'Authorization': 'Bearer Vh8P43afdbD5evEc6gZka16',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Emisores listed successfully",
"data": {
"items": [
{
"id": 1,
"nif": "A39200019",
"nombre": "EMPRESA TEST",
"created_at": "2025-06-09T08:49:53.000000Z",
"updated_at": "2025-06-09T08:49:53.000000Z",
"deleted_at": null,
"representante_razon_social": null,
"representante_nif": null,
"default_webhook_id": null,
"enviar_aeat": true,
"sistema_informatico_id": 1,
"cp": "43791",
"type": "verifactu",
"id_zona_tbai": null,
"test_production": "t",
"production_since": null,
"datos_otorgamiento": null,
"datos_otorgamiento_representante": null,
"otorgamiento_base64": null,
"otorgamiento_importado_base64": null,
"otorgamiento_adjunto_base64": null,
"otorgamiento_validado": "pendiente",
"motivo_rechazo": null,
"software_tbai": null
},
],
"count": 1
},
"pagination": {
"total": 1,
"perPage": 1,
"currentPage": 1,
"lastPage": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un emisor
requires authentication
Obtener los datos de un emisor en concreto filtrando por el ID del emisor
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer vgEh6eb3fVkaD1P85dc6Za4',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/1"
);
const headers = {
"Authorization": "Bearer vgEh6eb3fVkaD1P85dc6Za4",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/emisor/1" \
--header "Authorization: Bearer vgEh6eb3fVkaD1P85dc6Za4" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1'
headers = {
'Authorization': 'Bearer vgEh6eb3fVkaD1P85dc6Za4',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Emisor obtained successfully",
"data": {
"items": {
"id": 1,
"nif": "A39200019",
"nombre": "EMPRESA TEST",
"created_at": "2025-06-09T08:49:53.000000Z",
"updated_at": "2025-06-09T08:49:53.000000Z",
"deleted_at": null,
"representante_razon_social": null,
"representante_nif": null,
"default_webhook_id": null,
"enviar_aeat": true,
"sistema_informatico_id": 1,
"cp": "43791",
"type": "verifactu",
"id_zona_tbai": null,
"test_production": "t",
"production_since": null,
"datos_otorgamiento": null,
"datos_otorgamiento_representante": null,
"otorgamiento_base64": null,
"otorgamiento_importado_base64": null,
"otorgamiento_adjunto_base64": null,
"otorgamiento_validado": "pendiente",
"motivo_rechazo": null,
"software_tbai": null,
"sistema_informatico": {
"id": 1,
"nombre_razon": "INVOCASH SOLUTIONS SL",
"nif": "B70912613",
"nombre_sistema_informatico": "NEMON INVOCASH VERIFACTU API",
"id_sistema_informatico": "01",
"version": "1.0",
"numero_instalacion": "20250609104953_772645",
"tipo_uso_posible_solo_verifactu": true,
"tipo_uso_posible_multi_ot": false,
"indicador_multiples_ot": false,
"created_at": "2025-06-09T08:49:53.000000Z",
"updated_at": "2025-06-09T08:49:53.000000Z",
"is_test": true
}
}
},
"count": 1
}
}
Example response (404):
{
"success": false,
"message": "No se encontró el emisor especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Habilitar/Deshabilitar emisor
requires authentication
Habilita o deshabilita un emisor para que no pueda realizar registros, tanto altas como anulaciones.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/1/enabled';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer avbZ6D8cVE1fhg4dPak5e36',
'Content-Type' => 'application/json',
],
'json' => {
"enabled": true
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/1/enabled"
);
const headers = {
"Authorization": "Bearer avbZ6D8cVE1fhg4dPak5e36",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"enabled": true
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request PATCH \
"https://app.verifactuapi.es/api/emisor/1/enabled" \
--header "Authorization: Bearer avbZ6D8cVE1fhg4dPak5e36" \
--header "Content-Type: application/json" \
--data "{
\"enabled\": true
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1/enabled'
payload = {
"enabled": true
}
headers = {
'Authorization': 'Bearer avbZ6D8cVE1fhg4dPak5e36',
'Content-Type': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Emisor P1716358E habilitado correctamente",
"code": 200,
"data": null
}
Example response (400):
{
"success": false,
"message": "El campo enabled es obligatorio.",
"error": 400,
"code": 400
}
Example response (404):
{
"success": false,
"message": "No se encontró el emisor especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Crear un nuevo emisor
requires authentication
Crea un nuevo emisor en la base de datos.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer P6f651hZeavacDd3kVEb48g',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "P1716358E",
"nombre": "Nombre del emisor",
"cp": "43791",
"default_webhook_id": 1
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor"
);
const headers = {
"Authorization": "Bearer P6f651hZeavacDd3kVEb48g",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "P1716358E",
"nombre": "Nombre del emisor",
"cp": "43791",
"default_webhook_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/emisor" \
--header "Authorization: Bearer P6f651hZeavacDd3kVEb48g" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"P1716358E\",
\"nombre\": \"Nombre del emisor\",
\"cp\": \"43791\",
\"default_webhook_id\": 1
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/emisor'
payload = {
"nif": "P1716358E",
"nombre": "Nombre del emisor",
"cp": "43791",
"default_webhook_id": 1
}
headers = {
'Authorization': 'Bearer P6f651hZeavacDd3kVEb48g',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"success": true,
"message": "Emisor created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 4,
"nombre": "EMPRESA TEST",
"nif": "76877256D",
"representante_razon_social": null,
"representante_nif": null,
"default_webhook_id": null,
"enviar_aeat": true,
"sistema_informatico_id": 3,
"cp": "43791",
"type": "verifactu",
"id_zona_tbai": null,
"test_production": "t",
"production_since": null,
"id_emisor_autofactura": null,
"id_emisor_tercero": 1
}
]
}
}
Example response (409):
{
"success": false,
"message": "El NIF proporcionado ya está registrado para otro emisor.",
"error": 409,
"code": 409
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Actualizar un emisor
requires authentication
Permite actualizar el nombre, el cp y el webhook por defecto de un emisor
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer 6hEabePga46vDVkZ1d3f85c',
'Content-Type' => 'application/json',
],
'json' => {
"nombre": "Nombre del emisor",
"cp": "12345",
"default_webhook_id": 1
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/1"
);
const headers = {
"Authorization": "Bearer 6hEabePga46vDVkZ1d3f85c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nombre": "Nombre del emisor",
"cp": "12345",
"default_webhook_id": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request PUT \
"https://app.verifactuapi.es/api/emisor/1" \
--header "Authorization: Bearer 6hEabePga46vDVkZ1d3f85c" \
--header "Content-Type: application/json" \
--data "{
\"nombre\": \"Nombre del emisor\",
\"cp\": \"12345\",
\"default_webhook_id\": 1
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1'
payload = {
"nombre": "Nombre del emisor",
"cp": "12345",
"default_webhook_id": 1
}
headers = {
'Authorization': 'Bearer 6hEabePga46vDVkZ1d3f85c',
'Content-Type': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Emisor updated successfully",
"code": 200,
"data": {
"count": 1,
"items": [
{
"id": 1,
"nif": "A39200019",
"nombre": "EMPRESA TEST",
"created_at": "2025-06-09T08:49:53.000000Z",
"updated_at": "2025-06-09T08:49:53.000000Z",
"deleted_at": null,
"representante_razon_social": null,
"representante_nif": null,
"default_webhook_id": null,
"enviar_aeat": true,
"sistema_informatico_id": 1,
"cp": "43791",
"type": "verifactu",
"id_zona_tbai": null,
"test_production": "t",
"production_since": null,
"datos_otorgamiento": null,
"datos_otorgamiento_representante": null,
"otorgamiento_base64": null,
"otorgamiento_importado_base64": null,
"otorgamiento_adjunto_base64": null,
"otorgamiento_validado": "pendiente",
"motivo_rechazo": null,
"software_tbai": null
}
]
}
Example response (400):
{
"success": false,
"message": "El campo CP debe ser una cadena de texto formada por 5 números",
"error": 400,
"code": 400
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pasar a produccion
Pasar a produccion
requires authentication
Pasar un emisor a produccion
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/produccion/1';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer 8afVk4cZ1Dvd566heE3Pbga',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/produccion/1"
);
const headers = {
"Authorization": "Bearer 8afVk4cZ1Dvd566heE3Pbga",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());curl --request PATCH \
"https://app.verifactuapi.es/api/emisor/produccion/1" \
--header "Authorization: Bearer 8afVk4cZ1Dvd566heE3Pbga" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/produccion/1'
headers = {
'Authorization': 'Bearer 8afVk4cZ1Dvd566heE3Pbga',
'Content-Type': 'application/json'
}
response = requests.request('PATCH', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"message": "Emisor pasado a produccion correctamente",
"data": null
}
Example response (400):
{
"success": false,
"message": "No tienes nifs disponibles. Nifs comprados: 100 Nifs activos: 100",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Credenciales
Estos enpoints te permiten generar las credenciales de acceso para el emisor. El "username" se genera automaticamente con cualquiera de los dos metodos, no se regenera si ya existe, se mantiene el mismo.
Generar ApiKey
requires authentication
Genera un Api Key y username para el emisor indicado a traves del id. Este Api Key se usa para obtener un token limitado al nif del emisor y que solo pueda gestionar sus facturas.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/1/api-key';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer g3kcP5afE86v6hb4e1VdaZD',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/1/api-key"
);
const headers = {
"Authorization": "Bearer g3kcP5afE86v6hb4e1VdaZD",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/emisor/1/api-key" \
--header "Authorization: Bearer g3kcP5afE86v6hb4e1VdaZD" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1/api-key'
headers = {
'Authorization': 'Bearer g3kcP5afE86v6hb4e1VdaZD',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "ApiKey generated successfully",
"username": "em.p1716358e",
"api_key": "5d4f3d3bb1284e7cb3f5b7e7881d55d22ef5c1b35d693e6e4b9e5d2293ff1c16"
}
Example response (404):
{
"success": false,
"message": "No se encontró el emisor especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generar Contraseña
requires authentication
Genera la contraseña y username para el emisor indicado a traves del id. Esta contraseña se usa para que el emisor pueda entrar en modo lectura al entorno web. La contraseña caduca cada 180 días.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/1/credentials';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 68hD4gV53abEPkadve1cZ6f',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/1/credentials"
);
const headers = {
"Authorization": "Bearer 68hD4gV53abEPkadve1cZ6f",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/emisor/1/credentials" \
--header "Authorization: Bearer 68hD4gV53abEPkadve1cZ6f" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1/credentials'
headers = {
'Authorization': 'Bearer 68hD4gV53abEPkadve1cZ6f',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Credentials generated successfully",
"username": "em.p1716358e",
"password": "****************",
"expiration_date": "2025-07-28"
}
Example response (404):
{
"success": false,
"message": "No se encontró el emisor especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Verifactu
Listas
Listar listas
requires authentication
Muestra un listado con los nombres de todas las listas de Verifactu.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/listas';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer bD1h6PkaZde35gfcaV684Ev',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/listas"
);
const headers = {
"Authorization": "Bearer bD1h6PkaZde35gfcaV684Ev",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/listas" \
--header "Authorization: Bearer bD1h6PkaZde35gfcaV684Ev" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas'
headers = {
'Authorization': 'Bearer bD1h6PkaZde35gfcaV684Ev',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Nombres de listas listed successfully",
"data": {
"items": [
"l1",
"l10",
"l12",
"l14",
"l15",
"l16",
"l17",
"l1e",
"l2",
"l2e",
"l3",
"l3e",
"l4",
"l4e",
"l5",
"l6",
"l7",
"l8a",
"l8b",
"l9"
],
"count": 20
},
"pagination": {
"total": 1,
"perPage": 1,
"currentPage": 1,
"lastPage": 1
}
}
Example response (404):
{
"success": false,
"message": "No se encontraron listas para el tipo especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener una lista
requires authentication
Muestra una lista verifactu en especifico filtrando por el nombre de la lista. Se pueden ver los valores y su descripción.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/listas/l1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 6dca5Pa6VZh3bE1fevkDg48',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/listas/l1"
);
const headers = {
"Authorization": "Bearer 6dca5Pa6VZh3bE1fevkDg48",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/listas/l1" \
--header "Authorization: Bearer 6dca5Pa6VZh3bE1fevkDg48" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas/l1'
headers = {
'Authorization': 'Bearer 6dca5Pa6VZh3bE1fevkDg48',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Lista obtenida correctamente",
"data": {
"items": [
{
"id": 1,
"valor": "01",
"descripcion": "Impuesto sobre el Valor Añadido (IVA)"
},
{
"id": 2,
"valor": "02",
"descripcion": "Impuesto sobre la Producción, los Servicios y la Importación (IPSI) de Ceuta y Melilla"
},
{
"id": 3,
"valor": "03",
"descripcion": "Impuesto General Indirecto Canario (IGIC)"
},
{
"id": 4,
"valor": "05",
"descripcion": "Otros"
}
],
"count": 1
}
}
Example response (404):
{
"success": false,
"message": "La lista solicitada no existe",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un valor de una lista
requires authentication
Muestra un valor de una lista verifactu en especifico filtrando por el nombre de la lista y el valor.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/listas/l1/01';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer c1kf4hZea6gPv6Va85b3dED',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/listas/l1/01"
);
const headers = {
"Authorization": "Bearer c1kf4hZea6gPv6Va85b3dED",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/listas/l1/01" \
--header "Authorization: Bearer c1kf4hZea6gPv6Va85b3dED" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas/l1/01'
headers = {
'Authorization': 'Bearer c1kf4hZea6gPv6Va85b3dED',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Lista obtenida correctamente",
"data": {
"items": {
"id": 1,
"valor": "01",
"descripcion": "Impuesto sobre el Valor Añadido (IVA)"
},
"count": 1
}
}
Example response (404):
{
"success": false,
"message": "El registro solicitado no existe en la lista",
"error": 404,
"code": 404
}
Example response (404):
{
"success": false,
"message": "La lista solicitada no existe",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Alta Registros Facturacion
Registrar una factura de Verifactu.
requires authentication
Registra una nuevo registro de factura en la base de datos para ser procesada y enviada.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-facturacion';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer 3PVvEbg586fea1D4ahcdkZ6',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX/202412-1",
"FechaExpedicionFactura": "2025-1-1",
"RefExterna": "Test Ref Externa",
"TipoFactura": "F1",
"DescripcionOperacion": "test",
"EmitidaPorTercODesti": null,
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"Desglose": [
{
"Impuesto": 1,
"ClaveRegimen": 1,
"CalificacionOperacion": 1,
"TipoImpositivo": 21,
"BaseImponibleOImporteNoSujeto": 100,
"BaseImponibleACoste": 100,
"CuotaRepercutida": 21
}
],
"CuotaTotal": 21,
"ImporteTotal": 121,
"tag": "test"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-facturacion"
);
const headers = {
"Authorization": "Bearer 3PVvEbg586fea1D4ahcdkZ6",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-1-1",
"RefExterna": "Test Ref Externa",
"TipoFactura": "F1",
"DescripcionOperacion": "test",
"EmitidaPorTercODesti": null,
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"Desglose": [
{
"Impuesto": 1,
"ClaveRegimen": 1,
"CalificacionOperacion": 1,
"TipoImpositivo": 21,
"BaseImponibleOImporteNoSujeto": 100,
"BaseImponibleACoste": 100,
"CuotaRepercutida": 21
}
],
"CuotaTotal": 21,
"ImporteTotal": 121,
"tag": "test"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/alta-registro-facturacion" \
--header "Authorization: Bearer 3PVvEbg586fea1D4ahcdkZ6" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerieFactura\": \"AX\\/202412-1\",
\"FechaExpedicionFactura\": \"2025-1-1\",
\"RefExterna\": \"Test Ref Externa\",
\"TipoFactura\": \"F1\",
\"DescripcionOperacion\": \"test\",
\"EmitidaPorTercODesti\": null,
\"Destinatarios\": [
{
\"NombreRazon\": \"IVAN SOLE MARTINEZ\",
\"NIF\": \"39707287H\"
}
],
\"Desglose\": [
{
\"Impuesto\": 1,
\"ClaveRegimen\": 1,
\"CalificacionOperacion\": 1,
\"TipoImpositivo\": 21,
\"BaseImponibleOImporteNoSujeto\": 100,
\"BaseImponibleACoste\": 100,
\"CuotaRepercutida\": 21
}
],
\"CuotaTotal\": 21,
\"ImporteTotal\": 121,
\"tag\": \"test\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-facturacion'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-1-1",
"RefExterna": "Test Ref Externa",
"TipoFactura": "F1",
"DescripcionOperacion": "test",
"EmitidaPorTercODesti": null,
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"Desglose": [
{
"Impuesto": 1,
"ClaveRegimen": 1,
"CalificacionOperacion": 1,
"TipoImpositivo": 21,
"BaseImponibleOImporteNoSujeto": 100,
"BaseImponibleACoste": 100,
"CuotaRepercutida": 21
}
],
"CuotaTotal": 21,
"ImporteTotal": 121,
"tag": "test"
}
headers = {
'Authorization': 'Bearer 3PVvEbg586fea1D4ahcdkZ6',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"success": true,
"message": "AltaRegistroFacturacion created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 2,
"previous_id": null,
"alta_o_anulacion": 1,
"id_registro_anulado": null,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "2025/002",
"NumSerie": null,
"NumFactura": null,
"FechaExpedicionFactura": "2025-12-16",
"HoraExpedicionFactura": null,
"FechaOperacion": null,
"DescripcionOperacion": "TEST",
"NombreRazonDestinatario": null,
"NIFDestinatario": null,
"RefExterna": null,
"CuotaTotal": 21,
"ImporteTotal": 121,
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": null,
"webhook_id": null,
"verifactu": true,
"no_verifactu": false,
"tbai": false,
"face": 0,
"json": "JSON recibido por la API",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=2025/002&fecha=18-09-2025&importe=121",
"qr_image": "QR formato base64",
"qr_x": null,
"qr_y": null,
"qr_page": 1,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"Subsanacion": 2,
"RechazoPrevio": 1,
"TipoFactura": 2,
"TipoRectificativa": null,
"FacturaSimplificadaArt7273": 2,
"FacturaSinIdentifDestinatarioArt61d": 2,
"Macrodato": 2,
"EmitidaPorTercODesti": null,
"TercNombreRazon": null,
"TercNIF": null,
"TercOtroCodPais": null,
"TercOtroIDType": null,
"TercOtroID": null,
"Cupon": 2,
"SinRegistroPrevio": null,
"RechazoPrevioA": 1,
"GeneradoPor": null,
"Generador_NombreRazon": null,
"Generador_NIF": null,
"Generador_OtroCodPais": null,
"Generador_OtroIDType": null,
"Generador_OtroID": null,
"Huella": null,
"Signature": null,
"Signature2": null,
"TipoHuella": 1,
"NumRegistroAcuerdoFacturacion": null,
"IdAcuerdoSistemaInformatico": null,
"FechaHoraHusoGenRegistro": null,
"IDEmisorFacturaAnterior": null,
"NumSerieFacturaAnterior": null,
"FechaExpedicionFacturaAnterior": null,
"HuellaAnterior": null,
"incidencia": false,
"xml_aeat": null,
"xml_signed": null,
"xml_aeat_response": null,
"estado_aeat": "No Registrado",
"estado_registro_aeat": null,
"codigo_error_aeat": null,
"descripcion_error_aeat": null,
"envios_aeat_id": null,
"envios_aeat_lineas_id": null
}
]
}
}
Example response (400):
{
"success": false,
"message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Validar una factura de Verifactu.
requires authentication
Valida el formato y los datos de una factura de Verifactu sin generar el registro en la base de datos.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/validar';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer D6cEg36f8d1a4VZakevbP5h',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX/202412-1",
"FechaExpedicionFactura": "2025-1-1",
"RefExterna": "Test Ref Externa",
"TipoFactura": "F1",
"DescripcionOperacion": "test",
"EmitidaPorTercODesti": null,
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"Desglose": [
{
"Impuesto": 1,
"ClaveRegimen": 1,
"CalificacionOperacion": 1,
"TipoImpositivo": 21,
"BaseImponibleOImporteNoSujeto": 100,
"BaseImponibleACoste": 100,
"CuotaRepercutida": 21
}
],
"CuotaTotal": 21,
"ImporteTotal": 121,
"tag": "test"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-facturacion/validar"
);
const headers = {
"Authorization": "Bearer D6cEg36f8d1a4VZakevbP5h",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-1-1",
"RefExterna": "Test Ref Externa",
"TipoFactura": "F1",
"DescripcionOperacion": "test",
"EmitidaPorTercODesti": null,
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"Desglose": [
{
"Impuesto": 1,
"ClaveRegimen": 1,
"CalificacionOperacion": 1,
"TipoImpositivo": 21,
"BaseImponibleOImporteNoSujeto": 100,
"BaseImponibleACoste": 100,
"CuotaRepercutida": 21
}
],
"CuotaTotal": 21,
"ImporteTotal": 121,
"tag": "test"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/alta-registro-facturacion/validar" \
--header "Authorization: Bearer D6cEg36f8d1a4VZakevbP5h" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerieFactura\": \"AX\\/202412-1\",
\"FechaExpedicionFactura\": \"2025-1-1\",
\"RefExterna\": \"Test Ref Externa\",
\"TipoFactura\": \"F1\",
\"DescripcionOperacion\": \"test\",
\"EmitidaPorTercODesti\": null,
\"Destinatarios\": [
{
\"NombreRazon\": \"IVAN SOLE MARTINEZ\",
\"NIF\": \"39707287H\"
}
],
\"Desglose\": [
{
\"Impuesto\": 1,
\"ClaveRegimen\": 1,
\"CalificacionOperacion\": 1,
\"TipoImpositivo\": 21,
\"BaseImponibleOImporteNoSujeto\": 100,
\"BaseImponibleACoste\": 100,
\"CuotaRepercutida\": 21
}
],
\"CuotaTotal\": 21,
\"ImporteTotal\": 121,
\"tag\": \"test\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/validar'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-1-1",
"RefExterna": "Test Ref Externa",
"TipoFactura": "F1",
"DescripcionOperacion": "test",
"EmitidaPorTercODesti": null,
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"Desglose": [
{
"Impuesto": 1,
"ClaveRegimen": 1,
"CalificacionOperacion": 1,
"TipoImpositivo": 21,
"BaseImponibleOImporteNoSujeto": 100,
"BaseImponibleACoste": 100,
"CuotaRepercutida": 21
}
],
"CuotaTotal": 21,
"ImporteTotal": 121,
"tag": "test"
}
headers = {
'Authorization': 'Bearer D6cEg36f8d1a4VZakevbP5h',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Registro validado correctamente",
"code": 200,
}
Example response (400):
{
"success": false,
"message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Anular Registros Facturacion
Registrar una anulacion de Verifactu.
requires authentication
Registra una anulacion de registro Verifactu en la base de datos para ser procesada y enviada. Si la factura a anular no existe en la API, usar el campo SinRegistroPrevio.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/anulacion-registro-facturacion';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer Z54vhg816PVaD6faEeckbd3',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX/202412-1",
"FechaExpedicionFactura": "2025-11-11",
"SinRegistroPrevio": true
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/anulacion-registro-facturacion"
);
const headers = {
"Authorization": "Bearer Z54vhg816PVaD6faEeckbd3",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-11-11",
"SinRegistroPrevio": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/anulacion-registro-facturacion" \
--header "Authorization: Bearer Z54vhg816PVaD6faEeckbd3" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerieFactura\": \"AX\\/202412-1\",
\"FechaExpedicionFactura\": \"2025-11-11\",
\"SinRegistroPrevio\": true
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/anulacion-registro-facturacion'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-11-11",
"SinRegistroPrevio": true
}
headers = {
'Authorization': 'Bearer Z54vhg816PVaD6faEeckbd3',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"success": true,
"message": "AnulacionRegistroFacturacion created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 3,
"previous_id": null,
"alta_o_anulacion": 2,
"id_registro_anulado": 2,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "2025/002",
"NumSerie": null,
"NumFactura": null,
"FechaExpedicionFactura": "2025-12-15",
"HoraExpedicionFactura": null,
"FechaOperacion": null,
"DescripcionOperacion": null,
"NombreRazonDestinatario": null,
"NIFDestinatario": null,
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": null,
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": "/ANULACION",
"webhook_id": null,
"verifactu": true,
"no_verifactu": false,
"tbai": false,
"face": 0,
"json": "JSON recibido por la API",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": null,
"qr_image": null,
"qr_x": null,
"qr_y": null,
"qr_page": null,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"Subsanacion": null,
"RechazoPrevio": null,
"TipoFactura": null,
"TipoRectificativa": null,
"FacturaSimplificadaArt7273": null,
"FacturaSinIdentifDestinatarioArt61d": null,
"Macrodato": null,
"EmitidaPorTercODesti": null,
"TercNombreRazon": null,
"TercNIF": null,
"TercOtroCodPais": null,
"TercOtroIDType": null,
"TercOtroID": null,
"Cupon": null,
"SinRegistroPrevio": 2,
"RechazoPrevioA": 1,
"GeneradoPor": null,
"Generador_NombreRazon": null,
"Generador_NIF": null,
"Generador_OtroCodPais": null,
"Generador_OtroIDType": null,
"Generador_OtroID": null,
"Huella": null,
"Signature": null,
"Signature2": null,
"TipoHuella": 1,
"NumRegistroAcuerdoFacturacion": null,
"IdAcuerdoSistemaInformatico": null,
"FechaHoraHusoGenRegistro": null,
"IDEmisorFacturaAnterior": null,
"NumSerieFacturaAnterior": null,
"FechaExpedicionFacturaAnterior": null,
"HuellaAnterior": null,
"incidencia": false,
"xml_aeat": null,
"xml_signed": null,
"xml_aeat_response": null,
"estado_aeat": "No Registrado",
"estado_registro_aeat": null,
"codigo_error_aeat": null,
"descripcion_error_aeat": null,
"envios_aeat_id": null,
"envios_aeat_lineas_id": null
}
]
}
}
Example response (400):
{
"success": false,
"message": "El tipo de factura no es válido. Campo \"type\" no encontrado.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Anular un registro Verifactu por id.
requires authentication
Anula un registro Verifactu existente en la base de datos usando el id, registra la anulacion y se procesa.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/anulacion-registro-facturacion/1';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer gDh56b16Vcav4eEkZdP8fa3',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/anulacion-registro-facturacion/1"
);
const headers = {
"Authorization": "Bearer gDh56b16Vcav4eEkZdP8fa3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/anulacion-registro-facturacion/1" \
--header "Authorization: Bearer gDh56b16Vcav4eEkZdP8fa3" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/anulacion-registro-facturacion/1'
headers = {
'Authorization': 'Bearer gDh56b16Vcav4eEkZdP8fa3',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Example response (201):
{
"success": true,
"message": "AnulacionRegistroFacturacion created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 3,
"previous_id": null,
"alta_o_anulacion": 2,
"id_registro_anulado": 2,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "2025/002",
"NumSerie": null,
"NumFactura": null,
"FechaExpedicionFactura": "2025-12-15",
"HoraExpedicionFactura": null,
"FechaOperacion": null,
"DescripcionOperacion": null,
"NombreRazonDestinatario": null,
"NIFDestinatario": null,
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": null,
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": "/ANULACION",
"webhook_id": null,
"verifactu": true,
"no_verifactu": false,
"tbai": false,
"face": 0,
"json": "JSON recibido",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": null,
"qr_image": null,
"qr_x": null,
"qr_y": null,
"qr_page": null,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"Subsanacion": null,
"RechazoPrevio": null,
"TipoFactura": null,
"TipoRectificativa": null,
"FacturaSimplificadaArt7273": null,
"FacturaSinIdentifDestinatarioArt61d": null,
"Macrodato": null,
"EmitidaPorTercODesti": null,
"TercNombreRazon": null,
"TercNIF": null,
"TercOtroCodPais": null,
"TercOtroIDType": null,
"TercOtroID": null,
"Cupon": null,
"SinRegistroPrevio": null,
"RechazoPrevioA": 1,
"GeneradoPor": null,
"Generador_NombreRazon": null,
"Generador_NIF": null,
"Generador_OtroCodPais": null,
"Generador_OtroIDType": null,
"Generador_OtroID": null,
"Huella": null,
"Signature": null,
"Signature2": null,
"TipoHuella": 1,
"NumRegistroAcuerdoFacturacion": null,
"IdAcuerdoSistemaInformatico": null,
"FechaHoraHusoGenRegistro": null,
"IDEmisorFacturaAnterior": null,
"NumSerieFacturaAnterior": null,
"FechaExpedicionFacturaAnterior": null,
"HuellaAnterior": null,
"incidencia": false,
"xml_aeat": null,
"xml_signed": null,
"xml_aeat_response": null,
"estado_aeat": "No Registrado",
"estado_registro_aeat": null,
"codigo_error_aeat": null,
"descripcion_error_aeat": null,
"envios_aeat_id": null,
"envios_aeat_lineas_id": null
}
]
}
}
Example response (404):
{
"success": false,
"message": "No se encontró la factura especificada.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Consultar Registros Facturacion
Obtener lista de registros Verifactu
requires authentication
Muestra una lista con todos los registros Verifactu del usuario. Añadiendo los campos del body se puede filtrar el listado.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-facturacion';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 361vefEVkgPhdcZ4a5a8b6D',
'Content-Type' => 'application/json',
],
'query' => [
'IDEmisorFactura' => 'A39200019',
'NumSerieFactura' => 'AX/202412-1',
'FechaExpedicionFactura' => '2025-01-01',
'NifDestinatario' => '123456789',
'NombreRazonDestinatario' => 'Nombre del destinatario',
'ImporteTotal' => '100',
'tag' => '123456789',
'alta_o_anulacion' => '1',
'estado_aeat' => 'Correcto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-facturacion"
);
const params = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX/202412-1",
"FechaExpedicionFactura": "2025-01-01",
"NifDestinatario": "123456789",
"NombreRazonDestinatario": "Nombre del destinatario",
"ImporteTotal": "100",
"tag": "123456789",
"alta_o_anulacion": "1",
"estado_aeat": "Correcto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 361vefEVkgPhdcZ4a5a8b6D",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/alta-registro-facturacion?IDEmisorFactura=A39200019&NumSerieFactura=AX%2F202412-1&FechaExpedicionFactura=2025-01-01&NifDestinatario=123456789&NombreRazonDestinatario=Nombre+del+destinatario&ImporteTotal=100&tag=123456789&alta_o_anulacion=1&estado_aeat=Correcto" \
--header "Authorization: Bearer 361vefEVkgPhdcZ4a5a8b6D" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-facturacion'
params = {
'IDEmisorFactura': 'A39200019',
'NumSerieFactura': 'AX/202412-1',
'FechaExpedicionFactura': '2025-01-01',
'NifDestinatario': '123456789',
'NombreRazonDestinatario': 'Nombre del destinatario',
'ImporteTotal': '100',
'tag': '123456789',
'alta_o_anulacion': '1',
'estado_aeat': 'Correcto',
}
headers = {
'Authorization': 'Bearer 361vefEVkgPhdcZ4a5a8b6D',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Invoices listed successfully",
"data": {
"items": [
{
"id": 2,
"previous_id": 1,
"alta_o_anulacion": 1,
"id_registro_anulado": null,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "2025/002",
"NumSerie": null,
"NumFactura": null,
"FechaExpedicionFactura": "2025-12-15",
"HoraExpedicionFactura": null,
"FechaOperacion": null,
"DescripcionOperacion": "TEST",
"NombreRazonDestinatario": null,
"NIFDestinatario": null,
"RefExterna": null,
"CuotaTotal": 21,
"ImporteTotal": 121,
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": null,
"webhook_id": null,
"verifactu": true,
"no_verifactu": false,
"tbai": false,
"face": 0,
"json": "JSON recibido por la API",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=2025/002&fecha=15-12-2025&importe=121",
"qr_image": "QR en formato base64",
"qr_x": null,
"qr_y": null,
"qr_page": 1,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"Subsanacion": 2,
"RechazoPrevio": 1,
"TipoFactura": 2,
"TipoRectificativa": null,
"FacturaSimplificadaArt7273": 2,
"FacturaSinIdentifDestinatarioArt61d": 2,
"Macrodato": 2,
"EmitidaPorTercODesti": null,
"TercNombreRazon": null,
"TercNIF": null,
"TercOtroCodPais": null,
"TercOtroIDType": null,
"TercOtroID": null,
"Cupon": 2,
"SinRegistroPrevio": null,
"RechazoPrevioA": 1,
"GeneradoPor": null,
"Generador_NombreRazon": null,
"Generador_NIF": null,
"Generador_OtroCodPais": null,
"Generador_OtroIDType": null,
"Generador_OtroID": null,
"Huella": "6FD01AD6D7CA3136A0A9CD9FD4F01B71F51E80133CC81104ABE0C4B23D04AC20",
"Signature": null,
"Signature2": null,
"TipoHuella": 1,
"NumRegistroAcuerdoFacturacion": null,
"IdAcuerdoSistemaInformatico": null,
"FechaHoraHusoGenRegistro": "2025-12-12T13:21:32+01:00",
"IDEmisorFacturaAnterior": "A39200019",
"NumSerieFacturaAnterior": "2025/001",
"FechaExpedicionFacturaAnterior": "2025-12-15",
"HuellaAnterior": "57B34C2738F68DC3736FF1EC2CD8C286BCF7704D3189C157754E4450731CB4EA",
"incidencia": false,
"xml_aeat": "XML del registro",
"xml_signed": null,
"xml_aeat_response": null,
"estado_aeat": "Correcto",
"estado_registro_aeat": "Registrado",
"codigo_error_aeat": "",
"descripcion_error_aeat": "",
"envios_aeat_id": 2,
"envios_aeat_lineas_id": 2
}
],
"count": 1,
"pagination": {
"total": 1,
"perPage": 10,
"currentPage": 1,
"lastPage": 1
}
}
Example response (401):
{
"success": false,
"message": "El IDEmisor no coincide con el de tu cuenta.",
"error": 401,
"code": 401
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un registro Verifactu
requires authentication
Muestra los datos de un registro Verifactu filtrando por el ID.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer c4Vfde38kPZbvga15aD66Eh',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-facturacion/1"
);
const headers = {
"Authorization": "Bearer c4Vfde38kPZbvga15aD66Eh",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/alta-registro-facturacion/1" \
--header "Authorization: Bearer c4Vfde38kPZbvga15aD66Eh" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/1'
headers = {
'Authorization': 'Bearer c4Vfde38kPZbvga15aD66Eh',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": "error",
"message": "Token inválido",
"code": 401
}
Example response (404):
{
"success": false,
"code": 404,
"message": "No se encontró la factura especificada.",
"data": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Envíos
Listado de envíos
requires authentication
Muestra un listado paginado de todos los envíos a Verifactu.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/envios-aeat';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer DaZbv66hkaf5PecgE418V3d',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/envios-aeat"
);
const headers = {
"Authorization": "Bearer DaZbv66hkaf5PecgE418V3d",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/envios-aeat" \
--header "Authorization: Bearer DaZbv66hkaf5PecgE418V3d" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat'
headers = {
'Authorization': 'Bearer DaZbv66hkaf5PecgE418V3d',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Envíos Verifactu listed successfully",
"data": {
"items": [
{
"id": 1,
"IDEmisor": "1234567890",
"endpoint": "https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP",
"xml_envio": "</xml>",
"xml_respuesta": "</xml>",
"csv": "A-7KC3XUSXLCNXLP",
"estado_aeat": "Correcto",
"codigo_error_aeat": "",
"descripcion_error_aeat": "",
"descripcion_error_curl": null,
"intentos": null,
"resend": null,
"fecha_hora_envio": "2024-12-17 11:21:22",
"fecha_hora_respuesta": "2024-12-17 11:21:22",
"segundos_proximo_envio": 60,
"created_at": "2024-12-17T10:21:22.000000Z",
"updated_at": "2024-12-17T10:21:22.000000Z",
"deleted_at": null
},
],
"count": 1
},
"pagination": {
"total": 1,
"perPage": 1,
"currentPage": 1,
"lastPage": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un envío
requires authentication
Muestra un envío Verifactu específico. Se filtra por el ID del envío.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/envios-aeat/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer Ea3h6adZ16Vgf4D5bPk8evc',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/envios-aeat/1"
);
const headers = {
"Authorization": "Bearer Ea3h6adZ16Vgf4D5bPk8evc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/envios-aeat/1" \
--header "Authorization: Bearer Ea3h6adZ16Vgf4D5bPk8evc" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat/1'
headers = {
'Authorization': 'Bearer Ea3h6adZ16Vgf4D5bPk8evc',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Envío Verifactu obtained successfully",
"data": {
"items": {
"id": 1,
"IDEmisor": "1234567890",
"endpoint": "https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP",
"xml_envio": "</xml>",
"xml_respuesta": "</xml>",
"csv": "A-7KC3XUSXLCNXLP",
"estado_aeat": "Correcto",
"codigo_error_aeat": "",
"descripcion_error_aeat": "",
"descripcion_error_curl": null,
"intentos": null,
"resend": null,
"fecha_hora_envio": "2024-12-17 11:21:22",
"fecha_hora_respuesta": "2024-12-17 11:21:22",
"segundos_proximo_envio": 60,
"created_at": "2024-12-17T10:21:22.000000Z",
"updated_at": "2024-12-17T10:21:22.000000Z",
"deleted_at": null,
"lineas": []
}
}
}
Example response (403):
{
"success": false,
"message": "No tienes acceso a este envío Verifactu.",
"error": 403,
"code": 403
}
Example response (404):
{
"success": false,
"message": "No se encontró el envío AEAT especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener una línea de envío
requires authentication
Muestra una línea específica de un envío Verifactu.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/envios-aeat/linea/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer agdEP6583ac6hkbv4De1ZVf',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/envios-aeat/linea/1"
);
const headers = {
"Authorization": "Bearer agdEP6583ac6hkbv4De1ZVf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/envios-aeat/linea/1" \
--header "Authorization: Bearer agdEP6583ac6hkbv4De1ZVf" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat/linea/1'
headers = {
'Authorization': 'Bearer agdEP6583ac6hkbv4De1ZVf',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Línea Envío Verifactu obtained successfully",
"data": {
"items": {
"id": 1,
"envios_verifactu_id": 1,
"num_serie_factura": "AX/202412-640",
"estado_registro": "Incorrecto",
"codigo_error": "3002",
"descripcion_error": "No existe el registro de facturación.",
"id_peticion_duplicado": "",
"estado_registro_duplicado": "",
"created_at": "2025-02-03T16:30:02.000000Z",
"updated_at": null,
"deleted_at": null,
"invoices_verifactu": null,
"envios_verifactu": {
"id": 1,
...,
}
}
}
}
Example response (403):
{
"success": false,
"message": "No tienes acceso a esta linea Verifactu.",
"error": 403,
"code": 403
}
Example response (404):
{
"success": false,
"message": "No se encontró la línea Verifactu especificada.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reenviar un envío
requires authentication
Vuelve a poner en cola un envío que se quedó en estado Pendiente. El
reenvío es asíncrono: este endpoint solo lo encola, y quien lo manda a la
AEAT es el proceso que atiende la cola.
Reenviar no corrige la causa del fallo. Si el envío se rechazó por su contenido, la AEAT volverá a rechazarlo.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/envios-aeat/1/reenviar';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer Peafkh1avVb6D364cgZdE58',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/envios-aeat/1/reenviar"
);
const headers = {
"Authorization": "Bearer Peafkh1avVb6D364cgZdE58",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/envios-aeat/1/reenviar" \
--header "Authorization: Bearer Peafkh1avVb6D364cgZdE58" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat/1/reenviar'
headers = {
'Authorization': 'Bearer Peafkh1avVb6D364cgZdE58',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Envío marcado para reenvío"
}
Example response (400):
{
"success": false,
"message": "El envío no tiene estado pendiente.",
"error": 400,
"code": 400
}
Example response (403):
{
"success": false,
"message": "No tienes acceso a este envío Verifactu.",
"error": 403,
"code": 403
}
Example response (404):
{
"success": false,
"message": "No se encontró el envío Verifactu especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Consulta AEAT
Consultar registros a AEAT Realizar consulta de los registros de facturación registrados en AEAT
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/consultar-registros-aeat';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer 3fdb8vae566EkaPVc4DhZg1',
'Content-Type' => 'application/json',
],
'json' => {
"Entorno": "PROD",
"NombreRazonEmisor": "Test",
"NIFEmisor": "12345678Z",
"Ejercicio": "2024",
"Periodo": "01"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/consultar-registros-aeat"
);
const headers = {
"Authorization": "Bearer 3fdb8vae566EkaPVc4DhZg1",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"Entorno": "PROD",
"NombreRazonEmisor": "Test",
"NIFEmisor": "12345678Z",
"Ejercicio": "2024",
"Periodo": "01"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/consultar-registros-aeat" \
--header "Authorization: Bearer 3fdb8vae566EkaPVc4DhZg1" \
--header "Content-Type: application/json" \
--data "{
\"Entorno\": \"PROD\",
\"NombreRazonEmisor\": \"Test\",
\"NIFEmisor\": \"12345678Z\",
\"Ejercicio\": \"2024\",
\"Periodo\": \"01\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/consultar-registros-aeat'
payload = {
"Entorno": "PROD",
"NombreRazonEmisor": "Test",
"NIFEmisor": "12345678Z",
"Ejercicio": "2024",
"Periodo": "01"
}
headers = {
'Authorization': 'Bearer 3fdb8vae566EkaPVc4DhZg1',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Consulta realizada correctamente. Se han encontrado 1 registros.",
"code": 200,
"total": 1,
"data": [
{
"NombreRazonEmisor": null,
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "N00002",
"FechaExpedicionFactura": "05-08-2025",
"TipoFactura": "F1",
"DescripcionOperacion": "FACTURA",
"Destinatarios": {
"NombreRazon": "Sage Spain S. L.",
"NIF": "B58836321"
},
"Cupon": null,
"Desglose": {
"Impuesto": "01",
"ClaveRegimen": "01",
"CalificacionOperacion": "S1",
"TipoImpositivo": "21",
"BaseImponibleOimporteNoSujeto": "0",
"CuotaRepercutida": "0"
},
"CuotaTotal": "0",
"ImporteTotal": "0",
"Encadenamiento": {
"RegistroAnterior": {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "N00001",
"FechaExpedicionFactura": "2025-08-05",
"Huella": "57A9F6F6C9640F03A289F63570DE1166260D038F891A9E7F2FABDF8B4EB18064"
}
},
"FechaHoraHusoGenRegistro": "2025-08-05T12:06:40+02:00",
"TipoHuella": "01",
"Huella": "FBE84F66D602EE7ADBC20A314969A8806DCB6092E94363F43FFB17E78FBD302A",
"NIFPresentador": "A39200019",
"TimestampPresentacion": "2025-08-05T12:07:41+02:00",
"IdPeticion": "20250805120741050034",
"TimestampUltimaModificacion": "2025-08-05T12:07:41+02:00",
"EstadoRegistro": "Correcta",
"SistemaInformatico": null
}
]
}
Example response (400):
{
"success": false,
"message": "El campo Entorno es obligatorio y debe ser PROD o TEST.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sistema Informatico
Obtener sistema informático
requires authentication
Muestra el sistema informático de un emisor filtrando por el ID del emisor.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/sistema-informatico/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer ZegbVf4avc685PaD3h6Ed1k',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/sistema-informatico/1"
);
const headers = {
"Authorization": "Bearer ZegbVf4avc685PaD3h6Ed1k",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/sistema-informatico/1" \
--header "Authorization: Bearer ZegbVf4avc685PaD3h6Ed1k" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/sistema-informatico/1'
headers = {
'Authorization': 'Bearer ZegbVf4avc685PaD3h6Ed1k',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "SistemaInformatico obtained successfully",
"data": {
"items": {
"id": 2,
"nombre_razon": "INVOCASH SOLUTIONS SL",
"nif": "B70912613",
"nombre_sistema_informatico": "NEMON INVOCASH VERIFACTU API",
"id_sistema_informatico": "01",
"version": "1.0",
"numero_instalacion": "20251125154237_858086",
"tipo_uso_posible_solo_verifactu": true,
"tipo_uso_posible_multi_ot": false,
"indicador_multiples_ot": false,
"is_test": true,
"created_at": "2025-11-25T14:42:37.000000Z",
"updated_at": "2025-11-25T14:42:37.000000Z"
}
}
}
Example response (404):
{
"success": false,
"code": 404,
"message": "No se encontró el emisor especificado.",
"data": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
TBAI
Listas
Listar listas
requires authentication
Muestra un listado con los nombres de todas las listas de Tbai.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/listas-tbai';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer gZaPd6eE5318Dkach4fb6vV',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/listas-tbai"
);
const headers = {
"Authorization": "Bearer gZaPd6eE5318Dkach4fb6vV",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/listas-tbai" \
--header "Authorization: Bearer gZaPd6eE5318Dkach4fb6vV" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas-tbai'
headers = {
'Authorization': 'Bearer gZaPd6eE5318Dkach4fb6vV',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Nombres de las listas de Tbai listed successfully",
"data": {
"items": [
"l0",
"l10",
"l11",
"l12",
"l13",
"l2",
"l3",
"l4",
"l5",
"l6",
"l7",
"l8",
"l9"
],
"count": 13
},
"pagination": {
"total": 1,
"perPage": 1,
"currentPage": 1,
"lastPage": 1
}
}
Example response (404):
{
"success": false,
"message": "No se encontraron listas para el tipo especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener una lista
requires authentication
Muestra una lista de Tbai en especifico filtrando por el nombre de la lista. Se pueden ver los valores y su descripción.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/listas-tbai/l0';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer ebacEVd4gvZ5fDh31ka86P6',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/listas-tbai/l0"
);
const headers = {
"Authorization": "Bearer ebacEVd4gvZ5fDh31ka86P6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/listas-tbai/l0" \
--header "Authorization: Bearer ebacEVd4gvZ5fDh31ka86P6" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas-tbai/l0'
headers = {
'Authorization': 'Bearer ebacEVd4gvZ5fDh31ka86P6',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Lista de Tbai obtained successfully",
"data": {
"items": [
{
"id": 1,
"valor": "1.2",
"descripcion": "Versión actual del esquema utilizado"
}
],
"count": 1
}
}
Example response (404):
{
"success": false,
"message": "La lista solicitada no existe",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un valor de una lista
requires authentication
Muestra un valor de una lista de Tbai en especifico filtrando por el nombre de la lista y el valor.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/listas-tbai/l0/1.2';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer h5V8Ec1b36fk4DdgPaZeva6',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/listas-tbai/l0/1.2"
);
const headers = {
"Authorization": "Bearer h5V8Ec1b36fk4DdgPaZeva6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/listas-tbai/l0/1.2" \
--header "Authorization: Bearer h5V8Ec1b36fk4DdgPaZeva6" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas-tbai/l0/1.2'
headers = {
'Authorization': 'Bearer h5V8Ec1b36fk4DdgPaZeva6',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Valor de la lista de Tbai obtained successfully",
"data": {
"items": {
"id": 1,
"valor": "1.2",
"descripcion": "Versión actual del esquema utilizado"
},
"count": 1
}
}
Example response (404):
{
"success": false,
"message": "El registro solicitado no existe en la lista",
"error": 404,
"code": 404
}
Example response (404):
{
"success": false,
"message": "La lista solicitada no existe",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Alta Registros Facturacion
Registrar una factura de Tbai.
requires authentication
Registra una nuevo registro de factura en la base de datos para ser procesada y enviada.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-tbai';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer aEfa3b4hk6Vg1e6ZcdD8Pv5',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"ModeloLROE": "140",
"EpigrafeLROE": "304300",
"tag": "test"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-tbai"
);
const headers = {
"Authorization": "Bearer aEfa3b4hk6Vg1e6ZcdD8Pv5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"ModeloLROE": "140",
"EpigrafeLROE": "304300",
"tag": "test"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/alta-registro-tbai" \
--header "Authorization: Bearer aEfa3b4hk6Vg1e6ZcdD8Pv5" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerie\": \"AX\\/202412\",
\"NumFactura\": \"123\",
\"FechaExpedicionFactura\": \"2025-1-1\",
\"HoraExpedicionFactura\": \"10:00:00\",
\"DescripcionFactura\": \"test\",
\"Destinatarios\": [
{
\"NombreRazon\": \"IVAN SOLE MARTINEZ\",
\"NIF\": \"39707287H\"
}
],
\"DetallesFactura\": [
{
\"Descripcion\": \"Producto 1\",
\"Unidades\": 1,
\"PrecioPorUnidad\": 100,
\"SubTotal\": 100,
\"ImporteTotal\": 100,
\"Descuento\": 1234567890
}
],
\"Desglose\": [
{
\"TipoNoExenta\": 1,
\"BaseImponibleOImporteNoSujeto\": 100,
\"TipoImpositivo\": 21,
\"CuotaRepercutida\": 21,
\"TipoRecargoEquivalencia\": 21,
\"CuotaRecargoEquivalencia\": 21
}
],
\"ImporteTotal\": 121,
\"RetencionSoportada\": 21,
\"Claves\": [
1,
2,
3
],
\"ModeloLROE\": \"140\",
\"EpigrafeLROE\": \"304300\",
\"tag\": \"test\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-tbai'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"ModeloLROE": "140",
"EpigrafeLROE": "304300",
"tag": "test"
}
headers = {
'Authorization': 'Bearer aEfa3b4hk6Vg1e6ZcdD8Pv5',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"success": true,
"message": "AltaRegistroFacturacion created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 1,
"previous_id": null,
"alta_o_anulacion": 1,
"id_registro_anulado": null,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "47859447N",
"NumSerieFactura": "AX/2025-102",
"NumSerie": "AX/2025",
"NumFactura": "102",
"FechaExpedicionFactura": "2025-12-17",
"HoraExpedicionFactura": "10:00:00",
"FechaOperacion": null,
"DescripcionOperacion": null,
"NombreRazonDestinatario": "Ivan Sole",
"NIFDestinatario": "39707287H",
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": "121",
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": null,
"webhook_id": null,
"verifactu": false,
"no_verifactu": false,
"tbai": true,
"face": 0,
"json": "JSON recibido por la API",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": null,
"qr_image": null,
"qr_x": null,
"qr_y": null,
"qr_page": 1,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"VariosDestinatarios": 2,
"EmitidaPorTercODesti": 2,
"FacturaSimplificada": 2,
"FacturaEmitidaSustSimp": 2,
"DescripcionFactura": "Test Desc Factura",
"CodigoRectificativa": null,
"TipoRectificativa": null,
"RetencionSoportada": null,
"BaseImponibleACoste": null,
"FechaExpedicionFacturaAnterior": null,
"NumSerieAnterior": null,
"NumFacturaAnterior": null,
"SignatureValueFacturaAnterior": null,
"xml_tbai": null,
"xml_signed": null,
"SignatureValue": null,
"xml_tbai_response": null,
"estado_tbai": null,
"estado_registro_tbai": "No Registrado",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"envio_tbai_id": null,
"NumSerieDispositivo": null,
"ModeloLROE": null,
"EpigrafeLROE": null
}
]
}
}
Example response (400):
{
"success": false,
"message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Validar una factura de Tbai.
requires authentication
Valida el formato y los datos de una factura de Tbai sin generar el registro en la base de datos.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-tbai/validar';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer Vbh4Dce3Pg61EkZdf8aa6v5',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"ModeloLROE": "140",
"EpigrafeLROE": "304300",
"tag": "test"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-tbai/validar"
);
const headers = {
"Authorization": "Bearer Vbh4Dce3Pg61EkZdf8aa6v5",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"ModeloLROE": "140",
"EpigrafeLROE": "304300",
"tag": "test"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/alta-registro-tbai/validar" \
--header "Authorization: Bearer Vbh4Dce3Pg61EkZdf8aa6v5" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerie\": \"AX\\/202412\",
\"NumFactura\": \"123\",
\"FechaExpedicionFactura\": \"2025-1-1\",
\"HoraExpedicionFactura\": \"10:00:00\",
\"DescripcionFactura\": \"test\",
\"Destinatarios\": [
{
\"NombreRazon\": \"IVAN SOLE MARTINEZ\",
\"NIF\": \"39707287H\"
}
],
\"DetallesFactura\": [
{
\"Descripcion\": \"Producto 1\",
\"Unidades\": 1,
\"PrecioPorUnidad\": 100,
\"SubTotal\": 100,
\"ImporteTotal\": 100,
\"Descuento\": 1234567890
}
],
\"Desglose\": [
{
\"TipoNoExenta\": 1,
\"BaseImponibleOImporteNoSujeto\": 100,
\"TipoImpositivo\": 21,
\"CuotaRepercutida\": 21,
\"TipoRecargoEquivalencia\": 21,
\"CuotaRecargoEquivalencia\": 21
}
],
\"ImporteTotal\": 121,
\"RetencionSoportada\": 21,
\"Claves\": [
1,
2,
3
],
\"ModeloLROE\": \"140\",
\"EpigrafeLROE\": \"304300\",
\"tag\": \"test\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-tbai/validar'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"ModeloLROE": "140",
"EpigrafeLROE": "304300",
"tag": "test"
}
headers = {
'Authorization': 'Bearer Vbh4Dce3Pg61EkZdf8aa6v5',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Registro validado correctamente",
"code": 200
}
Example response (400):
{
"success": false,
"message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Anular Registros Facturacion
Registrar una anulacion de Tbai.
requires authentication
Registra una anulacion de registro Tbai en la base de datos para ser procesada y enviada.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer P5d1Z64V8E3bkehaDvfc6ga',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX/202412-1",
"FechaExpedicionFactura": "2025-11-11\n\n @response 201 {\n \"success\": true,\n \"message\": \"AnulacionRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n \"count\": 1,\n \"items\": [\n {\n \"id\": 2,\n \"previous_id\": null,\n \"alta_o_anulacion\": 2,\n \"id_registro_anulado\": 1,\n \"modificacionOSubsanacion\": null,\n \"id_registro_modificadoOSubsanado\": null,\n \"IDEmisorFactura\": \"47859447N\",\n \"NumSerieFactura\": \"AX/2025-102\",\n \"NumSerie\": \"AX/2025\",\n \"NumFactura\": \"102\",\n \"FechaExpedicionFactura\": \"2025-12-17\",\n \"HoraExpedicionFactura\": null,\n \"FechaOperacion\": null,\n \"DescripcionOperacion\": null,\n \"NombreRazonDestinatario\": null,\n \"NIFDestinatario\": \"39707287H\",\n \"RefExterna\": null,\n \"CuotaTotal\": null,\n \"ImporteTotal\": null,\n \"moneda\": \"EUR\",\n \"BaseRectificada\": null,\n \"CuotaRectificada\": null,\n \"CuotaRecargoRectificada\": null,\n \"tag\": \"/ANULACION\",\n \"webhook_id\": null,\n \"verifactu\": false,\n \"no_verifactu\": false,\n \"tbai\": true,\n \"face\": 0,\n \"json\": \"JSON recibido por la API\",\n \"base64_pdf\": null,\n \"base64_qr_pdf\": null,\n \"url_qr\": null,\n \"qr_image\": null,\n \"qr_x\": null,\n \"qr_y\": null,\n \"qr_page\": null,\n \"remitenteNacional\": 1,\n \"next_id\": null,\n \"IDVersion\": 1,\n \"VariosDestinatarios\": null,\n \"EmitidaPorTercODesti\": null,\n \"FacturaSimplificada\": null,\n \"FacturaEmitidaSustSimp\": null,\n \"DescripcionFactura\": \"RegistroAnulacion\",\n \"CodigoRectificativa\": null,\n \"TipoRectificativa\": null,\n \"RetencionSoportada\": null,\n \"BaseImponibleACoste\": null,\n \"FechaExpedicionFacturaAnterior\": null,\n \"NumSerieAnterior\": null,\n \"NumFacturaAnterior\": null,\n \"SignatureValueFacturaAnterior\": null,\n \"xml_tbai\": null,\n \"xml_signed\": null,\n \"SignatureValue\": null,\n \"xml_tbai_response\": null,\n \"estado_tbai\": null,\n \"estado_registro_tbai\": \"No Registrado\",\n \"codigo_error_tbai\": null,\n \"descripcion_error_tbai\": null,\n \"envio_tbai_id\": null,\n \"NumSerieDispositivo\": null,\n \"ModeloLROE\": null,\n \"EpigrafeLROE\": null\n }\n ]\n }\n}"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/anulacion-registro-tbai"
);
const headers = {
"Authorization": "Bearer P5d1Z64V8E3bkehaDvfc6ga",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-11-11\n\n @response 201 {\n \"success\": true,\n \"message\": \"AnulacionRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n \"count\": 1,\n \"items\": [\n {\n \"id\": 2,\n \"previous_id\": null,\n \"alta_o_anulacion\": 2,\n \"id_registro_anulado\": 1,\n \"modificacionOSubsanacion\": null,\n \"id_registro_modificadoOSubsanado\": null,\n \"IDEmisorFactura\": \"47859447N\",\n \"NumSerieFactura\": \"AX\/2025-102\",\n \"NumSerie\": \"AX\/2025\",\n \"NumFactura\": \"102\",\n \"FechaExpedicionFactura\": \"2025-12-17\",\n \"HoraExpedicionFactura\": null,\n \"FechaOperacion\": null,\n \"DescripcionOperacion\": null,\n \"NombreRazonDestinatario\": null,\n \"NIFDestinatario\": \"39707287H\",\n \"RefExterna\": null,\n \"CuotaTotal\": null,\n \"ImporteTotal\": null,\n \"moneda\": \"EUR\",\n \"BaseRectificada\": null,\n \"CuotaRectificada\": null,\n \"CuotaRecargoRectificada\": null,\n \"tag\": \"\/ANULACION\",\n \"webhook_id\": null,\n \"verifactu\": false,\n \"no_verifactu\": false,\n \"tbai\": true,\n \"face\": 0,\n \"json\": \"JSON recibido por la API\",\n \"base64_pdf\": null,\n \"base64_qr_pdf\": null,\n \"url_qr\": null,\n \"qr_image\": null,\n \"qr_x\": null,\n \"qr_y\": null,\n \"qr_page\": null,\n \"remitenteNacional\": 1,\n \"next_id\": null,\n \"IDVersion\": 1,\n \"VariosDestinatarios\": null,\n \"EmitidaPorTercODesti\": null,\n \"FacturaSimplificada\": null,\n \"FacturaEmitidaSustSimp\": null,\n \"DescripcionFactura\": \"RegistroAnulacion\",\n \"CodigoRectificativa\": null,\n \"TipoRectificativa\": null,\n \"RetencionSoportada\": null,\n \"BaseImponibleACoste\": null,\n \"FechaExpedicionFacturaAnterior\": null,\n \"NumSerieAnterior\": null,\n \"NumFacturaAnterior\": null,\n \"SignatureValueFacturaAnterior\": null,\n \"xml_tbai\": null,\n \"xml_signed\": null,\n \"SignatureValue\": null,\n \"xml_tbai_response\": null,\n \"estado_tbai\": null,\n \"estado_registro_tbai\": \"No Registrado\",\n \"codigo_error_tbai\": null,\n \"descripcion_error_tbai\": null,\n \"envio_tbai_id\": null,\n \"NumSerieDispositivo\": null,\n \"ModeloLROE\": null,\n \"EpigrafeLROE\": null\n }\n ]\n }\n}"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/anulacion-registro-tbai" \
--header "Authorization: Bearer P5d1Z64V8E3bkehaDvfc6ga" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerieFactura\": \"AX\\/202412-1\",
\"FechaExpedicionFactura\": \"2025-11-11\\n\\n @response 201 {\\n \\\"success\\\": true,\\n \\\"message\\\": \\\"AnulacionRegistroFacturacion created successfully\\\",\\n \\\"code\\\": 201,\\n \\\"data\\\": {\\n \\\"count\\\": 1,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": 2,\\n \\\"previous_id\\\": null,\\n \\\"alta_o_anulacion\\\": 2,\\n \\\"id_registro_anulado\\\": 1,\\n \\\"modificacionOSubsanacion\\\": null,\\n \\\"id_registro_modificadoOSubsanado\\\": null,\\n \\\"IDEmisorFactura\\\": \\\"47859447N\\\",\\n \\\"NumSerieFactura\\\": \\\"AX\\/2025-102\\\",\\n \\\"NumSerie\\\": \\\"AX\\/2025\\\",\\n \\\"NumFactura\\\": \\\"102\\\",\\n \\\"FechaExpedicionFactura\\\": \\\"2025-12-17\\\",\\n \\\"HoraExpedicionFactura\\\": null,\\n \\\"FechaOperacion\\\": null,\\n \\\"DescripcionOperacion\\\": null,\\n \\\"NombreRazonDestinatario\\\": null,\\n \\\"NIFDestinatario\\\": \\\"39707287H\\\",\\n \\\"RefExterna\\\": null,\\n \\\"CuotaTotal\\\": null,\\n \\\"ImporteTotal\\\": null,\\n \\\"moneda\\\": \\\"EUR\\\",\\n \\\"BaseRectificada\\\": null,\\n \\\"CuotaRectificada\\\": null,\\n \\\"CuotaRecargoRectificada\\\": null,\\n \\\"tag\\\": \\\"\\/ANULACION\\\",\\n \\\"webhook_id\\\": null,\\n \\\"verifactu\\\": false,\\n \\\"no_verifactu\\\": false,\\n \\\"tbai\\\": true,\\n \\\"face\\\": 0,\\n \\\"json\\\": \\\"JSON recibido por la API\\\",\\n \\\"base64_pdf\\\": null,\\n \\\"base64_qr_pdf\\\": null,\\n \\\"url_qr\\\": null,\\n \\\"qr_image\\\": null,\\n \\\"qr_x\\\": null,\\n \\\"qr_y\\\": null,\\n \\\"qr_page\\\": null,\\n \\\"remitenteNacional\\\": 1,\\n \\\"next_id\\\": null,\\n \\\"IDVersion\\\": 1,\\n \\\"VariosDestinatarios\\\": null,\\n \\\"EmitidaPorTercODesti\\\": null,\\n \\\"FacturaSimplificada\\\": null,\\n \\\"FacturaEmitidaSustSimp\\\": null,\\n \\\"DescripcionFactura\\\": \\\"RegistroAnulacion\\\",\\n \\\"CodigoRectificativa\\\": null,\\n \\\"TipoRectificativa\\\": null,\\n \\\"RetencionSoportada\\\": null,\\n \\\"BaseImponibleACoste\\\": null,\\n \\\"FechaExpedicionFacturaAnterior\\\": null,\\n \\\"NumSerieAnterior\\\": null,\\n \\\"NumFacturaAnterior\\\": null,\\n \\\"SignatureValueFacturaAnterior\\\": null,\\n \\\"xml_tbai\\\": null,\\n \\\"xml_signed\\\": null,\\n \\\"SignatureValue\\\": null,\\n \\\"xml_tbai_response\\\": null,\\n \\\"estado_tbai\\\": null,\\n \\\"estado_registro_tbai\\\": \\\"No Registrado\\\",\\n \\\"codigo_error_tbai\\\": null,\\n \\\"descripcion_error_tbai\\\": null,\\n \\\"envio_tbai_id\\\": null,\\n \\\"NumSerieDispositivo\\\": null,\\n \\\"ModeloLROE\\\": null,\\n \\\"EpigrafeLROE\\\": null\\n }\\n ]\\n }\\n}\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX\/202412-1",
"FechaExpedicionFactura": "2025-11-11\n\n @response 201 {\n \"success\": true,\n \"message\": \"AnulacionRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n \"count\": 1,\n \"items\": [\n {\n \"id\": 2,\n \"previous_id\": null,\n \"alta_o_anulacion\": 2,\n \"id_registro_anulado\": 1,\n \"modificacionOSubsanacion\": null,\n \"id_registro_modificadoOSubsanado\": null,\n \"IDEmisorFactura\": \"47859447N\",\n \"NumSerieFactura\": \"AX\/2025-102\",\n \"NumSerie\": \"AX\/2025\",\n \"NumFactura\": \"102\",\n \"FechaExpedicionFactura\": \"2025-12-17\",\n \"HoraExpedicionFactura\": null,\n \"FechaOperacion\": null,\n \"DescripcionOperacion\": null,\n \"NombreRazonDestinatario\": null,\n \"NIFDestinatario\": \"39707287H\",\n \"RefExterna\": null,\n \"CuotaTotal\": null,\n \"ImporteTotal\": null,\n \"moneda\": \"EUR\",\n \"BaseRectificada\": null,\n \"CuotaRectificada\": null,\n \"CuotaRecargoRectificada\": null,\n \"tag\": \"\/ANULACION\",\n \"webhook_id\": null,\n \"verifactu\": false,\n \"no_verifactu\": false,\n \"tbai\": true,\n \"face\": 0,\n \"json\": \"JSON recibido por la API\",\n \"base64_pdf\": null,\n \"base64_qr_pdf\": null,\n \"url_qr\": null,\n \"qr_image\": null,\n \"qr_x\": null,\n \"qr_y\": null,\n \"qr_page\": null,\n \"remitenteNacional\": 1,\n \"next_id\": null,\n \"IDVersion\": 1,\n \"VariosDestinatarios\": null,\n \"EmitidaPorTercODesti\": null,\n \"FacturaSimplificada\": null,\n \"FacturaEmitidaSustSimp\": null,\n \"DescripcionFactura\": \"RegistroAnulacion\",\n \"CodigoRectificativa\": null,\n \"TipoRectificativa\": null,\n \"RetencionSoportada\": null,\n \"BaseImponibleACoste\": null,\n \"FechaExpedicionFacturaAnterior\": null,\n \"NumSerieAnterior\": null,\n \"NumFacturaAnterior\": null,\n \"SignatureValueFacturaAnterior\": null,\n \"xml_tbai\": null,\n \"xml_signed\": null,\n \"SignatureValue\": null,\n \"xml_tbai_response\": null,\n \"estado_tbai\": null,\n \"estado_registro_tbai\": \"No Registrado\",\n \"codigo_error_tbai\": null,\n \"descripcion_error_tbai\": null,\n \"envio_tbai_id\": null,\n \"NumSerieDispositivo\": null,\n \"ModeloLROE\": null,\n \"EpigrafeLROE\": null\n }\n ]\n }\n}"
}
headers = {
'Authorization': 'Bearer P5d1Z64V8E3bkehaDvfc6ga',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (400):
{
"success": false,
"message": "El tipo de factura no es válido. Campo \"type\" no encontrado.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Anular registro Tbai por id.
requires authentication
Anula un registro Tbai existente en la base de datos usando el id, registra la anulacion y se procesa.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai/1';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer Zf5aheagvc4Dd3k16PVb8E6',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/anulacion-registro-tbai/1"
);
const headers = {
"Authorization": "Bearer Zf5aheagvc4Dd3k16PVb8E6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/anulacion-registro-tbai/1" \
--header "Authorization: Bearer Zf5aheagvc4Dd3k16PVb8E6" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai/1'
headers = {
'Authorization': 'Bearer Zf5aheagvc4Dd3k16PVb8E6',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Example response (201):
{
"success": true,
"message": "AnulacionRegistroFacturacion created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 2,
"previous_id": null,
"alta_o_anulacion": 2,
"id_registro_anulado": 1,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "47859447N",
"NumSerieFactura": "AX/2025-102",
"NumSerie": "AX/2025",
"NumFactura": "102",
"FechaExpedicionFactura": "2025-12-17",
"HoraExpedicionFactura": null,
"FechaOperacion": null,
"DescripcionOperacion": null,
"NombreRazonDestinatario": null,
"NIFDestinatario": "39707287H",
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": null,
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": "/ANULACION",
"webhook_id": null,
"verifactu": false,
"no_verifactu": false,
"tbai": true,
"face": 0,
"json": "JSON recibido por la API",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": null,
"qr_image": null,
"qr_x": null,
"qr_y": null,
"qr_page": null,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"VariosDestinatarios": null,
"EmitidaPorTercODesti": null,
"FacturaSimplificada": null,
"FacturaEmitidaSustSimp": null,
"DescripcionFactura": "RegistroAnulacion",
"CodigoRectificativa": null,
"TipoRectificativa": null,
"RetencionSoportada": null,
"BaseImponibleACoste": null,
"FechaExpedicionFacturaAnterior": null,
"NumSerieAnterior": null,
"NumFacturaAnterior": null,
"SignatureValueFacturaAnterior": null,
"xml_tbai": null,
"xml_signed": null,
"SignatureValue": null,
"xml_tbai_response": null,
"estado_tbai": null,
"estado_registro_tbai": "No Registrado",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"envio_tbai_id": null,
"NumSerieDispositivo": null,
"ModeloLROE": null,
"EpigrafeLROE": null
}
]
}
}
Example response (404):
{
"success": false,
"message": "No se encontró la factura especificada.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Consultar Registros Facturacion
Obtener lista de registros TBAI
requires authentication
Muestra una lista con todos los registros TBAI del usuario. Añadiendo los campos del body se puede filtrar el listado.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-tbai';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer Pb8h6e6aDEZafk15g43Vdvc',
'Content-Type' => 'application/json',
],
'query' => [
'IDEmisorFactura' => 'A39200019',
'NumSerieFactura' => 'AX/202412-1',
'FechaExpedicionFactura' => '2025-01-01',
'NifDestinatario' => '123456789',
'NombreRazonDestinatario' => 'Nombre del destinatario',
'ImporteTotal' => '100',
'tag' => '123456789',
'alta_o_anulacion' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-tbai"
);
const params = {
"IDEmisorFactura": "A39200019",
"NumSerieFactura": "AX/202412-1",
"FechaExpedicionFactura": "2025-01-01",
"NifDestinatario": "123456789",
"NombreRazonDestinatario": "Nombre del destinatario",
"ImporteTotal": "100",
"tag": "123456789",
"alta_o_anulacion": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer Pb8h6e6aDEZafk15g43Vdvc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/alta-registro-tbai?IDEmisorFactura=A39200019&NumSerieFactura=AX%2F202412-1&FechaExpedicionFactura=2025-01-01&NifDestinatario=123456789&NombreRazonDestinatario=Nombre+del+destinatario&ImporteTotal=100&tag=123456789&alta_o_anulacion=1" \
--header "Authorization: Bearer Pb8h6e6aDEZafk15g43Vdvc" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-tbai'
params = {
'IDEmisorFactura': 'A39200019',
'NumSerieFactura': 'AX/202412-1',
'FechaExpedicionFactura': '2025-01-01',
'NifDestinatario': '123456789',
'NombreRazonDestinatario': 'Nombre del destinatario',
'ImporteTotal': '100',
'tag': '123456789',
'alta_o_anulacion': '1',
}
headers = {
'Authorization': 'Bearer Pb8h6e6aDEZafk15g43Vdvc',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Invoices listed successfully",
"data": {
"items": [
{
"id": 1,
"previous_id": null,
"alta_o_anulacion": 1,
"id_registro_anulado": null,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "47859447N",
"NumSerieFactura": "AX/2025-100",
"NumSerie": "AX/2025",
"NumFactura": "100",
"FechaExpedicionFactura": "2025-12-17",
"HoraExpedicionFactura": "10:00:00",
"FechaOperacion": null,
"DescripcionOperacion": null,
"NombreRazonDestinatario": "Ivan Sole",
"NIFDestinatario": "39707287H",
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": "121",
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": null,
"webhook_id": null,
"verifactu": false,
"no_verifactu": false,
"tbai": true,
"face": 0,
"json": "JSON recibido",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": "https://tbai.prep.gipuzkoa.eus/qr/?id=TBAI-47859447N-171225-ivFyfDgmtpLqb-211&s=AX/2025&nf=100&i=121&cr=234",
"qr_image": "QR en formato base64",
"qr_x": null,
"qr_y": null,
"qr_page": 1,
"remitenteNacional": 1,
"next_id": 2,
"IDVersion": 1,
"VariosDestinatarios": 2,
"EmitidaPorTercODesti": 2,
"FacturaSimplificada": 2,
"FacturaEmitidaSustSimp": 2,
"DescripcionFactura": "Test Desc Factura",
"CodigoRectificativa": null,
"TipoRectificativa": null,
"RetencionSoportada": null,
"BaseImponibleACoste": null,
"FechaExpedicionFacturaAnterior": null,
"NumSerieAnterior": null,
"NumFacturaAnterior": null,
"SignatureValueFacturaAnterior": null,
"xml_tbai": "XML TBAI",
"xml_signed": "XML TBAI firmado",
"SignatureValue": "SignatureValue de la factura",
"xml_tbai_response": "XML respuesta de TBAI",
"estado_tbai": "Recibido - ALTA PREP",
"estado_registro_tbai": "Registrado",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"envio_tbai_id": 1,
"NumSerieDispositivo": null,
"ModeloLROE": null,
"EpigrafeLROE": null
}
],
"count": 1
},
"pagination": {
"total": 1,
"perPage": 10,
"currentPage": 1,
"lastPage": 1
}
}
Example response (401):
{
"success": false,
"message": "El IDEmisor no coincide con el de tu cuenta.",
"error": 401,
"code": 401
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un registro TBAI por id
requires authentication
Muestra los datos de un registro TBAI filtrando por el ID.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-tbai/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 68PDhavEZckg3fe6bV45ad1',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/alta-registro-tbai/1"
);
const headers = {
"Authorization": "Bearer 68PDhavEZckg3fe6bV45ad1",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/alta-registro-tbai/1" \
--header "Authorization: Bearer 68PDhavEZckg3fe6bV45ad1" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-tbai/1'
headers = {
'Authorization': 'Bearer 68PDhavEZckg3fe6bV45ad1',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Invoice obtained successfully",
"data": {
"items": {
"id": 1,
"previous_id": null,
"alta_o_anulacion": 1,
"id_registro_anulado": null,
"modificacionOSubsanacion": null,
"id_registro_modificadoOSubsanado": null,
"IDEmisorFactura": "47859447N",
"NumSerieFactura": "AX/2025-100",
"NumSerie": "AX/2025",
"NumFactura": "100",
"FechaExpedicionFactura": "2025-12-17",
"HoraExpedicionFactura": "10:00:00",
"FechaOperacion": null,
"DescripcionOperacion": null,
"NombreRazonDestinatario": "Ivan Sole",
"NIFDestinatario": "39707287H",
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": "121",
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": null,
"webhook_id": null,
"verifactu": false,
"no_verifactu": false,
"tbai": true,
"face": 0,
"json": "JSON recibido",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": "https://tbai.prep.gipuzkoa.eus/qr/?id=TBAI-47859447N-171225-ivFyfDgmtpLqb-211&s=AX/2025&nf=100&i=121&cr=234",
"qr_image": "QR en formato base64",
"qr_x": null,
"qr_y": null,
"qr_page": 1,
"remitenteNacional": 1,
"next_id": 2,
"IDVersion": 1,
"VariosDestinatarios": 2,
"EmitidaPorTercODesti": 2,
"FacturaSimplificada": 2,
"FacturaEmitidaSustSimp": 2,
"DescripcionFactura": "Test Desc Factura",
"CodigoRectificativa": null,
"TipoRectificativa": null,
"RetencionSoportada": null,
"BaseImponibleACoste": null,
"FechaExpedicionFacturaAnterior": null,
"NumSerieAnterior": null,
"NumFacturaAnterior": null,
"SignatureValueFacturaAnterior": null,
"xml_tbai": "XML TBAI",
"xml_signed": "XML TBAI firmado",
"SignatureValue": "SignatureValue de la factura",
"xml_tbai_response": "XML respuesta de TBAI",
"estado_tbai": "Recibido - ALTA PREP",
"estado_registro_tbai": "Registrado",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"envio_tbai_id": 1,
"NumSerieDispositivo": null,
"ModeloLROE": null,
"EpigrafeLROE": null
},
"count": 1
}
}
Example response (404):
{
"success": false,
"code": 404,
"message": "No se encontró la factura especificada.",
"data": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
QR
Generar QR de TBAI
requires authentication
Genera el QR de un registro TBAI. Si el PDF ya existe, añade el QR al PDF. El registro debe haber sido enviado a TBAI.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/tbai/QR/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 5eaPd816vVaZD6f4bghcEk3',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/tbai/QR/1"
);
const headers = {
"Authorization": "Bearer 5eaPd816vVaZD6f4bghcEk3",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/tbai/QR/1" \
--header "Authorization: Bearer 5eaPd816vVaZD6f4bghcEk3" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/tbai/QR/1'
headers = {
'Authorization': 'Bearer 5eaPd816vVaZD6f4bghcEk3',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "QR generated successfully",
"data": {
"url_qr": "https://qr.com/1234567890",
"qr_image": "qrbase64",
"base64_qr_pdf": null
}
}
Example response (400):
{
"success": false,
"code": 400,
"message": "La factura no se ha enviado aun a TBAI, reintente en unos segundos.",
"data": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ZUZENDU
Modificar un registro de Tbai.
requires authentication
Registra una modificacion de registro Tbai en la base de datos para ser procesada y enviada. Permite modificar los datos que no se pueden corregir usando rectificativas de los registros recibidos por TBAI.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/tbai/modificar/sed';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer 65Zk8f4gVcdDaeE1h63aPvb',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"tag": "test"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/tbai/modificar/sed"
);
const headers = {
"Authorization": "Bearer 65Zk8f4gVcdDaeE1h63aPvb",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"tag": "test"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/tbai/modificar/sed" \
--header "Authorization: Bearer 65Zk8f4gVcdDaeE1h63aPvb" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerie\": \"AX\\/202412\",
\"NumFactura\": \"123\",
\"FechaExpedicionFactura\": \"2025-1-1\",
\"HoraExpedicionFactura\": \"10:00:00\",
\"DescripcionFactura\": \"test\",
\"Destinatarios\": [
{
\"NombreRazon\": \"IVAN SOLE MARTINEZ\",
\"NIF\": \"39707287H\"
}
],
\"DetallesFactura\": [
{
\"Descripcion\": \"Producto 1\",
\"Unidades\": 1,
\"PrecioPorUnidad\": 100,
\"SubTotal\": 100,
\"ImporteTotal\": 100,
\"Descuento\": 1234567890
}
],
\"Desglose\": [
{
\"TipoNoExenta\": 1,
\"BaseImponibleOImporteNoSujeto\": 100,
\"TipoImpositivo\": 21,
\"CuotaRepercutida\": 21,
\"TipoRecargoEquivalencia\": 21,
\"CuotaRecargoEquivalencia\": 21
}
],
\"ImporteTotal\": 121,
\"RetencionSoportada\": 21,
\"Claves\": [
1,
2,
3
],
\"tag\": \"test\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/tbai/modificar/sed'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"tag": "test"
}
headers = {
'Authorization': 'Bearer 65Zk8f4gVcdDaeE1h63aPvb',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"success": true,
"message": "AltaRegistroFacturacion created successfully",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 2,
"previous_id": null,
"alta_o_anulacion": 1,
"id_registro_anulado": null,
"modificacionOSubsanacion": "MODIFICAR",
"id_registro_modificadoOSubsanado": 1,
"IDEmisorFactura": "47859447N",
"NumSerieFactura": "AX/2025-102",
"NumSerie": "AX/2025",
"NumFactura": "102",
"FechaExpedicionFactura": "2025-12-17",
"HoraExpedicionFactura": "10:00:00",
"FechaOperacion": "2022-07-10",
"DescripcionOperacion": null,
"NombreRazonDestinatario": "Lluis Martinez",
"NIFDestinatario": "47859447N",
"RefExterna": null,
"CuotaTotal": null,
"ImporteTotal": "121",
"moneda": "EUR",
"BaseRectificada": null,
"CuotaRectificada": null,
"CuotaRecargoRectificada": null,
"tag": null,
"webhook_id": null,
"verifactu": false,
"no_verifactu": false,
"tbai": true,
"face": 0,
"json": "JSON recibido por la API",
"base64_pdf": null,
"base64_qr_pdf": null,
"url_qr": null,
"qr_image": null,
"qr_x": null,
"qr_y": null,
"qr_page": 1,
"remitenteNacional": 1,
"next_id": null,
"IDVersion": 1,
"VariosDestinatarios": 2,
"EmitidaPorTercODesti": 2,
"FacturaSimplificada": 2,
"FacturaEmitidaSustSimp": 2,
"DescripcionFactura": "Test Desc Factura",
"CodigoRectificativa": null,
"TipoRectificativa": null,
"RetencionSoportada": null,
"BaseImponibleACoste": null,
"FechaExpedicionFacturaAnterior": "2025-12-17",
"NumSerieAnterior": "AX/2025",
"NumFacturaAnterior": "102",
"SignatureValueFacturaAnterior": "SignatureValueFacturaAnterior",
"xml_tbai": null,
"xml_signed": "XML firmado",
"SignatureValue": "SignatureValue",
"xml_tbai_response": null,
"estado_tbai": null,
"estado_registro_tbai": "No Registrado",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"envio_tbai_id": null,
"NumSerieDispositivo": null,
"ModeloLROE": null,
"EpigrafeLROE": null
}
]
}
}
Example response (400):
{
"success": false,
"message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Subsanar un registro de Tbai.
requires authentication
Registra una subsanacion de registro Tbai en la base de datos para ser procesada y enviada. Permite subsanar los datos que no se pueden corregir usando rectificativas de los registros rechazados por TBAI.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/tbai/subsanar/quia';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer fV1EDbed53aga8Z466Pkchv',
'Content-Type' => 'application/json',
],
'json' => {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"tag": "test\n\n\n* @response 201 {\n \"success\": true,\n \"message\": \"AltaRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n \"count\": 1,\n \"items\": [\n {\n \"id\": 2,\n \"previous_id\": null,\n \"alta_o_anulacion\": 1,\n \"id_registro_anulado\": null,\n \"modificacionOSubsanacion\": \"SUBSANAR\",\n \"id_registro_modificadoOSubsanado\": 1,\n \"IDEmisorFactura\": \"47859447N\",\n \"NumSerieFactura\": \"AX/2025-102\",\n \"NumSerie\": \"AX/2025\",\n \"NumFactura\": \"102\",\n \"FechaExpedicionFactura\": \"2025-12-17\",\n \"HoraExpedicionFactura\": \"10:00:00\",\n \"FechaOperacion\": \"2022-07-10\",\n \"DescripcionOperacion\": null,\n \"NombreRazonDestinatario\": \"Lluis Martinez\",\n \"NIFDestinatario\": \"47859447N\",\n \"RefExterna\": null,\n \"CuotaTotal\": null,\n \"ImporteTotal\": \"121\",\n \"moneda\": \"EUR\",\n \"BaseRectificada\": null,\n \"CuotaRectificada\": null,\n \"CuotaRecargoRectificada\": null,\n \"tag\": null,\n \"webhook_id\": null,\n \"verifactu\": false,\n \"no_verifactu\": false,\n \"tbai\": true,\n \"face\": 0,\n \"json\": \"JSON recibido por la API\",\n \"base64_pdf\": null,\n \"base64_qr_pdf\": null,\n \"url_qr\": null,\n \"qr_image\": null,\n \"qr_x\": null,\n \"qr_y\": null,\n \"qr_page\": 1,\n \"remitenteNacional\": 1,\n \"next_id\": null,\n \"IDVersion\": 1,\n \"VariosDestinatarios\": 2,\n \"EmitidaPorTercODesti\": 2,\n \"FacturaSimplificada\": 2,\n \"FacturaEmitidaSustSimp\": 2,\n \"DescripcionFactura\": \"Test Desc Factura\",\n \"CodigoRectificativa\": null,\n \"TipoRectificativa\": null,\n \"RetencionSoportada\": null,\n \"BaseImponibleACoste\": null,\n \"FechaExpedicionFacturaAnterior\": \"2025-12-17\",\n \"NumSerieAnterior\": \"AX/2025\",\n \"NumFacturaAnterior\": \"102\",\n \"SignatureValueFacturaAnterior\": \"SignatureValueFacturaAnterior\",\n \"xml_tbai\": null,\n \"xml_signed\": \"XML firmado\",\n \"SignatureValue\": \"SignatureValue\",\n \"xml_tbai_response\": null,\n \"estado_tbai\": null,\n \"estado_registro_tbai\": \"No Registrado\",\n \"codigo_error_tbai\": null,\n \"descripcion_error_tbai\": null,\n \"envio_tbai_id\": null,\n \"NumSerieDispositivo\": null,\n \"ModeloLROE\": null,\n \"EpigrafeLROE\": null\n }\n ]\n }\n}"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/tbai/subsanar/quia"
);
const headers = {
"Authorization": "Bearer fV1EDbed53aga8Z466Pkchv",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"tag": "test\n\n\n* @response 201 {\n \"success\": true,\n \"message\": \"AltaRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n \"count\": 1,\n \"items\": [\n {\n \"id\": 2,\n \"previous_id\": null,\n \"alta_o_anulacion\": 1,\n \"id_registro_anulado\": null,\n \"modificacionOSubsanacion\": \"SUBSANAR\",\n \"id_registro_modificadoOSubsanado\": 1,\n \"IDEmisorFactura\": \"47859447N\",\n \"NumSerieFactura\": \"AX\/2025-102\",\n \"NumSerie\": \"AX\/2025\",\n \"NumFactura\": \"102\",\n \"FechaExpedicionFactura\": \"2025-12-17\",\n \"HoraExpedicionFactura\": \"10:00:00\",\n \"FechaOperacion\": \"2022-07-10\",\n \"DescripcionOperacion\": null,\n \"NombreRazonDestinatario\": \"Lluis Martinez\",\n \"NIFDestinatario\": \"47859447N\",\n \"RefExterna\": null,\n \"CuotaTotal\": null,\n \"ImporteTotal\": \"121\",\n \"moneda\": \"EUR\",\n \"BaseRectificada\": null,\n \"CuotaRectificada\": null,\n \"CuotaRecargoRectificada\": null,\n \"tag\": null,\n \"webhook_id\": null,\n \"verifactu\": false,\n \"no_verifactu\": false,\n \"tbai\": true,\n \"face\": 0,\n \"json\": \"JSON recibido por la API\",\n \"base64_pdf\": null,\n \"base64_qr_pdf\": null,\n \"url_qr\": null,\n \"qr_image\": null,\n \"qr_x\": null,\n \"qr_y\": null,\n \"qr_page\": 1,\n \"remitenteNacional\": 1,\n \"next_id\": null,\n \"IDVersion\": 1,\n \"VariosDestinatarios\": 2,\n \"EmitidaPorTercODesti\": 2,\n \"FacturaSimplificada\": 2,\n \"FacturaEmitidaSustSimp\": 2,\n \"DescripcionFactura\": \"Test Desc Factura\",\n \"CodigoRectificativa\": null,\n \"TipoRectificativa\": null,\n \"RetencionSoportada\": null,\n \"BaseImponibleACoste\": null,\n \"FechaExpedicionFacturaAnterior\": \"2025-12-17\",\n \"NumSerieAnterior\": \"AX\/2025\",\n \"NumFacturaAnterior\": \"102\",\n \"SignatureValueFacturaAnterior\": \"SignatureValueFacturaAnterior\",\n \"xml_tbai\": null,\n \"xml_signed\": \"XML firmado\",\n \"SignatureValue\": \"SignatureValue\",\n \"xml_tbai_response\": null,\n \"estado_tbai\": null,\n \"estado_registro_tbai\": \"No Registrado\",\n \"codigo_error_tbai\": null,\n \"descripcion_error_tbai\": null,\n \"envio_tbai_id\": null,\n \"NumSerieDispositivo\": null,\n \"ModeloLROE\": null,\n \"EpigrafeLROE\": null\n }\n ]\n }\n}"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/tbai/subsanar/quia" \
--header "Authorization: Bearer fV1EDbed53aga8Z466Pkchv" \
--header "Content-Type: application/json" \
--data "{
\"IDEmisorFactura\": \"A39200019\",
\"NumSerie\": \"AX\\/202412\",
\"NumFactura\": \"123\",
\"FechaExpedicionFactura\": \"2025-1-1\",
\"HoraExpedicionFactura\": \"10:00:00\",
\"DescripcionFactura\": \"test\",
\"Destinatarios\": [
{
\"NombreRazon\": \"IVAN SOLE MARTINEZ\",
\"NIF\": \"39707287H\"
}
],
\"DetallesFactura\": [
{
\"Descripcion\": \"Producto 1\",
\"Unidades\": 1,
\"PrecioPorUnidad\": 100,
\"SubTotal\": 100,
\"ImporteTotal\": 100,
\"Descuento\": 1234567890
}
],
\"Desglose\": [
{
\"TipoNoExenta\": 1,
\"BaseImponibleOImporteNoSujeto\": 100,
\"TipoImpositivo\": 21,
\"CuotaRepercutida\": 21,
\"TipoRecargoEquivalencia\": 21,
\"CuotaRecargoEquivalencia\": 21
}
],
\"ImporteTotal\": 121,
\"RetencionSoportada\": 21,
\"Claves\": [
1,
2,
3
],
\"tag\": \"test\\n\\n\\n* @response 201 {\\n \\\"success\\\": true,\\n \\\"message\\\": \\\"AltaRegistroFacturacion created successfully\\\",\\n \\\"code\\\": 201,\\n \\\"data\\\": {\\n \\\"count\\\": 1,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": 2,\\n \\\"previous_id\\\": null,\\n \\\"alta_o_anulacion\\\": 1,\\n \\\"id_registro_anulado\\\": null,\\n \\\"modificacionOSubsanacion\\\": \\\"SUBSANAR\\\",\\n \\\"id_registro_modificadoOSubsanado\\\": 1,\\n \\\"IDEmisorFactura\\\": \\\"47859447N\\\",\\n \\\"NumSerieFactura\\\": \\\"AX\\/2025-102\\\",\\n \\\"NumSerie\\\": \\\"AX\\/2025\\\",\\n \\\"NumFactura\\\": \\\"102\\\",\\n \\\"FechaExpedicionFactura\\\": \\\"2025-12-17\\\",\\n \\\"HoraExpedicionFactura\\\": \\\"10:00:00\\\",\\n \\\"FechaOperacion\\\": \\\"2022-07-10\\\",\\n \\\"DescripcionOperacion\\\": null,\\n \\\"NombreRazonDestinatario\\\": \\\"Lluis Martinez\\\",\\n \\\"NIFDestinatario\\\": \\\"47859447N\\\",\\n \\\"RefExterna\\\": null,\\n \\\"CuotaTotal\\\": null,\\n \\\"ImporteTotal\\\": \\\"121\\\",\\n \\\"moneda\\\": \\\"EUR\\\",\\n \\\"BaseRectificada\\\": null,\\n \\\"CuotaRectificada\\\": null,\\n \\\"CuotaRecargoRectificada\\\": null,\\n \\\"tag\\\": null,\\n \\\"webhook_id\\\": null,\\n \\\"verifactu\\\": false,\\n \\\"no_verifactu\\\": false,\\n \\\"tbai\\\": true,\\n \\\"face\\\": 0,\\n \\\"json\\\": \\\"JSON recibido por la API\\\",\\n \\\"base64_pdf\\\": null,\\n \\\"base64_qr_pdf\\\": null,\\n \\\"url_qr\\\": null,\\n \\\"qr_image\\\": null,\\n \\\"qr_x\\\": null,\\n \\\"qr_y\\\": null,\\n \\\"qr_page\\\": 1,\\n \\\"remitenteNacional\\\": 1,\\n \\\"next_id\\\": null,\\n \\\"IDVersion\\\": 1,\\n \\\"VariosDestinatarios\\\": 2,\\n \\\"EmitidaPorTercODesti\\\": 2,\\n \\\"FacturaSimplificada\\\": 2,\\n \\\"FacturaEmitidaSustSimp\\\": 2,\\n \\\"DescripcionFactura\\\": \\\"Test Desc Factura\\\",\\n \\\"CodigoRectificativa\\\": null,\\n \\\"TipoRectificativa\\\": null,\\n \\\"RetencionSoportada\\\": null,\\n \\\"BaseImponibleACoste\\\": null,\\n \\\"FechaExpedicionFacturaAnterior\\\": \\\"2025-12-17\\\",\\n \\\"NumSerieAnterior\\\": \\\"AX\\/2025\\\",\\n \\\"NumFacturaAnterior\\\": \\\"102\\\",\\n \\\"SignatureValueFacturaAnterior\\\": \\\"SignatureValueFacturaAnterior\\\",\\n \\\"xml_tbai\\\": null,\\n \\\"xml_signed\\\": \\\"XML firmado\\\",\\n \\\"SignatureValue\\\": \\\"SignatureValue\\\",\\n \\\"xml_tbai_response\\\": null,\\n \\\"estado_tbai\\\": null,\\n \\\"estado_registro_tbai\\\": \\\"No Registrado\\\",\\n \\\"codigo_error_tbai\\\": null,\\n \\\"descripcion_error_tbai\\\": null,\\n \\\"envio_tbai_id\\\": null,\\n \\\"NumSerieDispositivo\\\": null,\\n \\\"ModeloLROE\\\": null,\\n \\\"EpigrafeLROE\\\": null\\n }\\n ]\\n }\\n}\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/tbai/subsanar/quia'
payload = {
"IDEmisorFactura": "A39200019",
"NumSerie": "AX\/202412",
"NumFactura": "123",
"FechaExpedicionFactura": "2025-1-1",
"HoraExpedicionFactura": "10:00:00",
"DescripcionFactura": "test",
"Destinatarios": [
{
"NombreRazon": "IVAN SOLE MARTINEZ",
"NIF": "39707287H"
}
],
"DetallesFactura": [
{
"Descripcion": "Producto 1",
"Unidades": 1,
"PrecioPorUnidad": 100,
"SubTotal": 100,
"ImporteTotal": 100,
"Descuento": 1234567890
}
],
"Desglose": [
{
"TipoNoExenta": 1,
"BaseImponibleOImporteNoSujeto": 100,
"TipoImpositivo": 21,
"CuotaRepercutida": 21,
"TipoRecargoEquivalencia": 21,
"CuotaRecargoEquivalencia": 21
}
],
"ImporteTotal": 121,
"RetencionSoportada": 21,
"Claves": [
1,
2,
3
],
"tag": "test\n\n\n* @response 201 {\n \"success\": true,\n \"message\": \"AltaRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n \"count\": 1,\n \"items\": [\n {\n \"id\": 2,\n \"previous_id\": null,\n \"alta_o_anulacion\": 1,\n \"id_registro_anulado\": null,\n \"modificacionOSubsanacion\": \"SUBSANAR\",\n \"id_registro_modificadoOSubsanado\": 1,\n \"IDEmisorFactura\": \"47859447N\",\n \"NumSerieFactura\": \"AX\/2025-102\",\n \"NumSerie\": \"AX\/2025\",\n \"NumFactura\": \"102\",\n \"FechaExpedicionFactura\": \"2025-12-17\",\n \"HoraExpedicionFactura\": \"10:00:00\",\n \"FechaOperacion\": \"2022-07-10\",\n \"DescripcionOperacion\": null,\n \"NombreRazonDestinatario\": \"Lluis Martinez\",\n \"NIFDestinatario\": \"47859447N\",\n \"RefExterna\": null,\n \"CuotaTotal\": null,\n \"ImporteTotal\": \"121\",\n \"moneda\": \"EUR\",\n \"BaseRectificada\": null,\n \"CuotaRectificada\": null,\n \"CuotaRecargoRectificada\": null,\n \"tag\": null,\n \"webhook_id\": null,\n \"verifactu\": false,\n \"no_verifactu\": false,\n \"tbai\": true,\n \"face\": 0,\n \"json\": \"JSON recibido por la API\",\n \"base64_pdf\": null,\n \"base64_qr_pdf\": null,\n \"url_qr\": null,\n \"qr_image\": null,\n \"qr_x\": null,\n \"qr_y\": null,\n \"qr_page\": 1,\n \"remitenteNacional\": 1,\n \"next_id\": null,\n \"IDVersion\": 1,\n \"VariosDestinatarios\": 2,\n \"EmitidaPorTercODesti\": 2,\n \"FacturaSimplificada\": 2,\n \"FacturaEmitidaSustSimp\": 2,\n \"DescripcionFactura\": \"Test Desc Factura\",\n \"CodigoRectificativa\": null,\n \"TipoRectificativa\": null,\n \"RetencionSoportada\": null,\n \"BaseImponibleACoste\": null,\n \"FechaExpedicionFacturaAnterior\": \"2025-12-17\",\n \"NumSerieAnterior\": \"AX\/2025\",\n \"NumFacturaAnterior\": \"102\",\n \"SignatureValueFacturaAnterior\": \"SignatureValueFacturaAnterior\",\n \"xml_tbai\": null,\n \"xml_signed\": \"XML firmado\",\n \"SignatureValue\": \"SignatureValue\",\n \"xml_tbai_response\": null,\n \"estado_tbai\": null,\n \"estado_registro_tbai\": \"No Registrado\",\n \"codigo_error_tbai\": null,\n \"descripcion_error_tbai\": null,\n \"envio_tbai_id\": null,\n \"NumSerieDispositivo\": null,\n \"ModeloLROE\": null,\n \"EpigrafeLROE\": null\n }\n ]\n }\n}"
}
headers = {
'Authorization': 'Bearer fV1EDbed53aga8Z466Pkchv',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (400):
{
"success": false,
"message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Envíos
Listado de envíos
requires authentication
Muestra un listado paginado de todos los envíos a Tbai.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/envios-tbai';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 51DVE63gZck6fvbaPade84h',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/envios-tbai"
);
const headers = {
"Authorization": "Bearer 51DVE63gZck6fvbaPade84h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/envios-tbai" \
--header "Authorization: Bearer 51DVE63gZck6fvbaPade84h" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-tbai'
headers = {
'Authorization': 'Bearer 51DVE63gZck6fvbaPade84h',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Envíos Tbai listed successfully",
"data": {
"items": [
{
"id": 1,
"IDEmisor": "12345678A",
"endpoint": "https://pruebas-ticketbai.araba.eus/TicketBAI/v1/facturas/",
"xml_envio": "</xml>",
"xml_respuesta": "</xml>",
"tbai_id": "TBAI-97192097P-090125-K+bigfSdRLk0n-140",
"estado_tbai": "Recibido",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"fecha_hora_envio": "2024-12-17 11:21:22",
"fecha_hora_respuesta": "2024-12-17 11:21:22",
"created_at": "2024-12-17T10:21:22.000000Z",
"updated_at": "2024-12-17T10:21:22.000000Z",
"deleted_at": null
},
],
"count": 1
},
"pagination": {
"total": 1,
"perPage": 1,
"currentPage": 1,
"lastPage": 1
}
}
Example response (401):
{
"success": false,
"message": "El IDEmisor no coincide con el de tu cuenta.",
"error": 401,
"code": 401
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un envío
requires authentication
Muestra un envío Tbai específico. Se filtra por el ID del envío.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/envios-tbai/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 6kbEdPe1f86ahagV4vZD35c',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/envios-tbai/1"
);
const headers = {
"Authorization": "Bearer 6kbEdPe1f86ahagV4vZD35c",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/envios-tbai/1" \
--header "Authorization: Bearer 6kbEdPe1f86ahagV4vZD35c" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-tbai/1'
headers = {
'Authorization': 'Bearer 6kbEdPe1f86ahagV4vZD35c',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Envío Tbai obtained successfully",
"data": {
"items": {
"id": 1,
"IDEmisor": "12345678A",
"endpoint": "https://pruebas-ticketbai.araba.eus/TicketBAI/v1/facturas/",
"xml_envio": "</xml>",
"xml_respuesta": "</xml>",
"tbai_id": "TBAI-97192097P-090125-K+bigfSdRLk0n-140",
"estado_tbai": "Recibido",
"codigo_error_tbai": null,
"descripcion_error_tbai": null,
"fecha_hora_envio": "2024-12-17 11:21:22",
"fecha_hora_respuesta": "2024-12-17 11:21:22",
"created_at": "2024-12-17T10:21:22.000000Z",
"updated_at": "2024-12-17T10:21:22.000000Z",
"deleted_at": null
}
}
}
Example response (404):
{
"success": false,
"message": "No se encontró el envío AEAT especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Software TBAI
Obtener software TBAI
requires authentication
Muestra el software TBAI de la provincia indicada. se indica como ultimo parametro de la url. Admite los siguientes valores: alava, araba, guipuzcoa, gipuzkoa, vizcaya, bizkaia.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/software-tbai/alava';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer f5vadVEb8cPDk36Zeah1g64',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/software-tbai/alava"
);
const headers = {
"Authorization": "Bearer f5vadVEb8cPDk36Zeah1g64",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/software-tbai/alava" \
--header "Authorization: Bearer f5vadVEb8cPDk36Zeah1g64" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/software-tbai/alava'
headers = {
'Authorization': 'Bearer f5vadVEb8cPDk36Zeah1g64',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Software TBAI obtenido correctamente",
"data": {
"CIF": "123456789",
"NombreRazon": "Nombre de la razón",
"NombreSoftware": "Nombre del software",
"Version": "1.0"
}
}
Example response (400):
{
"success": false,
"message": "Provincia TBAI no válida",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Webhook
Listar Webhooks
requires authentication
Muestra un listado con todos los webhooks generados en la API.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer gaPeD58hak4b1Zv36df6VEc',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/webhook"
);
const headers = {
"Authorization": "Bearer gaPeD58hak4b1Zv36df6VEc",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/webhook" \
--header "Authorization: Bearer gaPeD58hak4b1Zv36df6VEc" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/webhook'
headers = {
'Authorization': 'Bearer gaPeD58hak4b1Zv36df6VEc',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Webhooks listed successfully",
"data": {
"items": [
{
"id": 1,
"url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"is_active": true,
"retry_count": 0,
"last_triggered_at": null,
"headers": null,
"http_method": "POST",
"description": null,
"tag": "emisor_1",
"created_at": "2024-12-16T11:31:27.000000Z",
"updated_at": "2024-12-16T11:31:27.000000Z",
"deleted_at": null
}
],
"count": 1
},
"pagination": {
"total": 1,
"perPage": 10,
"currentPage": 1,
"lastPage": 1
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener los logs de un webhook
requires authentication
Obtiene los logs asociados a un webhook específico.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook/1/logs';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer 8fe4ga36EDadVZcPbv5k16h',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/webhook/1/logs"
);
const headers = {
"Authorization": "Bearer 8fe4ga36EDadVZcPbv5k16h",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/webhook/1/logs" \
--header "Authorization: Bearer 8fe4ga36EDadVZcPbv5k16h" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/webhook/1/logs'
headers = {
'Authorization': 'Bearer 8fe4ga36EDadVZcPbv5k16h',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Webhook logs listed successfully",
"data": {
"items": [
{
"id": 1,
"webhook_id": 1,
"url": "https://webhook.site/c500a769-9e2e-434c-bdeb-6333705404b6/{id}",
"invoice_id": 1,
"status": "success",
"response_body": null,
"http_status_code": 200,
"error_message": "",
"attempt_number": 1,
"next_retry_at": null,
"request_headers": [
"Authorization: Bearer m7&A,$'(6qYjg+BZ#su_3!"
],
"request_body": {
"estado": "Correcto",
"num_serie": "AZ50/55",
"factura_id": 1,
"codigo_error": "",
"descripcion_error": "",
"fecha_notificacion": "2025-05-16 12:20:46"
},
"response_headers": false,
"execution_time": "2706.142",
"created_at": "2025-05-16T10:20:46.000000Z",
"updated_at": "2025-05-16T10:21:12.000000Z"
}
],
"count": 1
},
"pagination": {
"total": 1,
"perPage": 10,
"currentPage": 1,
"lastPage": 1
}
}
Example response (404):
{
"success": false,
"message": "No se encontró el webhook especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obtener un Webhook
requires authentication
Muestra un webhook específico. Se filtra por el ID del webhook.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer e5DhV8ga3bPc6k4a1Z6dvEf',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/webhook/1"
);
const headers = {
"Authorization": "Bearer e5DhV8ga3bPc6k4a1Z6dvEf",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/webhook/1" \
--header "Authorization: Bearer e5DhV8ga3bPc6k4a1Z6dvEf" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/webhook/1'
headers = {
'Authorization': 'Bearer e5DhV8ga3bPc6k4a1Z6dvEf',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"code": 200,
"message": "Webhook obtained successfully",
"data": {
"items": {
"id": 1,
"url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"is_active": true,
"retry_count": 0,
"last_triggered_at": null,
"headers": null,
"http_method": "POST",
"description": null,
"tag": "emisor_1",
"created_at": "2024-12-16T11:31:27.000000Z",
"updated_at": "2024-12-16T11:31:27.000000Z",
"deleted_at": null
},
"count": 1
}
}
Example response (404):
{
"success": false,
"message": "No se encontró el webhook especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generar un webhook
requires authentication
Genera un nuevo webhook para ser utilizado en la API.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer b3ePaVDhE684afdv6g5Zc1k',
'Content-Type' => 'application/json',
],
'json' => {
"url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
"http_method": "POST",
"headers": {
"x-api-key": "test"
},
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"tag": "emisor_1",
"description": "Webhook para el emisor 1"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/webhook"
);
const headers = {
"Authorization": "Bearer b3ePaVDhE684afdv6g5Zc1k",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "https:\/\/webhook.site\/766f4435-f4f9-414b-b26f-47dbd10339ce\/{id}",
"http_method": "POST",
"headers": {
"x-api-key": "test"
},
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"tag": "emisor_1",
"description": "Webhook para el emisor 1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/webhook" \
--header "Authorization: Bearer b3ePaVDhE684afdv6g5Zc1k" \
--header "Content-Type: application/json" \
--data "{
\"url\": \"https:\\/\\/webhook.site\\/766f4435-f4f9-414b-b26f-47dbd10339ce\\/{id}\",
\"http_method\": \"POST\",
\"headers\": {
\"x-api-key\": \"test\"
},
\"secret_key\": \"m7&A,$\'(6qYjg+BZ#su_3!\",
\"tag\": \"emisor_1\",
\"description\": \"Webhook para el emisor 1\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/webhook'
payload = {
"url": "https:\/\/webhook.site\/766f4435-f4f9-414b-b26f-47dbd10339ce\/{id}",
"http_method": "POST",
"headers": {
"x-api-key": "test"
},
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"tag": "emisor_1",
"description": "Webhook para el emisor 1"
}
headers = {
'Authorization': 'Bearer b3ePaVDhE684afdv6g5Zc1k',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"success": true,
"message": "Webhook creado correctamente",
"code": 201,
"data": {
"count": 1,
"items": [
{
"id": 1,
"url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"is_active": null,
"retry_count": null,
"last_triggered_at": null,
"headers": {
"x-api-key": "test"
},
"http_method": "POST",
"description": null,
"tag": "emisor_1"
}
]
}
}
Example response (400):
{
"success": false,
"message": "Los campos url y secret_key son obligatorios.",
"error": 400,
"code": 400
}
Example response (400):
{
"success": false,
"message": "La URL del webhook es obligatoria.",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Actualizar un webhook
requires authentication
Actualiza los datos de un webhook existente.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer a4e6EPV6bfv3cda8h1Z5gkD',
'Content-Type' => 'application/json',
],
'json' => {
"url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
"http_method": "POST",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"tag": "emisor_2",
"description": "Webhook para el emisor 2"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/webhook/1"
);
const headers = {
"Authorization": "Bearer a4e6EPV6bfv3cda8h1Z5gkD",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"url": "https:\/\/webhook.site\/766f4435-f4f9-414b-b26f-47dbd10339ce\/{id}",
"http_method": "POST",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"tag": "emisor_2",
"description": "Webhook para el emisor 2"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request PUT \
"https://app.verifactuapi.es/api/webhook/1" \
--header "Authorization: Bearer a4e6EPV6bfv3cda8h1Z5gkD" \
--header "Content-Type: application/json" \
--data "{
\"url\": \"https:\\/\\/webhook.site\\/766f4435-f4f9-414b-b26f-47dbd10339ce\\/{id}\",
\"http_method\": \"POST\",
\"secret_key\": \"m7&A,$\'(6qYjg+BZ#su_3!\",
\"tag\": \"emisor_2\",
\"description\": \"Webhook para el emisor 2\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/webhook/1'
payload = {
"url": "https:\/\/webhook.site\/766f4435-f4f9-414b-b26f-47dbd10339ce\/{id}",
"http_method": "POST",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"tag": "emisor_2",
"description": "Webhook para el emisor 2"
}
headers = {
'Authorization': 'Bearer a4e6EPV6bfv3cda8h1Z5gkD',
'Content-Type': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Webhook updated successfully",
"code": 200,
"data": {
"count": 1,
"items": [
{
"id": 1,
"url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
"secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
"is_active": true,
"retry_count": 0,
"last_triggered_at": null,
"headers": null,
"http_method": "POST",
"description": null,
"tag": "emisor_2",
"created_at": "2024-12-16T11:31:27.000000Z",
"updated_at": "2024-12-16T11:31:27.000000Z",
"deleted_at": null
}
]
}
}
Example response (404):
{
"success": false,
"message": "No se encontró el webhook especificado.",
"error": 404,
"code": 404
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Consultas Externas
Verificar destinatarios
requires authentication
Endpoint antiguo, mantenido para compatibilidad. Ver documentación de censoAeat.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/destinatarios/validar';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer D6df5h1vcV38geEb64aPkZa',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/destinatarios/validar"
);
const headers = {
"Authorization": "Bearer D6df5h1vcV38geEb64aPkZa",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/destinatarios/validar" \
--header "Authorization: Bearer D6df5h1vcV38geEb64aPkZa" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/destinatarios/validar'
headers = {
'Authorization': 'Bearer D6df5h1vcV38geEb64aPkZa',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Censo AEAT
requires authentication
Verificar los datos de uno o varios destinatarios en el censo de AEAT para validar su existencia.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/censo-aeat';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer hfZ14P63dVvgbeD6aacEk85',
'Content-Type' => 'application/json',
],
'json' => {
"Destinatarios": [
{
"NIF": "39707287H",
"NombreRazon": "IVAN SOLE"
},
{
"NIF": "B70912613"
}
]
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/censo-aeat"
);
const headers = {
"Authorization": "Bearer hfZ14P63dVvgbeD6aacEk85",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"Destinatarios": [
{
"NIF": "39707287H",
"NombreRazon": "IVAN SOLE"
},
{
"NIF": "B70912613"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/censo-aeat" \
--header "Authorization: Bearer hfZ14P63dVvgbeD6aacEk85" \
--header "Content-Type: application/json" \
--data "{
\"Destinatarios\": [
{
\"NIF\": \"39707287H\",
\"NombreRazon\": \"IVAN SOLE\"
},
{
\"NIF\": \"B70912613\"
}
]
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/censo-aeat'
payload = {
"Destinatarios": [
{
"NIF": "39707287H",
"NombreRazon": "IVAN SOLE"
},
{
"NIF": "B70912613"
}
]
}
headers = {
'Authorization': 'Bearer hfZ14P63dVvgbeD6aacEk85',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Datos consultados correctamente",
"code": 200,
"data": [
{
"NIF": "39707287H",
"NombreRazon": "IVAN SOLE",
"NIF_response": "39707287H",
"NombreRazon_response": "SOLE MARTINEZ IVAN",
"status_response": "IDENTIFICADO"
},
{
"NIF": "B70912613",
"NombreRazon": null,
"NIF_response": "B70912613",
"NombreRazon_response": "INVOCASH SOLUTIONS SL",
"status_response": "IDENTIFICADO"
}
]
}
Example response (400):
{
"success": false,
"message": "La solicitud está vacía o contiene errores de formato.",
"code": 400,
"data": null
}
Example response (404):
{
"success": false,
"message": "Error de conexion con AEAT al consultar los datos, intente-lo mas tarde.",
"code": 404,
"data": null
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Utilidades
Server Status
Devuelve el estado del servidor. Si la petición llega aquí, el servidor está funcionando.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/status';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/status" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/status'
headers = {
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"success": true,
"status": "UP",
"message": "Server is running",
"code": 200
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
GET api/emisor/import/template
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/import/template';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer bZD5c3hEfVP64vea81dakg6',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/import/template"
);
const headers = {
"Authorization": "Bearer bZD5c3hEfVP64vea81dakg6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());curl --request GET \
--get "https://app.verifactuapi.es/api/emisor/import/template" \
--header "Authorization: Bearer bZD5c3hEfVP64vea81dakg6" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/import/template'
headers = {
'Authorization': 'Bearer bZD5c3hEfVP64vea81dakg6',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": "error",
"message": "Token inválido",
"code": 401
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/emisor/import
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/import';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer ZEk63caD5b8d1gP4ev6fVha',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/import"
);
const headers = {
"Authorization": "Bearer ZEk63caD5b8d1gP4ev6fVha",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/emisor/import" \
--header "Authorization: Bearer ZEk63caD5b8d1gP4ev6fVha" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/import'
headers = {
'Authorization': 'Bearer ZEk63caD5b8d1gP4ev6fVha',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Otorgamientos
Verifactu
Generar PDF otorgamiento
requires authentication
Genera el PDF de otorgamiento de un emisor Verifactu.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer dfEg66h3V1e54cvPaZkDba8',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"municipio": "Castellon",
"via_publica": "C/Principal",
"numero": "5",
"representante": []
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer dfEg66h3V1e54cvPaZkDba8",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"municipio": "Castellon",
"via_publica": "C\/Principal",
"numero": "5",
"representante": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento" \
--header "Authorization: Bearer dfEg66h3V1e54cvPaZkDba8" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"municipio\": \"Castellon\",
\"via_publica\": \"C\\/Principal\",
\"numero\": \"5\",
\"representante\": []
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"municipio": "Castellon",
"via_publica": "C\/Principal",
"numero": "5",
"representante": []
}
headers = {
'Authorization': 'Bearer dfEg66h3V1e54cvPaZkDba8',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento generado correctamente",
"code": 200,
"data": {
"nombre": "Empresa S.L.",
"nif": "B33912413",
"municipio": "Ascó",
"via_publica": "C/test",
"numero": "5",
"representante": {
"nombre": "Pedro Perez",
"nif": "12345678A",
"municipio": "Castellon",
"via_publica": "C/Principal",
"numero": "10"
},
"otorgamiento_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Importar el PDF de otorgamiento
requires authentication
Importa el PDF de otorgamiento de un emisor Verifactu y sus adjuntos.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer ZdD1ghV63Ebfaa5kveP8c64',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64",
"adjuntos_base64": [
"jpg en base 64",
"png en base 64"
]
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer ZdD1ghV63Ebfaa5kveP8c64",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64",
"adjuntos_base64": [
"jpg en base 64",
"png en base 64"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento" \
--header "Authorization: Bearer ZdD1ghV63Ebfaa5kveP8c64" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"otorgamiento_base64\": \"pdf en base 64\",
\"adjuntos_base64\": [
\"jpg en base 64\",
\"png en base 64\"
]
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64",
"adjuntos_base64": [
"jpg en base 64",
"png en base 64"
]
}
headers = {
'Authorization': 'Bearer ZdD1ghV63Ebfaa5kveP8c64',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento importado correctamente",
"code": 200,
"data": {
"nif": "B33912413",
"nombre": "Empresa S.L.",
"otorgamiento_importado_base64": "pdf en base 64",
"adjunto_importado_base64": "pdf adjunto en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Generar PDF otorgamiento (LEGACY)
requires authentication
Visitar la documentacion en la nueva ruta /otorgamientos/verifactu/generar-pdf-otorgamiento Este endpoint está obsoleto, se mantiene para compatibilidad con versiones anteriores.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer ED354e6bZhkagd8PV1afcv6',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer ED354e6bZhkagd8PV1afcv6",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/emisor/pdf-otorgamiento" \
--header "Authorization: Bearer ED354e6bZhkagd8PV1afcv6" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/pdf-otorgamiento'
headers = {
'Authorization': 'Bearer ED354e6bZhkagd8PV1afcv6',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Importar el PDF de otorgamiento (LEGACY)
requires authentication
Visitar la documentacion en la nueva ruta /otorgamientos/verifactu/importar-pdf-otorgamiento Este endpoint está obsoleto, se mantiene para compatibilidad con versiones anteriores.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer EvVbgdk65chaZfaD68e413P',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer EvVbgdk65chaZfaD68e413P",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento" \
--header "Authorization: Bearer EvVbgdk65chaZfaD68e413P" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento'
headers = {
'Authorization': 'Bearer EvVbgdk65chaZfaD68e413P',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Araba
Generar PDF otorgamiento
requires authentication
Genera el PDF de otorgamiento de un emisor TBAI de Araba.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer 865PV6eakd1Z3EvDh4fcbga',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"domicilio_fiscal": "C/Principal",
"municipio": "Castellon",
"provincia": "Tarragona",
"representante": []
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer 865PV6eakd1Z3EvDh4fcbga",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"domicilio_fiscal": "C\/Principal",
"municipio": "Castellon",
"provincia": "Tarragona",
"representante": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento" \
--header "Authorization: Bearer 865PV6eakd1Z3EvDh4fcbga" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"domicilio_fiscal\": \"C\\/Principal\",
\"municipio\": \"Castellon\",
\"provincia\": \"Tarragona\",
\"representante\": []
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"domicilio_fiscal": "C\/Principal",
"municipio": "Castellon",
"provincia": "Tarragona",
"representante": []
}
headers = {
'Authorization': 'Bearer 865PV6eakd1Z3EvDh4fcbga',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento generado correctamente",
"code": 200,
"data": {
"nombre": "Empresa S.L.",
"nif": "B33912413",
"domicilio_fiscal": "C/Principal",
"municipio": "Castellon",
"cp": "12345",
"provincia": "Tarragona",
"representante": {
"nombre": "Pedro Perez",
"nif": "12345678A"
},
"otorgamiento_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Importar el PDF de otorgamiento
requires authentication
Importa el PDF de otorgamiento de un emisor TBAI de Araba.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer PaV4vaDhfd3e58gZ61Ekb6c',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer PaV4vaDhfd3e58gZ61Ekb6c",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento" \
--header "Authorization: Bearer PaV4vaDhfd3e58gZ61Ekb6c" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"otorgamiento_base64\": \"pdf en base 64\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
}
headers = {
'Authorization': 'Bearer PaV4vaDhfd3e58gZ61Ekb6c',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento importado correctamente",
"code": 200,
"data": {
"nif": "B33912413",
"nombre": "Empresa S.L.",
"otorgamiento_importado_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bizkaia
Generar PDF otorgamiento
requires authentication
Genera el PDF de otorgamiento de un emisor TBAI de Bizkaia.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer vE8ehZba3Pkf5g6dV6a41Dc',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"domicilio_fiscal": "C/Principal",
"municipio": "Castellon",
"provincia": "Tarragona",
"representante": []
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer vE8ehZba3Pkf5g6dV6a41Dc",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"domicilio_fiscal": "C\/Principal",
"municipio": "Castellon",
"provincia": "Tarragona",
"representante": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento" \
--header "Authorization: Bearer vE8ehZba3Pkf5g6dV6a41Dc" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"domicilio_fiscal\": \"C\\/Principal\",
\"municipio\": \"Castellon\",
\"provincia\": \"Tarragona\",
\"representante\": []
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"domicilio_fiscal": "C\/Principal",
"municipio": "Castellon",
"provincia": "Tarragona",
"representante": []
}
headers = {
'Authorization': 'Bearer vE8ehZba3Pkf5g6dV6a41Dc',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento generado correctamente",
"code": 200,
"data": {
"nombre": "Empresa S.L.",
"nif": "B33912413",
"domicilio_fiscal": "C/Principal",
"municipio": "Castellon",
"cp": "12345",
"provincia": "Tarragona",
"representante": {
"nombre": "Pedro Perez",
"nif": "12345678A"
},
"otorgamiento_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Importar el PDF de otorgamiento
requires authentication
Importa el PDF de otorgamiento de un emisor TBAI de Bizkaia.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer V8k616dDf53Zb4vaEPgache',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer V8k616dDf53Zb4vaEPgache",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento" \
--header "Authorization: Bearer V8k616dDf53Zb4vaEPgache" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"otorgamiento_base64\": \"pdf en base 64\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
}
headers = {
'Authorization': 'Bearer V8k616dDf53Zb4vaEPgache',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento importado correctamente",
"code": 200,
"data": {
"nif": "B33912413",
"nombre": "Empresa S.L.",
"otorgamiento_importado_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gipuzkoa
Generar PDF otorgamiento
requires authentication
Genera el PDF de otorgamiento de un emisor TBAI de Gipuzkoa.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer PEgfda4v3hD156VaZ8cbk6e',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer PEgfda4v3hD156VaZ8cbk6e",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento" \
--header "Authorization: Bearer PEgfda4v3hD156VaZ8cbk6e" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1
}
headers = {
'Authorization': 'Bearer PEgfda4v3hD156VaZ8cbk6e',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento generado correctamente",
"code": 200,
"data": {
"otorgamiento_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Importar el PDF de otorgamiento
requires authentication
Importa el PDF de otorgamiento de un emisor TBAI de Gipuzkoa.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer vh6kgPbZD586c1f34eaaEVd',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
},
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer vh6kgPbZD586c1f34eaaEVd",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento" \
--header "Authorization: Bearer vh6kgPbZD586c1f34eaaEVd" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"id_emisor\": 1,
\"otorgamiento_base64\": \"pdf en base 64\"
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"id_emisor": 1,
"otorgamiento_base64": "pdf en base 64"
}
headers = {
'Authorization': 'Bearer vh6kgPbZD586c1f34eaaEVd',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"success": true,
"message": "Otorgamiento importado correctamente",
"code": 200,
"data": {
"nif": "B33912413",
"nombre": "Empresa S.L.",
"otorgamiento_importado_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
"error": 400,
"code": 400
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.