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 6EdZvha8Vg43D5c61akfbPe',
'Content-Type' => 'application/json',
],
'query' => [
'nif' => 'P1716358E',
'nombre' => 'Nombre del emisor',
'type' => 'verifactu',
'id_zona_tbai' => '1',
'id_emisor_autofactura' => '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",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer 6EdZvha8Vg43D5c61akfbPe",
"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" \
--header "Authorization: Bearer 6EdZvha8Vg43D5c61akfbPe" \
--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',
}
headers = {
'Authorization': 'Bearer 6EdZvha8Vg43D5c61akfbPe',
'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 hbeDPk5aZEf416386vagVcd',
'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 hbeDPk5aZEf416386vagVcd",
"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 hbeDPk5aZEf416386vagVcd" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1'
headers = {
'Authorization': 'Bearer hbeDPk5aZEf416386vagVcd',
'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": "NEMON INVOICE TO CASH, 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 Pbad16kVZ3E4egah58vDfc6',
'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 Pbad16kVZ3E4egah58vDfc6",
"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 Pbad16kVZ3E4egah58vDfc6" \
--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 Pbad16kVZ3E4egah58vDfc6',
'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 EDdeahv1gf5P6kcabZ68V43',
'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 EDdeahv1gf5P6kcabZ68V43",
"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 EDdeahv1gf5P6kcabZ68V43" \
--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 EDdeahv1gf5P6kcabZ68V43',
'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": 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 kD16hZ6d3fcPavb4ga58eEV',
'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 kD16hZ6d3fcPavb4ga58eEV",
"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 kD16hZ6d3fcPavb4ga58eEV" \
--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 kD16hZ6d3fcPavb4ga58eEV',
'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
Endpoints para generar el otorgamiento, importar-lo y pasar un emisor 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 bagcVD4fZEda5kv3P616e8h',
'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 bagcVD4fZEda5kv3P616e8h",
"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 bagcVD4fZEda5kv3P616e8h" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/produccion/1'
headers = {
'Authorization': 'Bearer bagcVD4fZEda5kv3P616e8h',
'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.
Generar PDF otorgamiento
requires authentication
Generar el PDF de otorgamiento de un emisor
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer aD6c6a35dkhPe1EbvZVfg84',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"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/emisor/pdf-otorgamiento"
);
const headers = {
"Authorization": "Bearer aD6c6a35dkhPe1EbvZVfg84",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"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/emisor/pdf-otorgamiento" \
--header "Authorization: Bearer aD6c6a35dkhPe1EbvZVfg84" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"municipio\": \"Castellon\",
\"via_publica\": \"C\\/Principal\",
\"numero\": \"5\",
\"representante\": []
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/pdf-otorgamiento'
payload = {
"nif": "A39200019",
"municipio": "Castellon",
"via_publica": "C\/Principal",
"numero": "5",
"representante": []
}
headers = {
'Authorization': 'Bearer aD6c6a35dkhPe1EbvZVfg84',
'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": "Lluis Martinez Borrell",
"nif": "47859447N",
"municipio": "Ascó",
"via_publica": "C/test",
"numero": "5",
"representante": null,
"otorgamiento_base64": "pdf en base 64"
}
Example response (400):
{
"success": false,
"message": "El NIF es obligatorio.",
"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
Importar el PDF de otorgamiento de un emisor y sus adjuntos
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer 83VhaZ1fDdc6aP64eg5vbEk',
'Content-Type' => 'application/json',
],
'json' => {
"nif": "A39200019",
"otorgamiento_base64": "pdf en base 64",
"adjuntos_base64": null
},
]
);
$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 83VhaZ1fDdc6aP64eg5vbEk",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nif": "A39200019",
"otorgamiento_base64": "pdf en base 64",
"adjuntos_base64": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());curl --request POST \
"https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento" \
--header "Authorization: Bearer 83VhaZ1fDdc6aP64eg5vbEk" \
--header "Content-Type: application/json" \
--data "{
\"nif\": \"A39200019\",
\"otorgamiento_base64\": \"pdf en base 64\",
\"adjuntos_base64\": null
}"
import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento'
payload = {
"nif": "A39200019",
"otorgamiento_base64": "pdf en base 64",
"adjuntos_base64": null
}
headers = {
'Authorization': 'Bearer 83VhaZ1fDdc6aP64eg5vbEk',
'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": "47859447N",
"nombre": "Lluis Martinez",
"otorgamiento_importado_base64": "pdf en base 64"
}
}
Example response (400):
{
"success": false,
"message": "El otorgamiento_base64 es obligatorio.",
"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 badac1P3fkv685hZV6eED4g',
'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 badac1P3fkv685hZV6eED4g",
"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 badac1P3fkv685hZV6eED4g" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1/api-key'
headers = {
'Authorization': 'Bearer badac1P3fkv685hZV6eED4g',
'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 6a3dZE5c6Pf1ahgv8D4Vebk',
'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 6a3dZE5c6Pf1ahgv8D4Vebk",
"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 6a3dZE5c6Pf1ahgv8D4Vebk" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/emisor/1/credentials'
headers = {
'Authorization': 'Bearer 6a3dZE5c6Pf1ahgv8D4Vebk',
'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 eaEg4a5V3b6h8ZP1df6Dvkc',
'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 eaEg4a5V3b6h8ZP1df6Dvkc",
"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 eaEg4a5V3b6h8ZP1df6Dvkc" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas'
headers = {
'Authorization': 'Bearer eaEg4a5V3b6h8ZP1df6Dvkc',
'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 3d5Eaf4ca6vb8ZgV1k6DehP',
'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 3d5Eaf4ca6vb8ZgV1k6DehP",
"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 3d5Eaf4ca6vb8ZgV1k6DehP" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas/l1'
headers = {
'Authorization': 'Bearer 3d5Eaf4ca6vb8ZgV1k6DehP',
'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 8Vd3156caE6f4kgaZPbevDh',
'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 8Vd3156caE6f4kgaZPbevDh",
"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 8Vd3156caE6f4kgaZPbevDh" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas/l1/01'
headers = {
'Authorization': 'Bearer 8Vd3156caE6f4kgaZPbevDh',
'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 f66Ve84aZbhvEd1g3PaDc5k',
'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 f66Ve84aZbhvEd1g3PaDc5k",
"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 f66Ve84aZbhvEd1g3PaDc5k" \
--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 f66Ve84aZbhvEd1g3PaDc5k',
'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 DevPf1ZEh6V84dbc3k65aag',
'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 DevPf1ZEh6V84dbc3k65aag",
"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 DevPf1ZEh6V84dbc3k65aag" \
--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 DevPf1ZEh6V84dbc3k65aag',
'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 a35hvPV8D66dcfaEebk14Zg',
'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 a35hvPV8D66dcfaEebk14Zg",
"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 a35hvPV8D66dcfaEebk14Zg" \
--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 a35hvPV8D66dcfaEebk14Zg',
'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 DgaVvEZh64Pbf6ac3k81e5d',
'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 DgaVvEZh64Pbf6ac3k81e5d",
"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 DgaVvEZh64Pbf6ac3k81e5d" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/anulacion-registro-facturacion/1'
headers = {
'Authorization': 'Bearer DgaVvEZh64Pbf6ac3k81e5d',
'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 v66kaf4dhg53aeZPV18EcDb',
'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-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",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer v66kaf4dhg53aeZPV18EcDb",
"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" \
--header "Authorization: Bearer v66kaf4dhg53aeZPV18EcDb" \
--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',
}
headers = {
'Authorization': 'Bearer v66kaf4dhg53aeZPV18EcDb',
'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 fhgZ53kE6vc4d8aPa6bDe1V',
'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 fhgZ53kE6vc4d8aPa6bDe1V",
"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 fhgZ53kE6vc4d8aPa6bDe1V" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/1'
headers = {
'Authorization': 'Bearer fhgZ53kE6vc4d8aPa6bDe1V',
'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 aZfVED8vb5Pdke1ch4663ag',
'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 aZfVED8vb5Pdke1ch4663ag",
"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 aZfVED8vb5Pdke1ch4663ag" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat'
headers = {
'Authorization': 'Bearer aZfVED8vb5Pdke1ch4663ag',
'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 PehgZ145a36cV8DvdabEf6k',
'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 PehgZ145a36cV8DvdabEf6k",
"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 PehgZ145a36cV8DvdabEf6k" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat/1'
headers = {
'Authorization': 'Bearer PehgZ145a36cV8DvdabEf6k',
'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 Zva6e1V5a6kgb8df3PE4Dhc',
'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 Zva6e1V5a6kgb8df3PE4Dhc",
"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 Zva6e1V5a6kgb8df3PE4Dhc" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-aeat/linea/1'
headers = {
'Authorization': 'Bearer Zva6e1V5a6kgb8df3PE4Dhc',
'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.
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 fV6d4cD1g38ak5hvZb6EePa',
'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 fV6d4cD1g38ak5hvZb6EePa",
"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 fV6d4cD1g38ak5hvZb6EePa" \
--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 fV6d4cD1g38ak5hvZb6EePa',
'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 Va46k6813fdhvb5aZDcPegE',
'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 Va46k6813fdhvb5aZDcPegE",
"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 Va46k6813fdhvb5aZDcPegE" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/sistema-informatico/1'
headers = {
'Authorization': 'Bearer Va46k6813fdhvb5aZDcPegE',
'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": "NEMON INVOICE TO CASH, 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 kDebahdZ5g34V6v8af6PEc1',
'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 kDebahdZ5g34V6v8af6PEc1",
"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 kDebahdZ5g34V6v8af6PEc1" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas-tbai'
headers = {
'Authorization': 'Bearer kDebahdZ5g34V6v8af6PEc1',
'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 3fP8b66kZ14Dhe5dVcgvEaa',
'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 3fP8b66kZ14Dhe5dVcgvEaa",
"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 3fP8b66kZ14Dhe5dVcgvEaa" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas-tbai/l0'
headers = {
'Authorization': 'Bearer 3fP8b66kZ14Dhe5dVcgvEaa',
'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 fE8Z66bdagvV5De14hkPc3a',
'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 fE8Z66bdagvV5De14hkPc3a",
"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 fE8Z66bdagvV5De14hkPc3a" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/listas-tbai/l0/1.2'
headers = {
'Authorization': 'Bearer fE8Z66bdagvV5De14hkPc3a',
'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 dEPf5ga1bZcDh6eVa8643kv',
'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 dEPf5ga1bZcDh6eVa8643kv",
"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 dEPf5ga1bZcDh6eVa8643kv" \
--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 dEPf5ga1bZcDh6eVa8643kv',
'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,
"EmitidaPorTercODest": 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 k5baD1faVE6Ph4vd83Zc6eg',
'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 k5baD1faVE6Ph4vd83Zc6eg",
"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 k5baD1faVE6Ph4vd83Zc6eg" \
--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 k5baD1faVE6Ph4vd83Zc6eg',
'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 15vhZf6c4PVaegadk6DbE38',
'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 \"EmitidaPorTercODest\": 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 15vhZf6c4PVaegadk6DbE38",
"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 \"EmitidaPorTercODest\": 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 15vhZf6c4PVaegadk6DbE38" \
--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 \\\"EmitidaPorTercODest\\\": 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 \"EmitidaPorTercODest\": 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 15vhZf6c4PVaegadk6DbE38',
'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 gfad6Zacek85D1EPb63h4Vv',
'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 gfad6Zacek85D1EPb63h4Vv",
"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 gfad6Zacek85D1EPb63h4Vv" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai/1'
headers = {
'Authorization': 'Bearer gfad6Zacek85D1EPb63h4Vv',
'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,
"EmitidaPorTercODest": 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 DZ8f4vka1ePhaVg366dcEb5',
'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 DZ8f4vka1ePhaVg366dcEb5",
"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 DZ8f4vka1ePhaVg366dcEb5" \
--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 DZ8f4vka1ePhaVg366dcEb5',
'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,
"EmitidaPorTercODest": 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 f4E835vaZb61keDhdgPV6ac',
'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 f4E835vaZb61keDhdgPV6ac",
"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 f4E835vaZb61keDhdgPV6ac" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/alta-registro-tbai/1'
headers = {
'Authorization': 'Bearer f4E835vaZb61keDhdgPV6ac',
'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,
"EmitidaPorTercODest": 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 3haDE4cdV66fP1kgZabve85',
'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 3haDE4cdV66fP1kgZabve85",
"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 3haDE4cdV66fP1kgZabve85" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/tbai/QR/1'
headers = {
'Authorization': 'Bearer 3haDE4cdV66fP1kgZabve85',
'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/perspiciatis';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer vhZabVga5c1f4EePk63D8d6',
'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/perspiciatis"
);
const headers = {
"Authorization": "Bearer vhZabVga5c1f4EePk63D8d6",
"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/perspiciatis" \
--header "Authorization: Bearer vhZabVga5c1f4EePk63D8d6" \
--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/perspiciatis'
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 vhZabVga5c1f4EePk63D8d6',
'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,
"EmitidaPorTercODest": 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/rerum';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer b8hZacP4V61dvfEegaD56k3',
'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 \"EmitidaPorTercODest\": 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/rerum"
);
const headers = {
"Authorization": "Bearer b8hZacP4V61dvfEegaD56k3",
"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 \"EmitidaPorTercODest\": 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/rerum" \
--header "Authorization: Bearer b8hZacP4V61dvfEegaD56k3" \
--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 \\\"EmitidaPorTercODest\\\": 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/rerum'
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 \"EmitidaPorTercODest\": 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 b8hZacP4V61dvfEegaD56k3',
'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 3kVPg81E5bD66cdav4hZefa',
'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 3kVPg81E5bD66cdav4hZefa",
"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 3kVPg81E5bD66cdav4hZefa" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-tbai'
headers = {
'Authorization': 'Bearer 3kVPg81E5bD66cdav4hZefa',
'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 86eP1khD6ZVaab5Edvgc3f4',
'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 86eP1khD6ZVaab5Edvgc3f4",
"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 86eP1khD6ZVaab5Edvgc3f4" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/envios-tbai/1'
headers = {
'Authorization': 'Bearer 86eP1khD6ZVaab5Edvgc3f4',
'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 cdfkaDe5b1PVZgE864v6a3h',
'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 cdfkaDe5b1PVZgE864v6a3h",
"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 cdfkaDe5b1PVZgE864v6a3h" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/software-tbai/alava'
headers = {
'Authorization': 'Bearer cdfkaDe5b1PVZgE864v6a3h',
'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 aac14hbv5kV8f66d3DPgeZE',
'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 aac14hbv5kV8f66d3DPgeZE",
"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 aac14hbv5kV8f66d3DPgeZE" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/webhook'
headers = {
'Authorization': 'Bearer aac14hbv5kV8f66d3DPgeZE',
'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 ZPDa64k56av3hcVgfd1eE8b',
'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 ZPDa64k56av3hcVgfd1eE8b",
"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 ZPDa64k56av3hcVgfd1eE8b" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/webhook/1/logs'
headers = {
'Authorization': 'Bearer ZPDa64k56av3hcVgfd1eE8b',
'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 D5816Pa43ZkV6dvgfchEaeb',
'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 D5816Pa43ZkV6dvgfchEaeb",
"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 D5816Pa43ZkV6dvgfchEaeb" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/webhook/1'
headers = {
'Authorization': 'Bearer D5816Pa43ZkV6dvgfchEaeb',
'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 dEa3f6c8agP64Z1hbkDVve5',
'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 dEa3f6c8agP64Z1hbkDVve5",
"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 dEa3f6c8agP64Z1hbkDVve5" \
--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 dEa3f6c8agP64Z1hbkDVve5',
'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 Dkfbega84hZad3vV6cPE561',
'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 Dkfbega84hZad3vV6cPE561",
"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 Dkfbega84hZad3vV6cPE561" \
--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 Dkfbega84hZad3vV6cPE561',
'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 Z6fbE5ga6P8V1cd4aD3vkhe',
'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 Z6fbE5ga6P8V1cd4aD3vkhe",
"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 Z6fbE5ga6P8V1cd4aD3vkhe" \
--header "Content-Type: application/json"import requests
import json
url = 'https://app.verifactuapi.es/api/destinatarios/validar'
headers = {
'Authorization': 'Bearer Z6fbE5ga6P8V1cd4aD3vkhe',
'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 hZbea4fk3gca56EP86VDdv1',
'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 hZbea4fk3gca56EP86VDdv1",
"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 hZbea4fk3gca56EP86VDdv1" \
--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 hZbea4fk3gca56EP86VDdv1',
'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": "NEMON INVOICE TO CASH",
"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.