MENU navbar-image

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:

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
}
 

Request   

POST api/login

Headers

Content-Type      

Example: application/json

Body Parameters

email   string   

El email del usuario. Example: ejemplo@verifatuAPI.com

password   string   

La contraseña del usuario. Example: 123456789

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
}
 

Request   

POST api/loginEmisor

Headers

Content-Type      

Example: application/json

Body Parameters

username   string   

El nombre de usuario del emisor. Example: aa.aaaaaaaaa

api_key   string   

APIKey unica del emisor. Example: 5d4f3d3bb1284e7cb3f5b7e7881d55d22ef5c1b35d693e6e4b9e5d2293ff1c16

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 PZdhg831a5V4bv6cDE6eafk',
            'Content-Type' => 'application/json',
        ],
        'query' => [
            'nif' => 'P1716358E',
            'nombre' => 'Nombre del emisor',
            'type' => 'verifactu',
            'id_zona_tbai' => '1',
            'enviar_aeat' => '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",
    "enviar_aeat": "1",
    "id_emisor_autofactura": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer PZdhg831a5V4bv6cDE6eafk",
    "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&enviar_aeat=1&id_emisor_autofactura=1" \
    --header "Authorization: Bearer PZdhg831a5V4bv6cDE6eafk" \
    --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',
  'enviar_aeat': '1',
  'id_emisor_autofactura': '1',
}
headers = {
  'Authorization': 'Bearer PZdhg831a5V4bv6cDE6eafk',
  '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
 }
}
 

Request   

GET api/emisor

Headers

Authorization      

Example: Bearer PZdhg831a5V4bv6cDE6eafk

Content-Type      

Example: application/json

Query Parameters

nif   string  optional  

El nif del emisor. Example: P1716358E

nombre   string  optional  

El nombre del emisor. Example: Nombre del emisor

type   string  optional  

El tipo de emisor(verifactu/tbai). Example: verifactu

id_zona_tbai   integer  optional  

El id de la zona de TBAI(1(Álava), 2(Gipuzkoa), 3(Bizkaia), 4(Todos)). Example: 1

enviar_aeat   boolean  optional  

El indicador de si el emisor envía AEAT(true(verifactu)/false(no verifactu)). Example: true

id_emisor_autofactura   integer  optional  

El id del emisor que genera la autofactura. Example: 1

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 cD4aP3bdZh6g86vVeaE51fk',
            '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 cD4aP3bdZh6g86vVeaE51fk",
    "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 cD4aP3bdZh6g86vVeaE51fk" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/1'
headers = {
  'Authorization': 'Bearer cD4aP3bdZh6g86vVeaE51fk',
  '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
}
 

Request   

GET api/emisor/{id}

Headers

Authorization      

Example: Bearer cD4aP3bdZh6g86vVeaE51fk

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor que se desea obtener. Example: 1

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 Zg5adakVD6E81bfhve3P4c6',
            '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 Zg5adakVD6E81bfhve3P4c6",
    "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 Zg5adakVD6E81bfhve3P4c6" \
    --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 Zg5adakVD6E81bfhve3P4c6',
  '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
}
 

Request   

PATCH api/emisor/{id}/enabled

Headers

Authorization      

Example: Bearer Zg5adakVD6E81bfhve3P4c6

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor que se desea habilitar/deshabilitar. Example: 1

Body Parameters

enabled   boolean   

El estado del emisor. Example: true

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 fk165ZVh3EbPDg8cva46dea',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "P1716358E",
    "nombre": "Nombre del emisor",
    "cp": "43791",
    "default_webhook_id": 1,
    "enviar_aeat": true
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/emisor"
);

const headers = {
    "Authorization": "Bearer fk165ZVh3EbPDg8cva46dea",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "nif": "P1716358E",
    "nombre": "Nombre del emisor",
    "cp": "43791",
    "default_webhook_id": 1,
    "enviar_aeat": true
};

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 fk165ZVh3EbPDg8cva46dea" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"P1716358E\",
    \"nombre\": \"Nombre del emisor\",
    \"cp\": \"43791\",
    \"default_webhook_id\": 1,
    \"enviar_aeat\": true
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor'
payload = {
    "nif": "P1716358E",
    "nombre": "Nombre del emisor",
    "cp": "43791",
    "default_webhook_id": 1,
    "enviar_aeat": true
}
headers = {
  'Authorization': 'Bearer fk165ZVh3EbPDg8cva46dea',
  '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
}
 

Request   

POST api/emisor

Headers

Authorization      

Example: Bearer fk165ZVh3EbPDg8cva46dea

Content-Type      

Example: application/json

Body Parameters

nif   string   

El NIF/CIF del emisor. Example: P1716358E

nombre   string   

El nombre del emisor. Example: Nombre del emisor

cp   string   

El Codigo Postal del emisor. Example: 43791

representante_razon_social   string  optional  

El nombre de la razón social del representante del emisor.

representante_nif   string  optional  

El NIF/CIF del representante del emisor.

default_webhook_id   integer  optional  

El ID del webhook por defecto. Example: 1

enviar_aeat   boolean  optional  

El indicador de si el emisor envía AEAT(true(verifactu)/false(no verifactu)). Default: true. Example: true

emisor_autofactura   string  optional  

El NIF/CIF del emisor que genera la autofactura.

Actualizar un emisor

requires authentication

Permite actualizar el nombre y el cp de un emisor

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 6Vf4P5vhaZabkDed6Ecg381',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nombre": "Nombre del emisor",
    "cp": "12345"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/emisor/1"
);

const headers = {
    "Authorization": "Bearer 6Vf4P5vhaZabkDed6Ecg381",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "nombre": "Nombre del emisor",
    "cp": "12345"
};

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 6Vf4P5vhaZabkDed6Ecg381" \
    --header "Content-Type: application/json" \
    --data "{
    \"nombre\": \"Nombre del emisor\",
    \"cp\": \"12345\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/1'
payload = {
    "nombre": "Nombre del emisor",
    "cp": "12345"
}
headers = {
  'Authorization': 'Bearer 6Vf4P5vhaZabkDed6Ecg381',
  '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": "Solo se permiten actualizar los campos nombre y cp. Campos no permitidos: nif",
 "error": 400,
 "code": 400
 

Request   

PUT api/emisor/{id}

Headers

Authorization      

Example: Bearer 6Vf4P5vhaZabkDed6Ecg381

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor que se desea actualizar. Example: 1

Body Parameters

nombre   string  optional  

El nombre del emisor. Example: Nombre del emisor

cp   string  optional  

El cp del emisor. Example: 12345

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 bdkZ8eacDPvhg14656fEVa3',
            '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 bdkZ8eacDPvhg14656fEVa3",
    "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 bdkZ8eacDPvhg14656fEVa3" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/1/api-key'
headers = {
  'Authorization': 'Bearer bdkZ8eacDPvhg14656fEVa3',
  '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
}
 

Request   

GET api/emisor/{id}/api-key

Headers

Authorization      

Example: Bearer bdkZ8eacDPvhg14656fEVa3

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor que se desea generar el Api Key. Example: 1

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 EP56DckZ18agdbf4ha3veV6',
            '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 EP56DckZ18agdbf4ha3veV6",
    "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 EP56DckZ18agdbf4ha3veV6" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/1/credentials'
headers = {
  'Authorization': 'Bearer EP56DckZ18agdbf4ha3veV6',
  '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
}
 

Request   

GET api/emisor/{id}/credentials

Headers

Authorization      

Example: Bearer EP56DckZ18agdbf4ha3veV6

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor que se desea generar las credenciales. Example: 1

Pasar a produccion

Endpoints para generar el otorgamiento, importar-lo y pasar un emisor a produccion.

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 PvadVegc58hZD46Ea3b1kf6',
            '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 PvadVegc58hZD46Ea3b1kf6",
    "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 PvadVegc58hZD46Ea3b1kf6" \
    --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 PvadVegc58hZD46Ea3b1kf6',
  '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
}
 

Request   

POST api/emisor/pdf-otorgamiento

Headers

Authorization      

Example: Bearer PvadVegc58hZD46Ea3b1kf6

Content-Type      

Example: application/json

Body Parameters

nif   string   

El NIF del emisor. Example: A39200019

municipio   string   

El municipio del emisor. Example: Castellon

via_publica   string   

La via publica del emisor. Example: C/Principal

numero   string   

El numero de la via publica del emisor. Example: 5

representante   object  optional  

Objeto con los datos del representante del emisor

nombre   string  optional  

El nombre del representante del emisor.

nif   string  optional  

El NIF del representante del emisor.

municipio   string  optional  

El municipio del representante del emisor.

via_publica   string  optional  

La via publica del representante del emisor.

numero   string  optional  

El numero de la via publica del representante del emisor.

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 k3aag6cvE58DhdVef14Z6Pb',
            '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 k3aag6cvE58DhdVef14Z6Pb",
    "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 k3aag6cvE58DhdVef14Z6Pb" \
    --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 k3aag6cvE58DhdVef14Z6Pb',
  '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
}
 

Request   

POST api/emisor/importar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer k3aag6cvE58DhdVef14Z6Pb

Content-Type      

Example: application/json

Body Parameters

nif   string   

El NIF del emisor. Example: A39200019

otorgamiento_base64   string   

El otorgamiento firmado en base 64. Example: pdf en base 64

adjuntos_base64   string[]   

Los adjuntos en base 64. Puede ser un array de 1 o 2 elementos. Formatos soportados: pdf, png, jpg, jpeg.

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 Ek8P63afV4dDvebah1g65Zc',
            '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 Ek8P63afV4dDvebah1g65Zc",
    "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 Ek8P63afV4dDvebah1g65Zc" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/produccion/1'
headers = {
  'Authorization': 'Bearer Ek8P63afV4dDvebah1g65Zc',
  '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
}
 

Request   

PATCH api/emisor/produccion/{id}

Headers

Authorization      

Example: Bearer Ek8P63afV4dDvebah1g65Zc

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor. Example: 1

Destinatarios

Verificar destinatarios

requires authentication

Verificar los destinatarios en los servidores de AEAT.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/destinatarios/validar';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer E6Zg8f3aka145hvdDVPc6eb',
            '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/destinatarios/validar"
);

const headers = {
    "Authorization": "Bearer E6Zg8f3aka145hvdDVPc6eb",
    "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/destinatarios/validar" \
    --header "Authorization: Bearer E6Zg8f3aka145hvdDVPc6eb" \
    --header "Content-Type: application/json" \
    --data "{
    \"Destinatarios\": [
        {
            \"NIF\": \"39707287H\",
            \"NombreRazon\": \"IVAN SOLE\"
        },
        {
            \"NIF\": \"B70912613\"
        }
    ]
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/destinatarios/validar'
payload = {
    "Destinatarios": [
        {
            "NIF": "39707287H",
            "NombreRazon": "IVAN SOLE"
        },
        {
            "NIF": "B70912613"
        }
    ]
}
headers = {
  'Authorization': 'Bearer E6Zg8f3aka145hvdDVPc6eb',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "success": true,
    "message": "Validacion de destinatarios",
    "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 destinatarios, intente-lo mas tarde.",
    "code": 404,
    "data": null
}
 

Request   

POST api/destinatarios/validar

Headers

Authorization      

Example: Bearer E6Zg8f3aka145hvdDVPc6eb

Content-Type      

Example: application/json

Body Parameters

Destinatarios   string[]   

El array de destinatarios a verificar.

*   object  optional  
NIF   string   

El NIF del destinatario. Example: pariatur

NombreRazon   string  optional  

optional El nombre del destinatario. Example: qui

Registros

Verifactu

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 8hgd14cfek56a6bEPavZV3D',
            '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 8hgd14cfek56a6bEPavZV3D",
    "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 8hgd14cfek56a6bEPavZV3D" \
    --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 8hgd14cfek56a6bEPavZV3D',
  '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": "A39200019",
             "NumSerieFactura": "JFER-111",
             "NumSerie": null,
             "NumFactura": null,
             "FechaExpedicionFactura": "2025-06-07",
             "HoraExpedicionFactura": null,
             "FechaOperacion": null,
             "DescripcionOperacion": "FACTURA",
             "NombreRazonDestinatario": "Javier Aguilera Collar",
             "NIFDestinatario": "50748484L",
             "RefExterna": null,
             "CuotaTotal": 5.5,
             "ImporteTotal": 77.5,
             "moneda": "EUR",
             "BaseRectificada": null,
             "CuotaRectificada": null,
             "CuotaRecargoRectificada": null,
             "tag": null,
             "webhook_id": null,
             "webhook_log_id": null,
             "verifactu": true,
             "no_verifactu": false,
             "tbai": false,
             "face": 0,
             "json": "{\"IDEmisorFactura\":\"A39200019\",\"NumSerieFactura\":\"JFER-111\",\"FechaExpedicionFactura\":\"2025-06-07\",\"NombreRazonEmisor\":\"Empresa TEST\",\"RefExterna\":null,\"TipoFactura\":1,\"DescripcionOperacion\":\"FACTURA\",\"Destinatarios\":[{\"NombreRazon\":\"Javier Aguilera Collar\",\"NIF\":\"50748484L\"}],\"Desglose\":[{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":2.1,\"TipoImpositivo\":\"21.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":10,\"PrecioUnitario\":10,\"Cantidad\":1,\"Importe\":\"10.00\"},{\"Impuesto\":1,\"ClaveRegimen\":1,\"OperacionExenta\":1,\"BaseImponibleOImporteNoSujeto\":10,\"PrecioUnitario\":10,\"Cantidad\":1},{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":2.2,\"TipoImpositivo\":\"10.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":22,\"PrecioUnitario\":22,\"Cantidad\":1,\"Importe\":\"22.00\"},{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":1.2,\"TipoImpositivo\":\"4.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":30,\"PrecioUnitario\":30,\"Cantidad\":1,\"Importe\":\"30.00\"}],\"CuotaTotal\":\"5.50\",\"ImporteTotal\":\"77.50\",\"type\":\"verifactu\",\"software_tbai_id\":null,\"id_zona_tbai\":null,\"no_verifactu\":false,\"Subsanacion\":2,\"RechazoPrevio\":1,\"FacturaSimplificada7273\":2,\"Art61d\":2,\"Macrodato\":2,\"Cupon\":2,\"verifactu\":true}",
             "base64_pdf": null,
             "base64_qr_pdf": null,
             "url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=JFER-111&fecha=07-06-2025&importe=77.5",
             "qr_image": "base64 qr",
             "qr_x": null,
             "qr_y": null,
             "qr_page": 1,
             "remitenteNacional": 1,
             "next_id": 2,
             "IDVersion": 1,
             "Subsanacion": 2,
             "RechazoPrevio": 1,
             "TipoFactura": 1,
             "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": nul,
             "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": nul,
             "codigo_error_aeat": nul,
             "descripcion_error_aeat": nul,
             "envios_aeat_id": nul,
             "envios_aeat_lineas_id": nul
         }
     ]
 }
 

Example response (400):


{
    "success": false,
    "message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/alta-registro-facturacion

Headers

Authorization      

Example: Bearer 8hgd14cfek56a6bEPavZV3D

Content-Type      

Example: application/json

Body Parameters

IDEmisorFactura   string   

El NIF del emisor. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-1-1

RefExterna   string  optional  

optional Referencia externa de la factura. Example: Test Ref Externa

Subsanacion   string  optional  

optional Indica si se trata de una subsanación (lista l4).

RechazoPrevio   string  optional  

optional Indica si se trata de una re-emision de subsanacion tras un rechazo (lista l17).

TipoFactura   string   

Tipo de factura (lista_l2). Example: F1

TipoRectificativa   string  optional  

optional Indica el tipo de rectificativa (lista l3).

FechaOperacion   string  optional  

optional Fecha de la operación.

DescripcionOperacion   string   

Descripción de la operación. Example: test

FacturaSimplificadaArt7273   string  optional  

optional Factura simplificada Articulo 7.2 Y 7.3 RD 1619/2012 (lista l4).

FacturaSinIdentifDestinatarioArt61d   string  optional  

optional Factura sin identificación destinatario artículo 6.1.d) RD 1619/2012 (lista l5).

EmitidaPorTercODesti   string   

Indica si se trata de una factura emitida por tercero o destinatario (lista l6).

Tercero   Object  optional  

optional Tercero que emite la factura.

NombreRazon   string   

Nombre o razón social del tercero. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del tercero. Example: "39707287H"

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

Destinatarios   string[]   

Lista de destinatarios de la factura.

*   object  optional  
NombreRazon   string   

Nombre o razón social del destinatario. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del destinatario. Example: "39707287H"

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

Cupon   string  optional  

optional Indica si se trata de una factura con minoracion de la base imponible (lista l4).

Desglose   string[]   

Lista de desgloses de la factura.

*   object  optional  
Impuesto   string  optional  

optional Código del impuesto (lista l1). Example: 01

ClaveRegimen   integer  optional  

optional Clave del régimen especial (lista l8a/l8b). Example: 1

CalificacionOperacion   integer  optional  

optional Calificación de la operación (lista l9). Example: 1

OperacionExenta   numeric  optional  

optional Operacion exenta (lista l10). Example: 100

TipoImpositivo   numeric  optional  

optional Tipo impositivo aplicado. Example: 21

BaseImponibleOImporteNoSujeto   numeric  optional  

optional Base imponible. Example: 100

BaseImponibleACoste   numeric  optional  

optional Base imponible a coste.

CuotaRepercutida   numeric  optional  

optional Cuota repercutida. Example: 21

TipoRecargoEquivalencia   numeric  optional  

optional Porcentaje de recargo de equivalencia. Example: 21

CuotaRecargoEquivalencia   numeric  optional  

optional Valor del recargo de equivalencia. Example: 21

CuotaTotal   number   

Cuota total de la factura. Example: 21

ImporteTotal   number   

Importe total de la factura. Example: 121

BaseRectificada   number  optional  

optional Base rectificada.

CuotaRectificada   number  optional  

optional Cuota rectificada.

CuotaRecargoRectificada   number  optional  

optional Cuota de recargo rectificada.

FacturasRectificadas   string[]  optional  

optional Lista de facturas rectificadas.

*   object  optional  
IDEmisorFactura   string   

El NIF del emisor de la factura rectificada. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura rectificada. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura rectificada. Example: 2025-1-1

FacturasSustituidas   string[]  optional  

optional Lista de facturas sustituidas.

*   object  optional  
IDEmisorFactura   string   

El NIF del emisor de la factura sustituida. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura sustituida. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura sustituida. Example: 2025-1-1

webhook_id   integer  optional  

optional El ID del webhook asociado a la factura.

tag   string  optional  

optional Etiqueta personalizada para la factura. Example: test

Validar una factura de Verifactu.

requires authentication

Valida el formato y los datos de una factura de Verifactu.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/validar';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer kvV3P6h8dacEg1Z6Dfaeb45',
            '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 kvV3P6h8dacEg1Z6Dfaeb45",
    "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 kvV3P6h8dacEg1Z6Dfaeb45" \
    --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 kvV3P6h8dacEg1Z6Dfaeb45',
  '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
}
 

Request   

POST api/alta-registro-facturacion/validar

Headers

Authorization      

Example: Bearer kvV3P6h8dacEg1Z6Dfaeb45

Content-Type      

Example: application/json

Body Parameters

IDEmisorFactura   string   

El NIF del emisor. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-1-1

RefExterna   string  optional  

optional Referencia externa de la factura. Example: Test Ref Externa

Subsanacion   string  optional  

optional Indica si se trata de una subsanación (lista l4).

RechazoPrevio   string  optional  

optional Indica si se trata de una re-emision de subsanacion tras un rechazo (lista l17).

TipoFactura   string   

Tipo de factura (lista_l2). Example: F1

TipoRectificativa   string  optional  

optional Indica el tipo de rectificativa (lista l3).

FechaOperacion   string  optional  

optional Fecha de la operación.

DescripcionOperacion   string   

Descripción de la operación. Example: test

FacturaSimplificadaArt7273   string  optional  

optional Factura simplificada Articulo 7.2 Y 7.3 RD 1619/2012 (lista l4).

FacturaSinIdentifDestinatarioArt61d   string  optional  

optional Factura sin identificación destinatario artículo 6.1.d) RD 1619/2012 (lista l5).

EmitidaPorTercODesti   string   

Indica si se trata de una factura emitida por tercero o destinatario (lista l6).

Tercero   Object  optional  

optional Tercero que emite la factura.

NombreRazon   string   

Nombre o razón social del tercero. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del tercero. Example: "39707287H"

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

Destinatarios   string[]   

Lista de destinatarios de la factura.

*   object  optional  
NombreRazon   string   

Nombre o razón social del destinatario. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del destinatario. Example: "39707287H"

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

Cupon   string  optional  

optional Indica si se trata de una factura con minoracion de la base imponible (lista l4).

Desglose   string[]   

Lista de desgloses de la factura.

*   object  optional  
Impuesto   string  optional  

optional Código del impuesto (lista l1). Example: 01

ClaveRegimen   integer  optional  

optional Clave del régimen especial (lista l8a/l8b). Example: 1

CalificacionOperacion   integer  optional  

optional Calificación de la operación (lista l9). Example: 1

OperacionExenta   numeric  optional  

optional Operacion exenta (lista l10). Example: 100

TipoImpositivo   numeric  optional  

optional Tipo impositivo aplicado. Example: 21

BaseImponibleOImporteNoSujeto   numeric  optional  

optional Base imponible. Example: 100

BaseImponibleACoste   numeric  optional  

optional Base imponible a coste.

CuotaRepercutida   numeric  optional  

optional Cuota repercutida. Example: 21

TipoRecargoEquivalencia   numeric  optional  

optional Porcentaje de recargo de equivalencia. Example: 21

CuotaRecargoEquivalencia   numeric  optional  

optional Valor del recargo de equivalencia. Example: 21

CuotaTotal   number   

Cuota total de la factura. Example: 21

ImporteTotal   number   

Importe total de la factura. Example: 121

BaseRectificada   number  optional  

optional Base rectificada.

CuotaRectificada   number  optional  

optional Cuota rectificada.

CuotaRecargoRectificada   number  optional  

optional Cuota de recargo rectificada.

FacturasRectificadas   string[]  optional  

optional Lista de facturas rectificadas.

*   object  optional  
IDEmisorFactura   string   

El NIF del emisor de la factura rectificada. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura rectificada. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura rectificada. Example: 2025-1-1

FacturasSustituidas   string[]  optional  

optional Lista de facturas sustituidas.

*   object  optional  
IDEmisorFactura   string   

El NIF del emisor de la factura sustituida. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura sustituida. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura sustituida. Example: 2025-1-1

webhook_id   integer  optional  

optional El ID del webhook asociado a la factura.

tag   string  optional  

optional Etiqueta personalizada para la factura. Example: test

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 hVcfZ3DkebE68a5v64gadP1',
            '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 hVcfZ3DkebE68a5v64gadP1",
    "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 hVcfZ3DkebE68a5v64gadP1" \
    --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 hVcfZ3DkebE68a5v64gadP1',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
 "success": true,
 "message": "Anulacion creada correctamente",
 "code": 201,
 "data": {
     "count": 1,
     "items": [
         {
             "id": 14,
             "previous_id": null,
             "alta_o_anulacion": 2,
             "id_registro_anulado": 1,
             "modificacionOSubsanacion": null,
             "id_registro_modificadoOSubsanado": null,
             "IDEmisorFactura": "A39200019",
             "NumSerieFactura": "JFER-111",
             "NumSerie": null,
             "NumFactura": null,
             "FechaExpedicionFactura": "2025-06-07",
             "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,
             "webhook_log_id": null,
             "verifactu": true,
             "no_verifactu": false,
             "tbai": false,
             "face": 0,
             "json": "{\"id_registro_anulado\":1,\"IDEmisorFactura\":\"A39200019\",\"NumSerieFactura\":\"JFER-111\",\"FechaExpedicionFactura\":\"2025-06-07\",\"HoraExpedicionFactura\":null,\"NumSerie\":null,\"NumFactura\":null,\"software_tbai_id\":null,\"id_zona_tbai\":null,\"no_verifactu\":false,\"tag\":\"-ANULACION\",\"verifactu\":true,\"estado_registro_verifactu\":\"No Registrado\",\"alta_o_anulacion\":2}",
             "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 (400):


{
    "success": false,
    "message": "El tipo de factura no es válido. Campo \"type\" no encontrado.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/anulacion-registro-facturacion

Headers

Authorization      

Example: Bearer hVcfZ3DkebE68a5v64gadP1

Content-Type      

Example: application/json

Body Parameters

IDEmisorFactura   string   

El ID del emisor de la factura. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-11-11

SinRegistroPrevio   boolean  optional  

Si la factura a anular no existe en la API, usar el campo SinRegistroPrevio. Example: true

Anular 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 g8ea16dbVf5c4D3vhPka6ZE',
            '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 g8ea16dbVf5c4D3vhPka6ZE",
    "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 g8ea16dbVf5c4D3vhPka6ZE" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/anulacion-registro-facturacion/1'
headers = {
  'Authorization': 'Bearer g8ea16dbVf5c4D3vhPka6ZE',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Example response (201):


{
 "success": true,
 "message": "Anulacion creada correctamente",
 "code": 201,
 "data": {
     "count": 1,
     "items": [
         {
             "id": 14,
             "previous_id": null,
             "alta_o_anulacion": 2,
             "id_registro_anulado": 1,
             "modificacionOSubsanacion": null,
             "id_registro_modificadoOSubsanado": null,
             "IDEmisorFactura": "A39200019",
             "NumSerieFactura": "JFER-111",
             "NumSerie": null,
             "NumFactura": null,
             "FechaExpedicionFactura": "2025-06-07",
             "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,
             "webhook_log_id": null,
             "verifactu": true,
             "no_verifactu": false,
             "tbai": false,
             "face": 0,
             "json": "{\"id_registro_anulado\":1,\"IDEmisorFactura\":\"A39200019\",\"NumSerieFactura\":\"JFER-111\",\"FechaExpedicionFactura\":\"2025-06-07\",\"HoraExpedicionFactura\":null,\"NumSerie\":null,\"NumFactura\":null,\"software_tbai_id\":null,\"id_zona_tbai\":null,\"no_verifactu\":false,\"tag\":\"-ANULACION\",\"verifactu\":true,\"estado_registro_verifactu\":\"No Registrado\",\"alta_o_anulacion\":2}",
             "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
}
 

Request   

POST api/anulacion-registro-facturacion/{id}

Headers

Authorization      

Example: Bearer g8ea16dbVf5c4D3vhPka6ZE

Content-Type      

Example: application/json

URL Parameters

id   string   

El id del registro de la factura a anular. Example: 1

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 h4kdV1aZvcf365DE86agePb',
            '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',
            'no_verifactu' => '0',
        ],
    ]
);
$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",
    "no_verifactu": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer h4kdV1aZvcf365DE86agePb",
    "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&no_verifactu=0" \
    --header "Authorization: Bearer h4kdV1aZvcf365DE86agePb" \
    --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',
  'no_verifactu': '0',
}
headers = {
  'Authorization': 'Bearer h4kdV1aZvcf365DE86agePb',
  '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": "A39200019",
                "NumSerieFactura": "JFER-111",
                "NumSerie": null,
                "NumFactura": null,
                "FechaExpedicionFactura": "2025-06-07",
                "HoraExpedicionFactura": null,
                "FechaOperacion": null,
                "DescripcionOperacion": "FACTURA",
                "NombreRazonDestinatario": "Javier Aguilera Collar",
                "NIFDestinatario": "50748484L",
                "RefExterna": null,
                "CuotaTotal": 5.5,
                "ImporteTotal": 77.5,
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": null,
                "webhook_id": null,
                "webhook_log_id": null,
                "verifactu": true,
                "no_verifactu": false,
                "tbai": false,
                "face": 0,
                "json": "{\"IDEmisorFactura\":\"A39200019\",\"NumSerieFactura\":\"JFER-111\",\"FechaExpedicionFactura\":\"2025-06-07\",\"NombreRazonEmisor\":\"Empresa TEST\",\"RefExterna\":null,\"TipoFactura\":1,\"DescripcionOperacion\":\"FACTURA\",\"Destinatarios\":[{\"NombreRazon\":\"Javier Aguilera Collar\",\"NIF\":\"50748484L\"}],\"Desglose\":[{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":2.1,\"TipoImpositivo\":\"21.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":10,\"PrecioUnitario\":10,\"Cantidad\":1,\"Importe\":\"10.00\"},{\"Impuesto\":1,\"ClaveRegimen\":1,\"OperacionExenta\":1,\"BaseImponibleOImporteNoSujeto\":10,\"PrecioUnitario\":10,\"Cantidad\":1},{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":2.2,\"TipoImpositivo\":\"10.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":22,\"PrecioUnitario\":22,\"Cantidad\":1,\"Importe\":\"22.00\"},{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":1.2,\"TipoImpositivo\":\"4.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":30,\"PrecioUnitario\":30,\"Cantidad\":1,\"Importe\":\"30.00\"}],\"CuotaTotal\":\"5.50\",\"ImporteTotal\":\"77.50\",\"type\":\"verifactu\",\"software_tbai_id\":null,\"id_zona_tbai\":null,\"no_verifactu\":false,\"Subsanacion\":2,\"RechazoPrevio\":1,\"FacturaSimplificada7273\":2,\"Art61d\":2,\"Macrodato\":2,\"Cupon\":2,\"verifactu\":true}",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=JFER-111&fecha=07-06-2025&importe=77.5",
                "qr_image": "base64 qr",
                "qr_x": null,
                "qr_y": null,
                "qr_page": 1,
                "remitenteNacional": 1,
                "next_id": 2,
                "IDVersion": 1,
                "Subsanacion": 2,
                "RechazoPrevio": 1,
                "TipoFactura": 1,
                "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": "0660B66CD777BBEA44938293BEA91A35040F6284A98F90FBCA82675E87543B4E",
                "Signature": null,
                "Signature2": null,
                "TipoHuella": 1,
                "NumRegistroAcuerdoFacturacion": null,
                "IdAcuerdoSistemaInformatico": null,
                "FechaHoraHusoGenRegistro": "2025-06-09T10:50:57+02:00",
                "IDEmisorFacturaAnterior": null,
                "NumSerieFacturaAnterior": null,
                "FechaExpedicionFacturaAnterior": null,
                "HuellaAnterior": null,
                "incidencia": false,
                "xml_aeat": "<sfLR:RegistroFactura>\n   <sf:RegistroAlta>\n       <sf:IDVersion>1.0</sf:IDVersion>\n       <sf:IDFactura>\n           <sf:IDEmisorFactura>A39200019</sf:IDEmisorFactura>\n           <sf:NumSerieFactura>JFER-111</sf:NumSerieFactura>\n           <sf:FechaExpedicionFactura>07-06-2025</sf:FechaExpedicionFactura>\n       </sf:IDFactura>\n       <sf:RefExterna></sf:RefExterna>\n       <sf:NombreRazonEmisor>EMPRESA TEST</sf:NombreRazonEmisor>\n       <sf:Subsanacion>N</sf:Subsanacion>\n       <sf:RechazoPrevio>N</sf:RechazoPrevio>\n       <sf:TipoFactura>F1</sf:TipoFactura>\n       <sf:DescripcionOperacion>FACTURA</sf:DescripcionOperacion>\n       <sf:FacturaSimplificadaArt7273>N</sf:FacturaSimplificadaArt7273>\n       <sf:FacturaSinIdentifDestinatarioArt61d></sf:FacturaSinIdentifDestinatarioArt61d>\n       <sf:Macrodato>N</sf:Macrodato>\n       <sf:Destinatarios>\n           <sf:IDDestinatario>\n               <sf:NombreRazon>Javier Aguilera Collar</sf:NombreRazon>\n               <sf:NIF>50748484L</sf:NIF>\n           </sf:IDDestinatario>\n       </sf:Destinatarios>\n       <sf:Desglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:CalificacionOperacion>S1</sf:CalificacionOperacion>\n               <sf:TipoImpositivo>21</sf:TipoImpositivo>\n               <sf:BaseImponibleOimporteNoSujeto>10</sf:BaseImponibleOimporteNoSujeto>\n               <sf:CuotaRepercutida>2.1</sf:CuotaRepercutida>\n           </sf:DetalleDesglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:OperacionExenta>E1</sf:OperacionExenta>\n               <sf:BaseImponibleOimporteNoSujeto>10</sf:BaseImponibleOimporteNoSujeto>\n           </sf:DetalleDesglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:CalificacionOperacion>S1</sf:CalificacionOperacion>\n               <sf:TipoImpositivo>10</sf:TipoImpositivo>\n               <sf:BaseImponibleOimporteNoSujeto>22</sf:BaseImponibleOimporteNoSujeto>\n               <sf:CuotaRepercutida>2.2</sf:CuotaRepercutida>\n           </sf:DetalleDesglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:CalificacionOperacion>S1</sf:CalificacionOperacion>\n               <sf:TipoImpositivo>4</sf:TipoImpositivo>\n               <sf:BaseImponibleOimporteNoSujeto>30</sf:BaseImponibleOimporteNoSujeto>\n               <sf:CuotaRepercutida>1.2</sf:CuotaRepercutida>\n           </sf:DetalleDesglose>\n       </sf:Desglose>\n       <sf:CuotaTotal>5.5</sf:CuotaTotal>\n       <sf:ImporteTotal>77.5</sf:ImporteTotal>\n       <sf:Encadenamiento>\n           <sf:PrimerRegistro>S</sf:PrimerRegistro>\n       </sf:Encadenamiento>\n       <sf:SistemaInformatico>\n           <sf:NombreRazon>NEMON INVOICE TO CASH, SL</sf:NombreRazon>\n           <sf:NIF>B70912613</sf:NIF>\n           <sf:NombreSistemaInformatico>NEMON INVOCASH VERIFACTU API</sf:NombreSistemaInformatico>\n           <sf:IdSistemaInformatico>01</sf:IdSistemaInformatico>\n           <sf:Version>1.0</sf:Version>\n           <sf:NumeroInstalacion>20250609104953_772645</sf:NumeroInstalacion>\n           <sf:TipoUsoPosibleSoloVerifactu>S</sf:TipoUsoPosibleSoloVerifactu>\n           <sf:TipoUsoPosibleMultiOT>N</sf:TipoUsoPosibleMultiOT>\n           <sf:IndicadorMultiplesOT>N</sf:IndicadorMultiplesOT>\n       </sf:SistemaInformatico>\n       <sf:FechaHoraHusoGenRegistro>2025-06-09T10:50:57+02:00</sf:FechaHoraHusoGenRegistro>\n       <sf:TipoHuella>01</sf:TipoHuella>\n       <sf:Huella>0660B66CD777BBEA44938293BEA91A35040F6284A98F90FBCA82675E87543B4E</sf:Huella>\n   </sf:RegistroAlta>\n</sfLR:RegistroFactura>\n",
                "xml_signed": null,
                "xml_aeat_response": null,
                "estado_aeat": "Correcto",
                "estado_registro_aeat": "Registrado",
                "codigo_error_aeat": "",
                "descripcion_error_aeat": "",
                "envios_aeat_id": 1,
                "envios_aeat_lineas_id": 1
            }
        ],
        "count": 1
    },
    "pagination": {
        "total": 1,
        "perPage": 10,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Request   

GET api/alta-registro-facturacion

Headers

Authorization      

Example: Bearer h4kdV1aZvcf365DE86agePb

Content-Type      

Example: application/json

Query Parameters

IDEmisorFactura   string  optional  

El ID del emisor de la factura. Example: A39200019

NumSerieFactura   string  optional  

El número de serie de la factura. Example: AX/202412-1

FechaExpedicionFactura   string  optional  

La fecha de expedición de la factura. Example: 2025-01-01

NifDestinatario   string  optional  

El NIF del destinatario. Example: 123456789

NombreRazonDestinatario   string  optional  

El nombre o razón social del destinatario. Example: Nombre del destinatario

ImporteTotal   number  optional  

El importe total de la factura. Example: 100

tag   string  optional  

El tag de la factura. Example: 123456789

alta_o_anulacion   integer  optional  

El tipo de factura (1(alta)/2(anulación)). Example: 1

no_verifactu   integer  optional  

El tipo de factura (1(No Verifactu)/0(Verifactu)). Example: 0

Obtener un registro Verifactu por id

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 8avDP61c36kb4dZhV5Eeagf',
            '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 8avDP61c36kb4dZhV5Eeagf",
    "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 8avDP61c36kb4dZhV5Eeagf" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/alta-registro-facturacion/1'
headers = {
  'Authorization': 'Bearer 8avDP61c36kb4dZhV5Eeagf',
  '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": "A39200019",
            "NumSerieFactura": "JFER-111",
            "NumSerie": null,
            "NumFactura": null,
            "FechaExpedicionFactura": "2025-06-07",
            "HoraExpedicionFactura": null,
            "FechaOperacion": null,
            "DescripcionOperacion": "FACTURA",
            "NombreRazonDestinatario": "Javier Aguilera Collar",
            "NIFDestinatario": "50748484L",
            "RefExterna": null,
            "CuotaTotal": 5.5,
            "ImporteTotal": 77.5,
            "moneda": "EUR",
            "BaseRectificada": null,
            "CuotaRectificada": null,
            "CuotaRecargoRectificada": null,
            "tag": null,
            "webhook_id": null,
            "webhook_log_id": null,
            "verifactu": true,
            "no_verifactu": false,
            "tbai": false,
            "face": 0,
            "json": "{\"IDEmisorFactura\":\"A39200019\",\"NumSerieFactura\":\"JFER-111\",\"FechaExpedicionFactura\":\"2025-06-07\",\"NombreRazonEmisor\":\"Empresa TEST\",\"RefExterna\":null,\"TipoFactura\":1,\"DescripcionOperacion\":\"FACTURA\",\"Destinatarios\":[{\"NombreRazon\":\"Javier Aguilera Collar\",\"NIF\":\"50748484L\"}],\"Desglose\":[{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":2.1,\"TipoImpositivo\":\"21.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":10,\"PrecioUnitario\":10,\"Cantidad\":1,\"Importe\":\"10.00\"},{\"Impuesto\":1,\"ClaveRegimen\":1,\"OperacionExenta\":1,\"BaseImponibleOImporteNoSujeto\":10,\"PrecioUnitario\":10,\"Cantidad\":1},{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":2.2,\"TipoImpositivo\":\"10.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":22,\"PrecioUnitario\":22,\"Cantidad\":1,\"Importe\":\"22.00\"},{\"Impuesto\":1,\"ClaveRegimen\":1,\"CuotaRepercutida\":1.2,\"TipoImpositivo\":\"4.00\",\"CalificacionOperacion\":1,\"BaseImponibleACoste\":null,\"BaseImponibleOImporteNoSujeto\":30,\"PrecioUnitario\":30,\"Cantidad\":1,\"Importe\":\"30.00\"}],\"CuotaTotal\":\"5.50\",\"ImporteTotal\":\"77.50\",\"type\":\"verifactu\",\"software_tbai_id\":null,\"id_zona_tbai\":null,\"no_verifactu\":false,\"Subsanacion\":2,\"RechazoPrevio\":1,\"FacturaSimplificada7273\":2,\"Art61d\":2,\"Macrodato\":2,\"Cupon\":2,\"verifactu\":true}",
            "base64_pdf": null,
            "base64_qr_pdf": null,
            "url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=JFER-111&fecha=07-06-2025&importe=77.5",
            "qr_image": "base64 qr",
            "qr_x": null,
            "qr_y": null,
            "qr_page": 1,
            "remitenteNacional": 1,
            "next_id": 2,
            "IDVersion": 1,
            "Subsanacion": 2,
            "RechazoPrevio": 1,
            "TipoFactura": 1,
            "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": "0660B66CD777BBEA44938293BEA91A35040F6284A98F90FBCA82675E87543B4E",
            "Signature": null,
            "Signature2": null,
            "TipoHuella": 1,
            "NumRegistroAcuerdoFacturacion": null,
            "IdAcuerdoSistemaInformatico": null,
            "FechaHoraHusoGenRegistro": "2025-06-09T10:50:57+02:00",
            "IDEmisorFacturaAnterior": null,
            "NumSerieFacturaAnterior": null,
            "FechaExpedicionFacturaAnterior": null,
            "HuellaAnterior": null,
            "incidencia": false,
            "xml_aeat": "<sfLR:RegistroFactura>\n   <sf:RegistroAlta>\n       <sf:IDVersion>1.0</sf:IDVersion>\n       <sf:IDFactura>\n           <sf:IDEmisorFactura>A39200019</sf:IDEmisorFactura>\n           <sf:NumSerieFactura>JFER-111</sf:NumSerieFactura>\n           <sf:FechaExpedicionFactura>07-06-2025</sf:FechaExpedicionFactura>\n       </sf:IDFactura>\n       <sf:RefExterna></sf:RefExterna>\n       <sf:NombreRazonEmisor>EMPRESA TEST</sf:NombreRazonEmisor>\n       <sf:Subsanacion>N</sf:Subsanacion>\n       <sf:RechazoPrevio>N</sf:RechazoPrevio>\n       <sf:TipoFactura>F1</sf:TipoFactura>\n       <sf:DescripcionOperacion>FACTURA</sf:DescripcionOperacion>\n       <sf:FacturaSimplificadaArt7273>N</sf:FacturaSimplificadaArt7273>\n       <sf:FacturaSinIdentifDestinatarioArt61d></sf:FacturaSinIdentifDestinatarioArt61d>\n       <sf:Macrodato>N</sf:Macrodato>\n       <sf:Destinatarios>\n           <sf:IDDestinatario>\n               <sf:NombreRazon>Javier Aguilera Collar</sf:NombreRazon>\n               <sf:NIF>50748484L</sf:NIF>\n           </sf:IDDestinatario>\n       </sf:Destinatarios>\n       <sf:Desglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:CalificacionOperacion>S1</sf:CalificacionOperacion>\n               <sf:TipoImpositivo>21</sf:TipoImpositivo>\n               <sf:BaseImponibleOimporteNoSujeto>10</sf:BaseImponibleOimporteNoSujeto>\n               <sf:CuotaRepercutida>2.1</sf:CuotaRepercutida>\n           </sf:DetalleDesglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:OperacionExenta>E1</sf:OperacionExenta>\n               <sf:BaseImponibleOimporteNoSujeto>10</sf:BaseImponibleOimporteNoSujeto>\n           </sf:DetalleDesglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:CalificacionOperacion>S1</sf:CalificacionOperacion>\n               <sf:TipoImpositivo>10</sf:TipoImpositivo>\n               <sf:BaseImponibleOimporteNoSujeto>22</sf:BaseImponibleOimporteNoSujeto>\n               <sf:CuotaRepercutida>2.2</sf:CuotaRepercutida>\n           </sf:DetalleDesglose>\n           <sf:DetalleDesglose>\n               <sf:Impuesto>01</sf:Impuesto>\n               <sf:ClaveRegimen>01</sf:ClaveRegimen>\n               <sf:CalificacionOperacion>S1</sf:CalificacionOperacion>\n               <sf:TipoImpositivo>4</sf:TipoImpositivo>\n               <sf:BaseImponibleOimporteNoSujeto>30</sf:BaseImponibleOimporteNoSujeto>\n               <sf:CuotaRepercutida>1.2</sf:CuotaRepercutida>\n           </sf:DetalleDesglose>\n       </sf:Desglose>\n       <sf:CuotaTotal>5.5</sf:CuotaTotal>\n       <sf:ImporteTotal>77.5</sf:ImporteTotal>\n       <sf:Encadenamiento>\n           <sf:PrimerRegistro>S</sf:PrimerRegistro>\n       </sf:Encadenamiento>\n       <sf:SistemaInformatico>\n           <sf:NombreRazon>NEMON INVOICE TO CASH, SL</sf:NombreRazon>\n           <sf:NIF>B70912613</sf:NIF>\n           <sf:NombreSistemaInformatico>NEMON INVOCASH VERIFACTU API</sf:NombreSistemaInformatico>\n           <sf:IdSistemaInformatico>01</sf:IdSistemaInformatico>\n           <sf:Version>1.0</sf:Version>\n           <sf:NumeroInstalacion>20250609104953_772645</sf:NumeroInstalacion>\n           <sf:TipoUsoPosibleSoloVerifactu>S</sf:TipoUsoPosibleSoloVerifactu>\n           <sf:TipoUsoPosibleMultiOT>N</sf:TipoUsoPosibleMultiOT>\n           <sf:IndicadorMultiplesOT>N</sf:IndicadorMultiplesOT>\n       </sf:SistemaInformatico>\n       <sf:FechaHoraHusoGenRegistro>2025-06-09T10:50:57+02:00</sf:FechaHoraHusoGenRegistro>\n       <sf:TipoHuella>01</sf:TipoHuella>\n       <sf:Huella>0660B66CD777BBEA44938293BEA91A35040F6284A98F90FBCA82675E87543B4E</sf:Huella>\n   </sf:RegistroAlta>\n</sfLR:RegistroFactura>\n",
            "xml_signed": null,
            "xml_aeat_response": null,
            "estado_aeat": "Correcto",
            "estado_registro_aeat": "Registrado",
            "codigo_error_aeat": "",
            "descripcion_error_aeat": "",
            "envios_aeat_id": 1,
            "envios_aeat_lineas_id": 1
        },
        "count": 1
    }
}
 

Example response (404):


{
    "success": false,
    "code": 404,
    "message": "No se encontró la factura especificada.",
    "data": null
}
 

Request   

GET api/alta-registro-facturacion/{id}

Headers

Authorization      

Example: Bearer 8avDP61c36kb4dZhV5Eeagf

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID de la factura que se desea obtener. Example: 1

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 v1a8e6DgbhZ3Eadkc4fPV56',
            '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 v1a8e6DgbhZ3Eadkc4fPV56",
    "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 v1a8e6DgbhZ3Eadkc4fPV56" \
    --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 v1a8e6DgbhZ3Eadkc4fPV56',
  '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": "2025-08-05",
            "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
}
 

Request   

POST api/consultar-registros-aeat

Headers

Authorization      

Example: Bearer v1a8e6DgbhZ3Eadkc4fPV56

Content-Type      

Example: application/json

Body Parameters

Entorno   string   

El entorno de la consulta. Ejemplo: PROD o TEST. Example: PROD

NombreRazonEmisor   string   

El nombre de la razón social del emisor. Example: Test

NIFEmisor   string   

El NIF del emisor. Example: 12345678Z

Ejercicio   string   

El año de emisión del registro. Example: 2024

Periodo   string   

El mes de emisión del registro. Example: 01

NumSerieFactura   string  optional  

optional El número de serie de la factura.

RefExterna   string  optional  

optional La referencia externa de la factura.

Contraparte   object  optional  

optional Datos de la contraparte de la factura.

NombreRazon   string  optional  

optional El nombre de la razón social de la contraparte.

NIF   string  optional  

optional El NIF de la contraparte.

ID   string  optional  

optional El ID de la contraparte.

IDType   string  optional  

optional El tipo de ID de la contraparte.

CodigoPais   string  optional  

optional El código de país de la contraparte.

FechaExpedicionFactura   string  optional  

optional La fecha de expedición de la factura.

RangoFechaExpedicion   object  optional  

optional Rango de fechas de expedición de la factura.

Desde   string  optional  

optional La fecha de inicio del rango.

Hasta   string  optional  

optional La fecha de fin del rango.

ClavePaginacion   object  optional  

optional Valores del ultimo registro mostrado para poder mostrar los siguientes registros.

IDEmisorFactura   string  optional  

optional El NIF del emisor.

NumSerieFactura   string  optional  

optional El número de serie de la factura.

FechaExpedicionFactura   string  optional  

optional La fecha de expedición de la factura.

MostrarNombreRazonEmisor   string  optional  

optional Indica si se muestra el nombre de la razón social del emisor. S o N.

MostrarSistemaInformatico   string  optional  

optional Indica si se muestra el sistema informático del emisor. S o N.

IndicadorRepresentante   string  optional  

optional Indica si se trata de un representante. unicamente acepta el valor S.

TBAI

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 6kvaVgD1c3f4Z68hbP5aEed',
            '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/alta-registro-tbai"
);

const headers = {
    "Authorization": "Bearer 6kvaVgD1c3f4Z68hbP5aEed",
    "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/alta-registro-tbai" \
    --header "Authorization: Bearer 6kvaVgD1c3f4Z68hbP5aEed" \
    --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/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
    ],
    "tag": "test"
}
headers = {
  'Authorization': 'Bearer 6kvaVgD1c3f4Z68hbP5aEed',
  '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": "97192097P",
             "NumSerieFactura": "AX/202413-131",
             "NumSerie": "AX/202413",
             "NumFactura": "131",
             "FechaExpedicionFactura": "2025-01-09",
             "HoraExpedicionFactura": "10:00:00",
             "FechaOperacion": null,
             "DescripcionOperacion": null,
             "NombreRazonDestinatario": "IVAN SOLE MARTINEZ",
             "NIFDestinatario": "39707287H",
             "RefExterna": null,
             "CuotaTotal": 21,
             "ImporteTotal": "121",
             "moneda": "EUR",
             "BaseRectificada": null,
             "CuotaRectificada": null,
             "CuotaRecargoRectificada": null,
             "tag": null,
             "webhook_id": null,
             "webhook_log_id": null,
             "verifactu": false,
             "no_verifactu": false,
             "tbai": true,
             "face": 0,
             "json": "{\"IDEmisorFactura\":\"97192097P\",\"VariosDestinatarios\":2,\"EmitidaPorTercODest\":1,\"FacturaSimplificada\":2,\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"131\",\"FechaExpedicionFactura\":\"2025-1-9\",\"HoraExpedicionFactura\":\"10:00:00\",\"NombreRazonEmisor\":\"EMPRESA TEST\",\"DescripcionFactura\":\"Test Desc Factura\",\"Destinatarios\":[{\"NombreRazon\":\"IVAN SOLE MARTINEZ\",\"NIF\":\"39707287H\",\"CodigoPostal\":\"43791\",\"Direccion\":\"C\\/Mirador, 3\"}],\"DetallesFactura\":[{\"Descripcion\":\"Test\",\"Unidades\":10,\"PrecioPorUnidad\":10,\"SubTotal\":100,\"ImporteTotal\":121}],\"Desglose\":[{\"TipoNoExenta\":1,\"TipoImpositivo\":\"21\",\"BaseImponibleOImporteNoSujeto\":\"100\",\"CuotaRepercutida\":\"21\"}],\"Claves\":[1,null,null],\"CuotaTotal\":21,\"ImporteTotal\":121,\"type\":\"tbai\",\"NumSerieFactura\":\"AX\\/202413-131\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"FacturaEmitidaSustSimp\":2,\"remitenteNacional\":true,\"tbai\":true}",
             "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": 4,
             "IDVersion": 1,
             "VariosDestinatarios": 2,
             "EmitidaPorTercODest": 1,
             "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": "No Registrado",
             "estado_registro_tbai": null,
             "codigo_error_tbai": null,
             "descripcion_error_tbai": null,
             "envio_tbai_id": null,
             "NumSerieDispositivo": null
         }
     ]
 }
 

Example response (400):


{
    "success": false,
    "message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/alta-registro-tbai

Headers

Authorization      

Example: Bearer 6kvaVgD1c3f4Z68hbP5aEed

Content-Type      

Example: application/json

Body Parameters

IDEmisorFactura   string   

El NIF del emisor. Example: A39200019

NumSerie   string  optional  

optional El número de serie de la factura. Example: AX/202412

NumFactura   string   

El número de factura. Example: 123

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-1-1

HoraExpedicionFactura   string   

La hora de expedición de la factura. Example: 10:00:00

VariosDestinatarios   optional  optional  

Indica si se trata de una factura con varios destinatarios (lista l3).

EmitidaPorTercODesti   optional  optional  

Indica si se trata de una factura emitida por tercero o destinatario (lista l4).

FacturaSimplificada   optional  optional  

Indica si se trata de una factura simplificada (lista l5).

FacturaEmitidaSustSimp   optional  optional  

Indica si se trata de una factura emitida en sustitucion de una simplificada (lista l6).

FechaOperacion   string  optional  

optional Fecha de la operación.

DescripcionFactura   string   

Descripción de la factura. Example: test

Destinatarios   string[]   

Lista de destinatarios de la factura.

*   object  optional  
NombreRazon   string   

Nombre o razón social del destinatario. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del destinatario. Example: "39707287H"

CodigoPostal   string   

Código postal del destinatario. Example: 28001

Direccion   string   

Dirección del destinatario. Example: "Calle de la Princesa 1" //REVISAR OBLIGATORIEDAD DE ESTOS CAMPOS

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

DetallesFactura   string[]   

Lista de detalles de la factura.

*   object  optional  
Descripcion   string   

Descripción de la línea. Example: "Producto 1"

Unidades   integer   

Unidades de la línea. Example: 1

PrecioPorUnidad   integer   

Precio por unidad. Example: 100

SubTotal   integer   

Subtotal de la línea. Example: 100

ImporteTotal   integer   

Importe total de la línea. Example: 100

Descuento   integer   

Importe en euros del descuento.

Desglose   string[]   

Lista de desgloses de la factura.

*   object  optional  
PrestacionServicioOEntrega   optional  optional  

Indica si se trata de una prestación de servicio o entrega cuando el destinatario no es Nacional(1 Prestacion - 2 Entrega).

CausaExcencion   integer  optional  

optional Causa de exención (lista l10).

BaseImponibleOImporteNoSujeto   integer  optional  

optional Base imponible o importe no sujeto.

TipoNoExenta   integer  optional  

optional Tipo de no exención (lista l11). Example: 1

TipoImpositivo   integer  optional  

optional Tipo impositivo aplicado. Example: 21

CuotaRepercutida   integer  optional  

optional Cuota repercutida. Example: 21

TipoRecargoEquivalencia   integer  optional  

optional Porcentaje de recargo de equivalencia. Example: 21

CuotaRecargoEquivalencia   integer  optional  

optional Valor del recargo de equivalencia. Example: 21

OperacionRecEquivORegSimpl   integer  optional  

optional Operación de recargo de equivalencia o registro simplificado (lista l12).

CausaNoSujeta   integer  optional  

optional Causa de no sujeción (lista l13).

ImporteTotal   number   

Importe total de la factura. Example: 121

RetencionSoportada   number  optional  

optional Retenciones soportadas. Example: 21

BaseImponibleACoste   number  optional  

optional Base imponible a coste.

Claves   string[]  optional  

optional Claves de retenciones.

CodigoRectificativa   string  optional  

optional Código de la rectificativa (lista l17).

TipoRectificativa   string  optional  

optional Tipo de rectificativa (lista l8).

BaseRectificada   number  optional  

optional Base rectificada.

CuotaRectificada   number  optional  

optional Cuota rectificada.

CuotaRecargoRectificada   number  optional  

optional Cuota de recargo rectificada.

FacturasSustituidas   string[]  optional  

optional Lista de facturas sustituidas.

*   object  optional  
NumSerie   string   

El número de serie de la factura sustituida. Example: AX/202412

NumFactura   string   

El número de factura de la factura sustituida. Example: 123

FechaExpedicionFactura   string   

La fecha de expedición de la factura sustituida. Example: 2025-1-1

webhook_id   integer  optional  

optional El ID del webhook asociado a la factura.

tag   string  optional  

optional Etiqueta personalizada para la factura. Example: test

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 aVD3ZcEbkhvf65adg1648eP',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX/202412-1",
    "FechaExpedicionFactura": "2025-11-11"
},
    ]
);
$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 aVD3ZcEbkhvf65adg1648eP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX\/202412-1",
    "FechaExpedicionFactura": "2025-11-11"
};

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 aVD3ZcEbkhvf65adg1648eP" \
    --header "Content-Type: application/json" \
    --data "{
    \"IDEmisorFactura\": \"A39200019\",
    \"NumSerieFactura\": \"AX\\/202412-1\",
    \"FechaExpedicionFactura\": \"2025-11-11\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai'
payload = {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX\/202412-1",
    "FechaExpedicionFactura": "2025-11-11"
}
headers = {
  'Authorization': 'Bearer aVD3ZcEbkhvf65adg1648eP',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
 "success": true,
 "message": "Anulacion creada correctamente",
 "code": 201,
 "data": {
     "count": 1,
     "items": [
         {
             "id": 13,
             "previous_id": null,
             "alta_o_anulacion": 2,
             "id_registro_anulado": 4,
             "modificacionOSubsanacion": null,
             "id_registro_modificadoOSubsanado": null,
             "IDEmisorFactura": "97192097P",
             "NumSerieFactura": "AX/202413-132",
             "NumSerie": "AX/202413",
             "NumFactura": "132",
             "FechaExpedicionFactura": "2025-01-09",
             "HoraExpedicionFactura": "10:00:00",
             "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,
             "webhook_log_id": null,
             "verifactu": false,
             "no_verifactu": false,
             "tbai": true,
             "face": 0,
             "json": "{\"id_registro_anulado\":4,\"IDEmisorFactura\":\"97192097P\",\"NumSerieFactura\":\"AX\\/202413-132\",\"FechaExpedicionFactura\":\"2025-01-09\",\"HoraExpedicionFactura\":\"10:00:00\",\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"132\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"tag\":\"-ANULACION\",\"tbai\":true,\"estado_registro_tbai\":\"No Registrado\",\"alta_o_anulacion\":2}",
             "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
         }
     ]
 }
 

Example response (400):


{
    "success": false,
    "message": "El tipo de factura no es válido. Campo \"type\" no encontrado.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/anulacion-registro-tbai

Headers

Authorization      

Example: Bearer aVD3ZcEbkhvf65adg1648eP

Content-Type      

Example: application/json

Body Parameters

IDEmisorFactura   string   

El ID del emisor de la factura. Example: A39200019

NumSerieFactura   string   

El número de serie de la factura. Example: AX/202412-1

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-11-11

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 aD5P8V4Zbadk1fghE66ecv3',
            '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 aD5P8V4Zbadk1fghE66ecv3",
    "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 aD5P8V4Zbadk1fghE66ecv3" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai/1'
headers = {
  'Authorization': 'Bearer aD5P8V4Zbadk1fghE66ecv3',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Example response (201):


{
 "success": true,
 "message": "Anulacion creada correctamente",
 "code": 201,
 "data": {
     "count": 1,
     "items": [
         {
             "id": 13,
             "previous_id": null,
             "alta_o_anulacion": 2,
             "id_registro_anulado": 4,
             "modificacionOSubsanacion": null,
             "id_registro_modificadoOSubsanado": null,
             "IDEmisorFactura": "97192097P",
             "NumSerieFactura": "AX/202413-132",
             "NumSerie": "AX/202413",
             "NumFactura": "132",
             "FechaExpedicionFactura": "2025-01-09",
             "HoraExpedicionFactura": "10:00:00",
             "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,
             "webhook_log_id": null,
             "verifactu": false,
             "no_verifactu": false,
             "tbai": true,
             "face": 0,
             "json": "{\"id_registro_anulado\":4,\"IDEmisorFactura\":\"97192097P\",\"NumSerieFactura\":\"AX\\/202413-132\",\"FechaExpedicionFactura\":\"2025-01-09\",\"HoraExpedicionFactura\":\"10:00:00\",\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"132\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"tag\":\"-ANULACION\",\"tbai\":true,\"estado_registro_tbai\":\"No Registrado\",\"alta_o_anulacion\":2}",
             "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
         }
     ]
 }
 

Example response (404):


{
    "success": false,
    "message": "No se encontró la factura especificada.",
    "error": 404,
    "code": 404
}
 

Request   

POST api/anulacion-registro-tbai/{id}

Headers

Authorization      

Example: Bearer aD5P8V4Zbadk1fghE66ecv3

Content-Type      

Example: application/json

URL Parameters

id   string   

El id del registro de la factura a anular. Example: 1

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 h4VbacZd8vgfke6E31aP5D6',
            '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 h4VbacZd8vgfke6E31aP5D6",
    "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 h4VbacZd8vgfke6E31aP5D6" \
    --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 h4VbacZd8vgfke6E31aP5D6',
  '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": "97192097P",
                "NumSerieFactura": "AX/202413-131",
                "NumSerie": "AX/202413",
                "NumFactura": "131",
                "FechaExpedicionFactura": "2025-01-09",
                "HoraExpedicionFactura": "10:00:00",
                "FechaOperacion": null,
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": "IVAN SOLE MARTINEZ",
                "NIFDestinatario": "39707287H",
                "RefExterna": null,
                "CuotaTotal": 21,
                "ImporteTotal": "121",
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": null,
                "webhook_id": null,
                "webhook_log_id": null,
                "verifactu": false,
                "no_verifactu": false,
                "tbai": true,
                "face": 0,
                "json": "{\"IDEmisorFactura\":\"97192097P\",\"VariosDestinatarios\":2,\"EmitidaPorTercODest\":1,\"FacturaSimplificada\":2,\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"131\",\"FechaExpedicionFactura\":\"2025-1-9\",\"HoraExpedicionFactura\":\"10:00:00\",\"NombreRazonEmisor\":\"EMPRESA TEST\",\"DescripcionFactura\":\"Test Desc Factura\",\"Destinatarios\":[{\"NombreRazon\":\"IVAN SOLE MARTINEZ\",\"NIF\":\"39707287H\",\"CodigoPostal\":\"43791\",\"Direccion\":\"C\\/Mirador, 3\"}],\"DetallesFactura\":[{\"Descripcion\":\"Test\",\"Unidades\":10,\"PrecioPorUnidad\":10,\"SubTotal\":100,\"ImporteTotal\":121}],\"Desglose\":[{\"TipoNoExenta\":1,\"TipoImpositivo\":\"21\",\"BaseImponibleOImporteNoSujeto\":\"100\",\"CuotaRepercutida\":\"21\"}],\"Claves\":[1,null,null],\"CuotaTotal\":21,\"ImporteTotal\":121,\"type\":\"tbai\",\"NumSerieFactura\":\"AX\\/202413-131\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"FacturaEmitidaSustSimp\":2,\"remitenteNacional\":true,\"tbai\":true}",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": "https://pruebas-ticketbai.araba.eus/tbai/qrtbai/?id=TBAI-97192097P-090125-hDQ7o5Clx+GDc-009&s=AX/202413&nf=131&i=121&cr=254",
                "qr_image": "base64 qr",
                "qr_x": null,
                "qr_y": null,
                "qr_page": 1,
                "remitenteNacional": 1,
                "next_id": 4,
                "IDVersion": 1,
                "VariosDestinatarios": 2,
                "EmitidaPorTercODest": 1,
                "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 version=\"1.0\" encoding=\"UTF-8\"?>\n<T:TicketBai xmlns:T=\"urn:ticketbai:emision\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.w3.org/2001/XMLSchema ticketbai.xsd\">\n<Cabecera>\n   <IDVersionTBAI>1.2</IDVersionTBAI>\n</Cabecera>\n<Sujetos>\n   <Emisor>\n      <NIF>97192097P</NIF>\n       <ApellidosNombreRazonSocial>TBAI TEST</ApellidosNombreRazonSocial>\n   </Emisor>\n    <Destinatarios>\n       <IDDestinatario>\n           <NIF>39707287H</NIF>\n           <ApellidosNombreRazonSocial>IVAN SOLE MARTINEZ</ApellidosNombreRazonSocial>\n           <CodigoPostal>43791</CodigoPostal>\n           <Direccion>C/Mirador, 3</Direccion>\n       </IDDestinatario>\n    </Destinatarios>\n   <VariosDestinatarios>N</VariosDestinatarios>\n   <EmitidaPorTercerosODestinatario>N</EmitidaPorTercerosODestinatario>\n</Sujetos>\n<Factura>\n    <CabeceraFactura>\n       <SerieFactura>AX/202413</SerieFactura>\n       <NumFactura>131</NumFactura>\n       <FechaExpedicionFactura>09-01-2025</FechaExpedicionFactura>\n       <HoraExpedicionFactura>10:00:00</HoraExpedicionFactura>\n       <FacturaSimplificada>N</FacturaSimplificada>\n    </CabeceraFactura>\n    <DatosFactura>\n       <DescripcionFactura>Test Desc Factura</DescripcionFactura>\n        <DetallesFactura>\n           <IDDetalleFactura>\n               <DescripcionDetalle>Test</DescripcionDetalle>\n               <Cantidad>10</Cantidad>\n               <ImporteUnitario>10</ImporteUnitario>\n               <ImporteTotal>121</ImporteTotal>\n           </IDDetalleFactura>\n    </DetallesFactura>\n       <ImporteTotalFactura>121</ImporteTotalFactura>\n       <Claves>\n           <IDClave>\n               <ClaveRegimenIvaOpTrascendencia>01</ClaveRegimenIvaOpTrascendencia>\n           </IDClave>\n       </Claves>\n    </DatosFactura>\n    <TipoDesglose>\n       <DesgloseFactura>\n           <Sujeta>\n               <NoExenta>\n                   <DetalleNoExenta>\n                       <TipoNoExenta>S1</TipoNoExenta>\n                       <DesgloseIVA>\n                           <DetalleIVA>\n                               <BaseImponible>100</BaseImponible>\n                               <TipoImpositivo>21</TipoImpositivo>\n                               <CuotaImpuesto>21</CuotaImpuesto>\n                           </DetalleIVA>\n                       </DesgloseIVA>\n                   </DetalleNoExenta>\n               </NoExenta>\n           </Sujeta>\n       </DesgloseFactura>\n    </TipoDesglose>\n</Factura>\n<HuellaTBAI>\n    <Software>\n       <LicenciaTBAI>TBAIARCFKHKMdKM00968</LicenciaTBAI>\n        <EntidadDesarrolladora>\n           <NIF>B70912613</NIF>\n        </EntidadDesarrolladora>\n       <Nombre>NEMON INVOCASH</Nombre>\n       <Version>1.0</Version>\n    </Software>\n</HuellaTBAI>\n</T:TicketBai>",
                "xml_signed": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<T:TicketBai xmlns:T=\"urn:ticketbai:emision\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.w3.org/2001/XMLSchema ticketbai.xsd\">\n<Cabecera>\n   <IDVersionTBAI>1.2</IDVersionTBAI>\n</Cabecera>\n<Sujetos>\n   <Emisor>\n      <NIF>97192097P</NIF>\n       <ApellidosNombreRazonSocial>TBAI TEST</ApellidosNombreRazonSocial>\n   </Emisor>\n    <Destinatarios>\n       <IDDestinatario>\n           <NIF>39707287H</NIF>\n           <ApellidosNombreRazonSocial>IVAN SOLE MARTINEZ</ApellidosNombreRazonSocial>\n           <CodigoPostal>43791</CodigoPostal>\n           <Direccion>C/Mirador, 3</Direccion>\n       </IDDestinatario>\n    </Destinatarios>\n   <VariosDestinatarios>N</VariosDestinatarios>\n   <EmitidaPorTercerosODestinatario>N</EmitidaPorTercerosODestinatario>\n</Sujetos>\n<Factura>\n    <CabeceraFactura>\n       <SerieFactura>AX/202413</SerieFactura>\n       <NumFactura>131</NumFactura>\n       <FechaExpedicionFactura>09-01-2025</FechaExpedicionFactura>\n       <HoraExpedicionFactura>10:00:00</HoraExpedicionFactura>\n       <FacturaSimplificada>N</FacturaSimplificada>\n    </CabeceraFactura>\n    <DatosFactura>\n       <DescripcionFactura>Test Desc Factura</DescripcionFactura>\n        <DetallesFactura>\n           <IDDetalleFactura>\n               <DescripcionDetalle>Test</DescripcionDetalle>\n               <Cantidad>10</Cantidad>\n               <ImporteUnitario>10</ImporteUnitario>\n               <ImporteTotal>121</ImporteTotal>\n           </IDDetalleFactura>\n    </DetallesFactura>\n       <ImporteTotalFactura>121</ImporteTotalFactura>\n       <Claves>\n           <IDClave>\n               <ClaveRegimenIvaOpTrascendencia>01</ClaveRegimenIvaOpTrascendencia>\n           </IDClave>\n       </Claves>\n    </DatosFactura>\n    <TipoDesglose>\n       <DesgloseFactura>\n           <Sujeta>\n               <NoExenta>\n                   <DetalleNoExenta>\n                       <TipoNoExenta>S1</TipoNoExenta>\n                       <DesgloseIVA>\n                           <DetalleIVA>\n                               <BaseImponible>100</BaseImponible>\n                               <TipoImpositivo>21</TipoImpositivo>\n                               <CuotaImpuesto>21</CuotaImpuesto>\n                           </DetalleIVA>\n                       </DesgloseIVA>\n                   </DetalleNoExenta>\n               </NoExenta>\n           </Sujeta>\n       </DesgloseFactura>\n    </TipoDesglose>\n</Factura>\n<HuellaTBAI>\n    <Software>\n       <LicenciaTBAI>TBAIARCFKHKMdKM00968</LicenciaTBAI>\n        <EntidadDesarrolladora>\n           <NIF>B70912613</NIF>\n        </EntidadDesarrolladora>\n       <Nombre>NEMON INVOCASH</Nombre>\n       <Version>1.0</Version>\n    </Software>\n</HuellaTBAI>\n<ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\" Id=\"id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\">\n  <ds:SignedInfo><ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\n    <ds:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/>\n  <ds:Reference Id=\"ref-ebcb58e7-52a2-56ca-1bb1-c885502e2d4f\" Type=\"http://www.w3.org/2000/09/xmldsig#Object\" URI=\"\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue>26o7LtPw8CSOxfOkTNcqUw/2AN+WgkHH/nryMV5ko28=</ds:DigestValue></ds:Reference><ds:Reference URI=\"#xades-id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\" Type=\"http://uri.etsi.org/01903#SignedProperties\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue>ncZ/xzLUxswfsPAJ3OiV+7ElPC7u6ZGzhYqN0v4nj5o=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id=\"value-id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\">hDQ7o5Clx+GDcxyDmVVCjYROGlXmQsU6DmDKtQA+7nM2eGDC2patNgzxu537vXwbr6EyNhgKWoPwVDvskISmBJJhdgZzVew6dNKdCAp+TtFbKKDerV/iQdt6jMuXYe9twgIEnQt05PUdoSDH0CKGKLO0MerZy25Mskrr98C1iYQSev3zOvLuC4T5zoe7gxvoCXF9P7csVOn0oUHF1XFrSXxCdsgHab/TDmDnsxUsg8ZkfMUzrzhpRbKWI9E2ttmy6ZRiLB3y4GRW0Dn8+D40UbUlZVsL8LPg+w2QiQLN5i0QpyQ4VjU93HvRgXn8bW+hvqphZygdnlE69O5CWxWkZg==</ds:SignatureValue>\n<ds:KeyInfo><ds:X509Data><ds:X509Certificate>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</ds:X509Certificate></ds:X509Data></ds:KeyInfo><ds:Object xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\"><xades:QualifyingProperties xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\" Target=\"#id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\"/><xades:SignedProperties xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\" Id=\"xades-id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\"><xades:SignedSignatureProperties xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:SigningTime>2025-06-09T14:06:19Z</xades:SigningTime><xades:SigningCertificate xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:Cert xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:CertDigest xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:DigestMethod xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><ds:DigestValue xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">p1TLBCwrGRil/Bh1ZwPzfRAr0U0=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509IssuerName xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">CN=AC Representación,OU=CERES,O=FNMT-RCM,C=ES</ds:X509IssuerName><ds:X509SerialNumber xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">1A5E66764645C24C666FF7B0D5103A45</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate><xades:SignaturePolicyIdentifier xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:SignaturePolicyId xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:SigPolicyId><xades:Identifier>https://ticketbai.araba.eus/tbai/sinadura/</xades:Identifier></xades:SigPolicyId><xades:SigPolicyHash xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:DigestMethod xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">4Vk3uExj7tGn9DyUCPDsV9HRmK6KZfYdRiW3StOjcQA=</ds:DigestValue></xades:SigPolicyHash></xades:SignaturePolicyId></xades:SignaturePolicyIdentifier></xades:SignedSignatureProperties></xades:SignedProperties></ds:Object></ds:Signature></T:TicketBai>\n",
                "SignatureValue": "hDQ7o5Clx+GDcxyDmVVCjYROGlXmQsU6DmDKtQA+7nM2eGDC2patNgzxu537vXwbr6EyNhgKWoPwVDvskISmBJJhdgZzVew6dNKdCAp+TtFbKKDerV/iQdt6jMuXYe9twgIEnQt05PUdoSDH0CKGKLO0MerZy25Mskrr98C1iYQSev3zOvLuC4T5zoe7gxvoCXF9P7csVOn0oUHF1XFrSXxCdsgHab/TDmDnsxUsg8ZkfMUzrzhpRbKWI9E2ttmy6ZRiLB3y4GRW0Dn8+D40UbUlZVsL8LPg+w2QiQLN5i0QpyQ4VjU93HvRgXn8bW+hvqphZygdnlE69O5CWxWkZg==",
                "xml_tbai_response": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><ns2:TicketBaiResponse xmlns:ns2=\"urn:ticketbai:emision\"><Salida><IdentificadorTBAI>TBAI-97192097P-090125-hDQ7o5Clx+GDc-009</IdentificadorTBAI><FechaRecepcion>09-06-2025 16:06:21</FechaRecepcion><Estado>00</Estado><Descripcion>Recibido</Descripcion><Azalpena>Jasota</Azalpena><ResultadosValidacion><Codigo>016</Codigo><Descripcion>AVISO: Fecha de recepción muy posterior a Fecha de expedición </Descripcion><Azalpena>OHARRA: Jasotze data bidaltze data baino askoz geroagokoa</Azalpena></ResultadosValidacion><ResultadosValidacion><Codigo>007</Codigo><Descripcion>AVISO: Certificado remitente no válido para emisor factura</Descripcion><Azalpena>OHARRA: Igorlearen ziurtagiria ez da baliozkoa fakturaren jaulkitzailearentzat</Azalpena></ResultadosValidacion></Salida></ns2:TicketBaiResponse>",
                "estado_tbai": "Recibido",
                "estado_registro_tbai": "Registrado",
                "codigo_error_tbai": "016, 007",
                "descripcion_error_tbai": "AVISO: Fecha de recepción muy posterior a Fecha de expedición , AVISO: Certificado remitente no válido para emisor factura",
                "envio_tbai_id": 1,
                "NumSerieDispositivo": null
            }
        ],
        "count": 1
    },
    "pagination": {
        "total": 1,
        "perPage": 10,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Request   

GET api/alta-registro-tbai

Headers

Authorization      

Example: Bearer h4VbacZd8vgfke6E31aP5D6

Content-Type      

Example: application/json

Query Parameters

IDEmisorFactura   string  optional  

El ID del emisor de la factura. Example: A39200019

NumSerieFactura   string  optional  

El número de serie de la factura. Example: AX/202412-1

FechaExpedicionFactura   string  optional  

La fecha de expedición de la factura. Example: 2025-01-01

NifDestinatario   string  optional  

El NIF del destinatario. Example: 123456789

NombreRazonDestinatario   string  optional  

El nombre o razón social del destinatario. Example: Nombre del destinatario

ImporteTotal   number  optional  

El importe total de la factura. Example: 100

tag   string  optional  

El tag de la factura. Example: 123456789

alta_o_anulacion   integer  optional  

El tipo de factura (1(alta)/2(anulación)). Example: 1

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 DcPvVhk18a6abEg634efZd5',
            '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 DcPvVhk18a6abEg634efZd5",
    "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 DcPvVhk18a6abEg634efZd5" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/alta-registro-tbai/1'
headers = {
  'Authorization': 'Bearer DcPvVhk18a6abEg634efZd5',
  '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": "97192097P",
            "NumSerieFactura": "AX/202413-131",
            "NumSerie": "AX/202413",
            "NumFactura": "131",
            "FechaExpedicionFactura": "2025-01-09",
            "HoraExpedicionFactura": "10:00:00",
            "FechaOperacion": null,
            "DescripcionOperacion": null,
            "NombreRazonDestinatario": "IVAN SOLE MARTINEZ",
            "NIFDestinatario": "39707287H",
            "RefExterna": null,
            "CuotaTotal": 21,
            "ImporteTotal": "121",
            "moneda": "EUR",
            "BaseRectificada": null,
            "CuotaRectificada": null,
            "CuotaRecargoRectificada": null,
            "tag": null,
            "webhook_id": null,
            "webhook_log_id": null,
            "verifactu": false,
            "no_verifactu": false,
            "tbai": true,
            "face": 0,
            "json": "{\"IDEmisorFactura\":\"97192097P\",\"VariosDestinatarios\":2,\"EmitidaPorTercODest\":1,\"FacturaSimplificada\":2,\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"131\",\"FechaExpedicionFactura\":\"2025-1-9\",\"HoraExpedicionFactura\":\"10:00:00\",\"NombreRazonEmisor\":\"EMPRESA TEST\",\"DescripcionFactura\":\"Test Desc Factura\",\"Destinatarios\":[{\"NombreRazon\":\"IVAN SOLE MARTINEZ\",\"NIF\":\"39707287H\",\"CodigoPostal\":\"43791\",\"Direccion\":\"C\\/Mirador, 3\"}],\"DetallesFactura\":[{\"Descripcion\":\"Test\",\"Unidades\":10,\"PrecioPorUnidad\":10,\"SubTotal\":100,\"ImporteTotal\":121}],\"Desglose\":[{\"TipoNoExenta\":1,\"TipoImpositivo\":\"21\",\"BaseImponibleOImporteNoSujeto\":\"100\",\"CuotaRepercutida\":\"21\"}],\"Claves\":[1,null,null],\"CuotaTotal\":21,\"ImporteTotal\":121,\"type\":\"tbai\",\"NumSerieFactura\":\"AX\\/202413-131\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"FacturaEmitidaSustSimp\":2,\"remitenteNacional\":true,\"tbai\":true}",
            "base64_pdf": null,
            "base64_qr_pdf": null,
            "url_qr": "https://pruebas-ticketbai.araba.eus/tbai/qrtbai/?id=TBAI-97192097P-090125-hDQ7o5Clx+GDc-009&s=AX/202413&nf=131&i=121&cr=254",
            "qr_image": "base64 qr",
            "qr_x": null,
            "qr_y": null,
            "qr_page": 1,
            "remitenteNacional": 1,
            "next_id": 4,
            "IDVersion": 1,
            "VariosDestinatarios": 2,
            "EmitidaPorTercODest": 1,
            "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 version=\"1.0\" encoding=\"UTF-8\"?>\n<T:TicketBai xmlns:T=\"urn:ticketbai:emision\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.w3.org/2001/XMLSchema ticketbai.xsd\">\n<Cabecera>\n   <IDVersionTBAI>1.2</IDVersionTBAI>\n</Cabecera>\n<Sujetos>\n   <Emisor>\n      <NIF>97192097P</NIF>\n       <ApellidosNombreRazonSocial>TBAI TEST</ApellidosNombreRazonSocial>\n   </Emisor>\n    <Destinatarios>\n       <IDDestinatario>\n           <NIF>39707287H</NIF>\n           <ApellidosNombreRazonSocial>IVAN SOLE MARTINEZ</ApellidosNombreRazonSocial>\n           <CodigoPostal>43791</CodigoPostal>\n           <Direccion>C/Mirador, 3</Direccion>\n       </IDDestinatario>\n    </Destinatarios>\n   <VariosDestinatarios>N</VariosDestinatarios>\n   <EmitidaPorTercerosODestinatario>N</EmitidaPorTercerosODestinatario>\n</Sujetos>\n<Factura>\n    <CabeceraFactura>\n       <SerieFactura>AX/202413</SerieFactura>\n       <NumFactura>131</NumFactura>\n       <FechaExpedicionFactura>09-01-2025</FechaExpedicionFactura>\n       <HoraExpedicionFactura>10:00:00</HoraExpedicionFactura>\n       <FacturaSimplificada>N</FacturaSimplificada>\n    </CabeceraFactura>\n    <DatosFactura>\n       <DescripcionFactura>Test Desc Factura</DescripcionFactura>\n        <DetallesFactura>\n           <IDDetalleFactura>\n               <DescripcionDetalle>Test</DescripcionDetalle>\n               <Cantidad>10</Cantidad>\n               <ImporteUnitario>10</ImporteUnitario>\n               <ImporteTotal>121</ImporteTotal>\n           </IDDetalleFactura>\n    </DetallesFactura>\n       <ImporteTotalFactura>121</ImporteTotalFactura>\n       <Claves>\n           <IDClave>\n               <ClaveRegimenIvaOpTrascendencia>01</ClaveRegimenIvaOpTrascendencia>\n           </IDClave>\n       </Claves>\n    </DatosFactura>\n    <TipoDesglose>\n       <DesgloseFactura>\n           <Sujeta>\n               <NoExenta>\n                   <DetalleNoExenta>\n                       <TipoNoExenta>S1</TipoNoExenta>\n                       <DesgloseIVA>\n                           <DetalleIVA>\n                               <BaseImponible>100</BaseImponible>\n                               <TipoImpositivo>21</TipoImpositivo>\n                               <CuotaImpuesto>21</CuotaImpuesto>\n                           </DetalleIVA>\n                       </DesgloseIVA>\n                   </DetalleNoExenta>\n               </NoExenta>\n           </Sujeta>\n       </DesgloseFactura>\n    </TipoDesglose>\n</Factura>\n<HuellaTBAI>\n    <Software>\n       <LicenciaTBAI>TBAIARCFKHKMdKM00968</LicenciaTBAI>\n        <EntidadDesarrolladora>\n           <NIF>B70912613</NIF>\n        </EntidadDesarrolladora>\n       <Nombre>NEMON INVOCASH</Nombre>\n       <Version>1.0</Version>\n    </Software>\n</HuellaTBAI>\n</T:TicketBai>",
            "xml_signed": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<T:TicketBai xmlns:T=\"urn:ticketbai:emision\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.w3.org/2001/XMLSchema ticketbai.xsd\">\n<Cabecera>\n   <IDVersionTBAI>1.2</IDVersionTBAI>\n</Cabecera>\n<Sujetos>\n   <Emisor>\n      <NIF>97192097P</NIF>\n       <ApellidosNombreRazonSocial>TBAI TEST</ApellidosNombreRazonSocial>\n   </Emisor>\n    <Destinatarios>\n       <IDDestinatario>\n           <NIF>39707287H</NIF>\n           <ApellidosNombreRazonSocial>IVAN SOLE MARTINEZ</ApellidosNombreRazonSocial>\n           <CodigoPostal>43791</CodigoPostal>\n           <Direccion>C/Mirador, 3</Direccion>\n       </IDDestinatario>\n    </Destinatarios>\n   <VariosDestinatarios>N</VariosDestinatarios>\n   <EmitidaPorTercerosODestinatario>N</EmitidaPorTercerosODestinatario>\n</Sujetos>\n<Factura>\n    <CabeceraFactura>\n       <SerieFactura>AX/202413</SerieFactura>\n       <NumFactura>131</NumFactura>\n       <FechaExpedicionFactura>09-01-2025</FechaExpedicionFactura>\n       <HoraExpedicionFactura>10:00:00</HoraExpedicionFactura>\n       <FacturaSimplificada>N</FacturaSimplificada>\n    </CabeceraFactura>\n    <DatosFactura>\n       <DescripcionFactura>Test Desc Factura</DescripcionFactura>\n        <DetallesFactura>\n           <IDDetalleFactura>\n               <DescripcionDetalle>Test</DescripcionDetalle>\n               <Cantidad>10</Cantidad>\n               <ImporteUnitario>10</ImporteUnitario>\n               <ImporteTotal>121</ImporteTotal>\n           </IDDetalleFactura>\n    </DetallesFactura>\n       <ImporteTotalFactura>121</ImporteTotalFactura>\n       <Claves>\n           <IDClave>\n               <ClaveRegimenIvaOpTrascendencia>01</ClaveRegimenIvaOpTrascendencia>\n           </IDClave>\n       </Claves>\n    </DatosFactura>\n    <TipoDesglose>\n       <DesgloseFactura>\n           <Sujeta>\n               <NoExenta>\n                   <DetalleNoExenta>\n                       <TipoNoExenta>S1</TipoNoExenta>\n                       <DesgloseIVA>\n                           <DetalleIVA>\n                               <BaseImponible>100</BaseImponible>\n                               <TipoImpositivo>21</TipoImpositivo>\n                               <CuotaImpuesto>21</CuotaImpuesto>\n                           </DetalleIVA>\n                       </DesgloseIVA>\n                   </DetalleNoExenta>\n               </NoExenta>\n           </Sujeta>\n       </DesgloseFactura>\n    </TipoDesglose>\n</Factura>\n<HuellaTBAI>\n    <Software>\n       <LicenciaTBAI>TBAIARCFKHKMdKM00968</LicenciaTBAI>\n        <EntidadDesarrolladora>\n           <NIF>B70912613</NIF>\n        </EntidadDesarrolladora>\n       <Nombre>NEMON INVOCASH</Nombre>\n       <Version>1.0</Version>\n    </Software>\n</HuellaTBAI>\n<ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\" Id=\"id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\">\n  <ds:SignedInfo><ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/>\n    <ds:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/>\n  <ds:Reference Id=\"ref-ebcb58e7-52a2-56ca-1bb1-c885502e2d4f\" Type=\"http://www.w3.org/2000/09/xmldsig#Object\" URI=\"\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue>26o7LtPw8CSOxfOkTNcqUw/2AN+WgkHH/nryMV5ko28=</ds:DigestValue></ds:Reference><ds:Reference URI=\"#xades-id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\" Type=\"http://uri.etsi.org/01903#SignedProperties\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"/></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue>ncZ/xzLUxswfsPAJ3OiV+7ElPC7u6ZGzhYqN0v4nj5o=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id=\"value-id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\">hDQ7o5Clx+GDcxyDmVVCjYROGlXmQsU6DmDKtQA+7nM2eGDC2patNgzxu537vXwbr6EyNhgKWoPwVDvskISmBJJhdgZzVew6dNKdCAp+TtFbKKDerV/iQdt6jMuXYe9twgIEnQt05PUdoSDH0CKGKLO0MerZy25Mskrr98C1iYQSev3zOvLuC4T5zoe7gxvoCXF9P7csVOn0oUHF1XFrSXxCdsgHab/TDmDnsxUsg8ZkfMUzrzhpRbKWI9E2ttmy6ZRiLB3y4GRW0Dn8+D40UbUlZVsL8LPg+w2QiQLN5i0QpyQ4VjU93HvRgXn8bW+hvqphZygdnlE69O5CWxWkZg==</ds:SignatureValue>\n<ds:KeyInfo><ds:X509Data><ds:X509Certificate>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</ds:X509Certificate></ds:X509Data></ds:KeyInfo><ds:Object xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\"><xades:QualifyingProperties xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\" Target=\"#id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\"/><xades:SignedProperties xmlns:xades=\"http://uri.etsi.org/01903/v1.3.2#\" Id=\"xades-id-095b23d5-f0cf-6d34-a7a9-a559aa37e644\"><xades:SignedSignatureProperties xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:SigningTime>2025-06-09T14:06:19Z</xades:SigningTime><xades:SigningCertificate xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:Cert xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:CertDigest xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:DigestMethod xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><ds:DigestValue xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">p1TLBCwrGRil/Bh1ZwPzfRAr0U0=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509IssuerName xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">CN=AC Representación,OU=CERES,O=FNMT-RCM,C=ES</ds:X509IssuerName><ds:X509SerialNumber xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">1A5E66764645C24C666FF7B0D5103A45</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate><xades:SignaturePolicyIdentifier xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:SignaturePolicyId xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><xades:SigPolicyId><xades:Identifier>https://ticketbai.araba.eus/tbai/sinadura/</xades:Identifier></xades:SigPolicyId><xades:SigPolicyHash xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\"><ds:DigestMethod xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">4Vk3uExj7tGn9DyUCPDsV9HRmK6KZfYdRiW3StOjcQA=</ds:DigestValue></xades:SigPolicyHash></xades:SignaturePolicyId></xades:SignaturePolicyIdentifier></xades:SignedSignatureProperties></xades:SignedProperties></ds:Object></ds:Signature></T:TicketBai>\n",
            "SignatureValue": "hDQ7o5Clx+GDcxyDmVVCjYROGlXmQsU6DmDKtQA+7nM2eGDC2patNgzxu537vXwbr6EyNhgKWoPwVDvskISmBJJhdgZzVew6dNKdCAp+TtFbKKDerV/iQdt6jMuXYe9twgIEnQt05PUdoSDH0CKGKLO0MerZy25Mskrr98C1iYQSev3zOvLuC4T5zoe7gxvoCXF9P7csVOn0oUHF1XFrSXxCdsgHab/TDmDnsxUsg8ZkfMUzrzhpRbKWI9E2ttmy6ZRiLB3y4GRW0Dn8+D40UbUlZVsL8LPg+w2QiQLN5i0QpyQ4VjU93HvRgXn8bW+hvqphZygdnlE69O5CWxWkZg==",
            "xml_tbai_response": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><ns2:TicketBaiResponse xmlns:ns2=\"urn:ticketbai:emision\"><Salida><IdentificadorTBAI>TBAI-97192097P-090125-hDQ7o5Clx+GDc-009</IdentificadorTBAI><FechaRecepcion>09-06-2025 16:06:21</FechaRecepcion><Estado>00</Estado><Descripcion>Recibido</Descripcion><Azalpena>Jasota</Azalpena><ResultadosValidacion><Codigo>016</Codigo><Descripcion>AVISO: Fecha de recepción muy posterior a Fecha de expedición </Descripcion><Azalpena>OHARRA: Jasotze data bidaltze data baino askoz geroagokoa</Azalpena></ResultadosValidacion><ResultadosValidacion><Codigo>007</Codigo><Descripcion>AVISO: Certificado remitente no válido para emisor factura</Descripcion><Azalpena>OHARRA: Igorlearen ziurtagiria ez da baliozkoa fakturaren jaulkitzailearentzat</Azalpena></ResultadosValidacion></Salida></ns2:TicketBaiResponse>",
            "estado_tbai": "Recibido",
            "estado_registro_tbai": "Registrado",
            "codigo_error_tbai": "016, 007",
            "descripcion_error_tbai": "AVISO: Fecha de recepción muy posterior a Fecha de expedición , AVISO: Certificado remitente no válido para emisor factura",
            "envio_tbai_id": 1,
            "NumSerieDispositivo": null
        },
        "count": 1
    }
}
 

Example response (404):


{
    "success": false,
    "code": 404,
    "message": "No se encontró la factura especificada.",
    "data": null
}
 

Request   

GET api/alta-registro-tbai/{id}

Headers

Authorization      

Example: Bearer DcPvVhk18a6abEg634efZd5

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID de la factura que se desea obtener. Example: 1

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 PV5Zdabc46kE1ge3ha8fv6D',
            '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 PV5Zdabc46kE1ge3ha8fv6D",
    "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 PV5Zdabc46kE1ge3ha8fv6D" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/tbai/QR/1'
headers = {
  'Authorization': 'Bearer PV5Zdabc46kE1ge3ha8fv6D',
  '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
}
 

Request   

GET api/tbai/QR/{id}

Headers

Authorization      

Example: Bearer PV5Zdabc46kE1ge3ha8fv6D

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID de la factura que se desea obtener. Example: 1

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/voluptas';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 4e65a1DcaV8E36hbkgdfvPZ',
            '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/voluptas"
);

const headers = {
    "Authorization": "Bearer 4e65a1DcaV8E36hbkgdfvPZ",
    "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/voluptas" \
    --header "Authorization: Bearer 4e65a1DcaV8E36hbkgdfvPZ" \
    --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/voluptas'
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 4e65a1DcaV8E36hbkgdfvPZ',
  '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": "97192097P",
             "NumSerieFactura": "AX/202413-131",
             "NumSerie": "AX/202413",
             "NumFactura": "131",
             "FechaExpedicionFactura": "2025-01-09",
             "HoraExpedicionFactura": "10:00:00",
             "FechaOperacion": null,
             "DescripcionOperacion": null,
             "NombreRazonDestinatario": "IVAN SOLE MARTINEZ",
             "NIFDestinatario": "39707287H",
             "RefExterna": null,
             "CuotaTotal": 21,
             "ImporteTotal": "121",
             "moneda": "EUR",
             "BaseRectificada": null,
             "CuotaRectificada": null,
             "CuotaRecargoRectificada": null,
             "tag": null,
             "webhook_id": null,
             "webhook_log_id": null,
             "verifactu": false,
             "no_verifactu": false,
             "tbai": true,
             "face": 0,
             "json": "{\"IDEmisorFactura\":\"97192097P\",\"VariosDestinatarios\":2,\"EmitidaPorTercODest\":1,\"FacturaSimplificada\":2,\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"131\",\"FechaExpedicionFactura\":\"2025-1-9\",\"HoraExpedicionFactura\":\"10:00:00\",\"NombreRazonEmisor\":\"EMPRESA TEST\",\"DescripcionFactura\":\"Test Desc Factura\",\"Destinatarios\":[{\"NombreRazon\":\"IVAN SOLE MARTINEZ\",\"NIF\":\"39707287H\",\"CodigoPostal\":\"43791\",\"Direccion\":\"C\\/Mirador, 3\"}],\"DetallesFactura\":[{\"Descripcion\":\"Test\",\"Unidades\":10,\"PrecioPorUnidad\":10,\"SubTotal\":100,\"ImporteTotal\":121}],\"Desglose\":[{\"TipoNoExenta\":1,\"TipoImpositivo\":\"21\",\"BaseImponibleOImporteNoSujeto\":\"100\",\"CuotaRepercutida\":\"21\"}],\"Claves\":[1,null,null],\"CuotaTotal\":21,\"ImporteTotal\":121,\"type\":\"tbai\",\"NumSerieFactura\":\"AX\\/202413-131\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"FacturaEmitidaSustSimp\":2,\"remitenteNacional\":true,\"tbai\":true}",
             "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": 4,
             "IDVersion": 1,
             "VariosDestinatarios": 2,
             "EmitidaPorTercODest": 1,
             "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": "No Registrado",
             "estado_registro_tbai": null,
             "codigo_error_tbai": null,
             "descripcion_error_tbai": null,
             "envio_tbai_id": null,
             "NumSerieDispositivo": null
         }
     ]
 }
 

Example response (400):


{
    "success": false,
    "message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/tbai/modificar/{id}

Headers

Authorization      

Example: Bearer 4e65a1DcaV8E36hbkgdfvPZ

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the modificar. Example: voluptas

Body Parameters

IDEmisorFactura   string   

El NIF del emisor. Example: A39200019

NumSerie   string  optional  

optional El número de serie de la factura. Example: AX/202412

NumFactura   string   

El número de factura. Example: 123

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-1-1

HoraExpedicionFactura   string   

La hora de expedición de la factura. Example: 10:00:00

VariosDestinatarios   optional  optional  

Indica si se trata de una factura con varios destinatarios (lista l3).

EmitidaPorTercODesti   optional  optional  

Indica si se trata de una factura emitida por tercero o destinatario (lista l4).

FacturaSimplificada   optional  optional  

Indica si se trata de una factura simplificada (lista l5).

FacturaEmitidaSustSimp   optional  optional  

Indica si se trata de una factura emitida en sustitucion de una simplificada (lista l6).

FechaOperacion   string  optional  

optional Fecha de la operación.

DescripcionFactura   string   

Descripción de la factura. Example: test

Destinatarios   string[]   

Lista de destinatarios de la factura.

*   object  optional  
NombreRazon   string   

Nombre o razón social del destinatario. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del destinatario. Example: "39707287H"

CodigoPostal   string   

Código postal del destinatario. Example: 28001

Direccion   string   

Dirección del destinatario. Example: "Calle de la Princesa 1" //REVISAR OBLIGATORIEDAD DE ESTOS CAMPOS

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

DetallesFactura   string[]   

Lista de detalles de la factura.

*   object  optional  
Descripcion   string   

Descripción de la línea. Example: "Producto 1"

Unidades   integer   

Unidades de la línea. Example: 1

PrecioPorUnidad   integer   

Precio por unidad. Example: 100

SubTotal   integer   

Subtotal de la línea. Example: 100

ImporteTotal   integer   

Importe total de la línea. Example: 100

Descuento   integer   

Importe en euros del descuento.

Desglose   string[]   

Lista de desgloses de la factura.

*   object  optional  
PrestacionServicioOEntrega   optional  optional  

Indica si se trata de una prestación de servicio o entrega cuando el destinatario no es Nacional(1 Prestacion - 2 Entrega).

CausaExcencion   integer  optional  

optional Causa de exención (lista l10).

BaseImponibleOImporteNoSujeto   integer  optional  

optional Base imponible o importe no sujeto.

TipoNoExenta   integer  optional  

optional Tipo de no exención (lista l11). Example: 1

TipoImpositivo   integer  optional  

optional Tipo impositivo aplicado. Example: 21

CuotaRepercutida   integer  optional  

optional Cuota repercutida. Example: 21

TipoRecargoEquivalencia   integer  optional  

optional Porcentaje de recargo de equivalencia. Example: 21

CuotaRecargoEquivalencia   integer  optional  

optional Valor del recargo de equivalencia. Example: 21

OperacionRecEquivORegSimpl   integer  optional  

optional Operación de recargo de equivalencia o registro simplificado (lista l12).

CausaNoSujeta   integer  optional  

optional Causa de no sujeción (lista l13).

ImporteTotal   number   

Importe total de la factura. Example: 121

RetencionSoportada   number  optional  

optional Retenciones soportadas. Example: 21

BaseImponibleACoste   number  optional  

optional Base imponible a coste.

Claves   string[]  optional  

optional Claves de retenciones.

CodigoRectificativa   string  optional  

optional Código de la rectificativa (lista l17).

TipoRectificativa   string  optional  

optional Tipo de rectificativa (lista l8).

BaseRectificada   number  optional  

optional Base rectificada.

CuotaRectificada   number  optional  

optional Cuota rectificada.

CuotaRecargoRectificada   number  optional  

optional Cuota de recargo rectificada.

FacturasSustituidas   string[]  optional  

optional Lista de facturas sustituidas.

*   object  optional  
NumSerie   string   

El número de serie de la factura sustituida. Example: AX/202412

NumFactura   string   

El número de factura de la factura sustituida. Example: 123

FechaExpedicionFactura   string   

La fecha de expedición de la factura sustituida. Example: 2025-1-1

webhook_id   integer  optional  

optional El ID del webhook asociado a la factura.

tag   string  optional  

optional Etiqueta personalizada para la factura. Example: test

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/ullam';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer b4e18Eaga5v3VcdkZ66fDPh',
            '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/subsanar/ullam"
);

const headers = {
    "Authorization": "Bearer b4e18Eaga5v3VcdkZ66fDPh",
    "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/subsanar/ullam" \
    --header "Authorization: Bearer b4e18Eaga5v3VcdkZ66fDPh" \
    --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/subsanar/ullam'
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 b4e18Eaga5v3VcdkZ66fDPh',
  '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": "97192097P",
             "NumSerieFactura": "AX/202413-131",
             "NumSerie": "AX/202413",
             "NumFactura": "131",
             "FechaExpedicionFactura": "2025-01-09",
             "HoraExpedicionFactura": "10:00:00",
             "FechaOperacion": null,
             "DescripcionOperacion": null,
             "NombreRazonDestinatario": "IVAN SOLE MARTINEZ",
             "NIFDestinatario": "39707287H",
             "RefExterna": null,
             "CuotaTotal": 21,
             "ImporteTotal": "121",
             "moneda": "EUR",
             "BaseRectificada": null,
             "CuotaRectificada": null,
             "CuotaRecargoRectificada": null,
             "tag": null,
             "webhook_id": null,
             "webhook_log_id": null,
             "verifactu": false,
             "no_verifactu": false,
             "tbai": true,
             "face": 0,
             "json": "{\"IDEmisorFactura\":\"97192097P\",\"VariosDestinatarios\":2,\"EmitidaPorTercODest\":1,\"FacturaSimplificada\":2,\"NumSerie\":\"AX\\/202413\",\"NumFactura\":\"131\",\"FechaExpedicionFactura\":\"2025-1-9\",\"HoraExpedicionFactura\":\"10:00:00\",\"NombreRazonEmisor\":\"EMPRESA TEST\",\"DescripcionFactura\":\"Test Desc Factura\",\"Destinatarios\":[{\"NombreRazon\":\"IVAN SOLE MARTINEZ\",\"NIF\":\"39707287H\",\"CodigoPostal\":\"43791\",\"Direccion\":\"C\\/Mirador, 3\"}],\"DetallesFactura\":[{\"Descripcion\":\"Test\",\"Unidades\":10,\"PrecioPorUnidad\":10,\"SubTotal\":100,\"ImporteTotal\":121}],\"Desglose\":[{\"TipoNoExenta\":1,\"TipoImpositivo\":\"21\",\"BaseImponibleOImporteNoSujeto\":\"100\",\"CuotaRepercutida\":\"21\"}],\"Claves\":[1,null,null],\"CuotaTotal\":21,\"ImporteTotal\":121,\"type\":\"tbai\",\"NumSerieFactura\":\"AX\\/202413-131\",\"software_tbai_id\":1,\"id_zona_tbai\":1,\"no_verifactu\":false,\"FacturaEmitidaSustSimp\":2,\"remitenteNacional\":true,\"tbai\":true}",
             "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": 4,
             "IDVersion": 1,
             "VariosDestinatarios": 2,
             "EmitidaPorTercODest": 1,
             "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": "No Registrado",
             "estado_registro_tbai": null,
             "codigo_error_tbai": null,
             "descripcion_error_tbai": null,
             "envio_tbai_id": null,
             "NumSerieDispositivo": null
         }
     ]
 }
 

Example response (400):


{
    "success": false,
    "message": "El campo IDEmisorFactura es obligatorio y no puede ser null.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/tbai/subsanar/{id}

Headers

Authorization      

Example: Bearer b4e18Eaga5v3VcdkZ66fDPh

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the subsanar. Example: ullam

Body Parameters

IDEmisorFactura   string   

El NIF del emisor. Example: A39200019

NumSerie   string  optional  

optional El número de serie de la factura. Example: AX/202412

NumFactura   string   

El número de factura. Example: 123

FechaExpedicionFactura   string   

La fecha de expedición de la factura. Example: 2025-1-1

HoraExpedicionFactura   string   

La hora de expedición de la factura. Example: 10:00:00

VariosDestinatarios   optional  optional  

Indica si se trata de una factura con varios destinatarios (lista l3).

EmitidaPorTercODesti   optional  optional  

Indica si se trata de una factura emitida por tercero o destinatario (lista l4).

FacturaSimplificada   optional  optional  

Indica si se trata de una factura simplificada (lista l5).

FacturaEmitidaSustSimp   optional  optional  

Indica si se trata de una factura emitida en sustitucion de una simplificada (lista l6).

FechaOperacion   string  optional  

optional Fecha de la operación.

DescripcionFactura   string   

Descripción de la factura. Example: test

Destinatarios   string[]   

Lista de destinatarios de la factura.

*   object  optional  
NombreRazon   string   

Nombre o razón social del destinatario. Example: "IVAN SOLE MARTINEZ"

NIF   string   

NIF del destinatario. Example: "39707287H"

CodigoPostal   string   

Código postal del destinatario. Example: 28001

Direccion   string   

Dirección del destinatario. Example: "Calle de la Princesa 1" //REVISAR OBLIGATORIEDAD DE ESTOS CAMPOS

OtroCodPais   string  optional  

optional Otro código de país. Example: ES

OtroIDType   string  optional  

optional Otro tipo de identificación (lista l7). Example: 1

OtroID   string  optional  

optional Otro número de identificación. Example: 39707287H

DetallesFactura   string[]   

Lista de detalles de la factura.

*   object  optional  
Descripcion   string   

Descripción de la línea. Example: "Producto 1"

Unidades   integer   

Unidades de la línea. Example: 1

PrecioPorUnidad   integer   

Precio por unidad. Example: 100

SubTotal   integer   

Subtotal de la línea. Example: 100

ImporteTotal   integer   

Importe total de la línea. Example: 100

Descuento   integer   

Importe en euros del descuento.

Desglose   string[]   

Lista de desgloses de la factura.

*   object  optional  
PrestacionServicioOEntrega   optional  optional  

Indica si se trata de una prestación de servicio o entrega cuando el destinatario no es Nacional(1 Prestacion - 2 Entrega).

CausaExcencion   integer  optional  

optional Causa de exención (lista l10).

BaseImponibleOImporteNoSujeto   integer  optional  

optional Base imponible o importe no sujeto.

TipoNoExenta   integer  optional  

optional Tipo de no exención (lista l11). Example: 1

TipoImpositivo   integer  optional  

optional Tipo impositivo aplicado. Example: 21

CuotaRepercutida   integer  optional  

optional Cuota repercutida. Example: 21

TipoRecargoEquivalencia   integer  optional  

optional Porcentaje de recargo de equivalencia. Example: 21

CuotaRecargoEquivalencia   integer  optional  

optional Valor del recargo de equivalencia. Example: 21

OperacionRecEquivORegSimpl   integer  optional  

optional Operación de recargo de equivalencia o registro simplificado (lista l12).

CausaNoSujeta   integer  optional  

optional Causa de no sujeción (lista l13).

ImporteTotal   number   

Importe total de la factura. Example: 121

RetencionSoportada   number  optional  

optional Retenciones soportadas. Example: 21

BaseImponibleACoste   number  optional  

optional Base imponible a coste.

Claves   string[]  optional  

optional Claves de retenciones.

CodigoRectificativa   string  optional  

optional Código de la rectificativa (lista l17).

TipoRectificativa   string  optional  

optional Tipo de rectificativa (lista l8).

BaseRectificada   number  optional  

optional Base rectificada.

CuotaRectificada   number  optional  

optional Cuota rectificada.

CuotaRecargoRectificada   number  optional  

optional Cuota de recargo rectificada.

FacturasSustituidas   string[]  optional  

optional Lista de facturas sustituidas.

*   object  optional  
NumSerie   string   

El número de serie de la factura sustituida. Example: AX/202412

NumFactura   string   

El número de factura de la factura sustituida. Example: 123

FechaExpedicionFactura   string   

La fecha de expedición de la factura sustituida. Example: 2025-1-1

webhook_id   integer  optional  

optional El ID del webhook asociado a la factura.

tag   string  optional  

optional Etiqueta personalizada para la factura. Example: test

Envíos

Verifactu

Endpoints especificos para consultar el estado de los envíos a Verifactu. En verifactu se pueden enviar facturas agrupadas en un mismo envío por este motivo, si quieres consultar facturas en especifico tienes que mirar las lineas de envío.

Listado de envíos Verifactu

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 5v8Va4dfb6c13hZPgaED6ke',
            '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 5v8Va4dfb6c13hZPgaED6ke",
    "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 5v8Va4dfb6c13hZPgaED6ke" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/envios-aeat'
headers = {
  'Authorization': 'Bearer 5v8Va4dfb6c13hZPgaED6ke',
  '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
 }
}
 

Request   

GET api/envios-aeat

Headers

Authorization      

Example: Bearer 5v8Va4dfb6c13hZPgaED6ke

Content-Type      

Example: application/json

Obtener un envío Verifactu

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 84he51DfcbgkPZv6V3daEa6',
            '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 84he51DfcbgkPZv6V3daEa6",
    "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 84he51DfcbgkPZv6V3daEa6" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/envios-aeat/1'
headers = {
  'Authorization': 'Bearer 84he51DfcbgkPZv6V3daEa6',
  '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
}
 

Request   

GET api/envios-aeat/{id}

Headers

Authorization      

Example: Bearer 84he51DfcbgkPZv6V3daEa6

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del envío Verifactu que se desea obtener. Example: 1

Obtener una línea de envío Verifactu

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 61DvVP8cakZfdbEe435gah6',
            '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 61DvVP8cakZfdbEe435gah6",
    "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 61DvVP8cakZfdbEe435gah6" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/envios-aeat/linea/1'
headers = {
  'Authorization': 'Bearer 61DvVP8cakZfdbEe435gah6',
  '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
}
 

Request   

GET api/envios-aeat/linea/{linea_id}

Headers

Authorization      

Example: Bearer 61DvVP8cakZfdbEe435gah6

Content-Type      

Example: application/json

URL Parameters

linea_id   integer   

El ID de la línea Verifactu que se desea obtener. Example: 1

Tbai

Endpoints especificos para consultar el estado de los envíos a Tbai. En tbai se envían facturas individuales por cada envío.

Listado de envíos Tbai

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 fVda6g6haeDPcv814EbkZ53',
            '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 fVda6g6haeDPcv814EbkZ53",
    "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 fVda6g6haeDPcv814EbkZ53" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/envios-tbai'
headers = {
  'Authorization': 'Bearer fVda6g6haeDPcv814EbkZ53',
  '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
 }
}
 

Request   

GET api/envios-tbai

Headers

Authorization      

Example: Bearer fVda6g6haeDPcv814EbkZ53

Content-Type      

Example: application/json

Obtener un envío Tbai

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 h13kef6a5gvPbVE8ZcD6d4a',
            '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 h13kef6a5gvPbVE8ZcD6d4a",
    "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 h13kef6a5gvPbVE8ZcD6d4a" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/envios-tbai/1'
headers = {
  'Authorization': 'Bearer h13kef6a5gvPbVE8ZcD6d4a',
  '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 (403):


{
    "success": false,
    "message": "No tienes acceso a este envío Tbai.",
    "error": 403,
    "code": 403
}
 

Example response (404):


{
    "success": false,
    "message": "No se encontró el envío AEAT especificado.",
    "error": 404,
    "code": 404
}
 

Request   

GET api/envios-tbai/{id}

Headers

Authorization      

Example: Bearer h13kef6a5gvPbVE8ZcD6d4a

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del envío Tbai que se desea obtener. Example: 1

RegistroEventos

Obtener listado de eventos

requires authentication

Muestra una lista con todos los eventos del usuario.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/registro-eventos';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 36kVhca85PZfe1vD64bgadE',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/registro-eventos"
);

const headers = {
    "Authorization": "Bearer 36kVhca85PZfe1vD64bgadE",
    "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/registro-eventos" \
    --header "Authorization: Bearer 36kVhca85PZfe1vD64bgadE" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/registro-eventos'
headers = {
  'Authorization': 'Bearer 36kVhca85PZfe1vD64bgadE',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "RegistroEventos listed successfully",
    "data": {
        "items": [
            {
                "id": 1,
                "previous_id": null,
                "IDVersion": 1,
                "SistemaInformatico_id": 1,
                "ObEmisNombreRazon": "EMPRESA TEST",
                "ObEmisNIF": "A39200019",
                "EmitidaTercODest": null,
                "TercODestNombreRazon": null,
                "TercODestNIF": null,
                "TercODestIDOtroCodigoPais": null,
                "TercODestIDOtroType": null,
                "TercODestIDOtroID": null,
                "FechaHoraHusoGenEvento": "2025-04-24T15:40:10+02:00",
                "TipoEvento": 1,
                "OtrosDatosEvento": null,
                "TipoEventoAnterior": null,
                "FechaHoraHusoGenEventoAnterior": null,
                "HuellaEventoAnterior": null,
                "TipoHuella": 1,
                "HuellaEvento": "38A81273C421F8BDBA5979BC74EDF9015C6F32AE309949DACC913343DB26B653",
                "xml": "<RegistroEventos xmlns:sf=\"http://www.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroInformacion.xsd\">\n   <IDVersion>1.0</IDVersion>\n   <Evento>\n       <sf:SistemaInformatico>\n           <sf:NombreRazon>NEMON INVOICE TO CASH, SL</sf:NombreRazon>\n           <sf:NIF>B70912613</sf:NIF>\n           <sf:NombreSistemaInformatico>NEMON INVOCASH VERIFACTU API</sf:NombreSistemaInformatico>\n           <sf:IdSistemaInformatico>01</sf:IdSistemaInformatico>\n           <sf:Version>1.0</sf:Version>\n           <sf:NumeroInstalacion>20250424154010_357522</sf:NumeroInstalacion>\n           <sf:TipoUsoPosibleSoloVerifactu>N</sf:TipoUsoPosibleSoloVerifactu>\n           <sf:TipoUsoPosibleMultiOT>S</sf:TipoUsoPosibleMultiOT>\n           <sf:IndicadorMultiplesOT>S</sf:IndicadorMultiplesOT>\n       </sf:SistemaInformatico>\n       <ObligadoEmisor>\n           <NombreRazon>EMPRESA TEST</NombreRazon>\n           <NIF>47859447N</NIF>\n       </ObligadoEmisor>\n       <FechaHoraHusoGenEvento>2025-04-24T15:40:10+02:00</FechaHoraHusoGenEvento>\n       <TipoEvento>01</TipoEvento>\n       <OtrosDatosEvento></OtrosDatosEvento>\n       <Encadenamiento>\n           <PrimerEvento>S</PrimerEvento>\n       </Encadenamiento>\n       <TipoHuella>01</TipoHuella>\n       <HuellaEvento>38A81273C421F8BDBA5979BC74EDF9015C6F32AE309949DACC913343DB26B653</HuellaEvento>\n   </Evento>\n</RegistroEventos>",
                "xml_signed": "<?xml version=\"1.0\"?>\n<RegistroEventos xmlns:sf=\"http://www.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroInformacion.xsd\">\n  <IDVersion>1.0</IDVersion>\n  <Evento>\n    <sf:SistemaInformatico>\n      <sf:NombreRazon>NEMON INVOICE TO CASH, SL</sf:NombreRazon>\n      <sf:NIF>B70912613</sf:NIF>\n      <sf:NombreSistemaInformatico>NEMON INVOCASH VERIFACTU API</sf:NombreSistemaInformatico>\n      <sf:IdSistemaInformatico>01</sf:IdSistemaInformatico>\n      <sf:Version>1.0</sf:Version>\n      <sf:NumeroInstalacion>20250424154010_357522</sf:NumeroInstalacion>\n      <sf:TipoUsoPosibleSoloVerifactu>N</sf:TipoUsoPosibleSoloVerifactu>\n      <sf:TipoUsoPosibleMultiOT>S</sf:TipoUsoPosibleMultiOT>\n      <sf:IndicadorMultiplesOT>S</sf:IndicadorMultiplesOT>\n    </sf:SistemaInformatico>\n    <ObligadoEmisor>\n      <NombreRazon>EMPRESA TEST</NombreRazon>\n      <NIF>47859447N</NIF>\n    </ObligadoEmisor>\n    <FechaHoraHusoGenEvento>2025-04-24T15:40:10+02:00</FechaHoraHusoGenEvento>\n    <TipoEvento>01</TipoEvento>\n    <OtrosDatosEvento/>\n    <Encadenamiento>\n      <PrimerEvento>S</PrimerEvento>\n    </Encadenamiento>\n    <TipoHuella>01</TipoHuella>\n    <HuellaEvento>38A81273C421F8BDBA5979BC74EDF9015C6F32AE309949DACC913343DB26B653</HuellaEvento>\n    <ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\n      <ds:SignedInfo>\n        <ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/>\n        <ds:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/>\n        <ds:Reference URI=\"\">\n          <ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/>\n          <ds:DigestValue>+T0nm0R3hy4/EwnzXTPN5pdUjSEH6GP+dgjFsrnqMJw=</ds:DigestValue>\n        </ds:Reference>\n      </ds:SignedInfo>\n      <ds:SignatureValue>TPLqf09G0z3OMBc8p/i206wA57JSASrr0k3DxiTd9dJ2B4LAlLq7s+56CM5LIoNVWCGNZt3rA3cb5ar1pSTut/uas2JcrGiZ6C7lC5jR1RRPWEtn9zGtADTmWeZOnlBqKQ3UUYwIH37B0BUcZN5rzQ3c1OJxZYYl1tYmR03yOj3a6yZKvTz6lYDMYGFkTJ1AHoYiLCh4UNgCW8E7jQIxjuxROvwc+HMl0kPU5W1SdoMuBU/wVfASA1DJxQIZAhEcAIcQK2khUu4/6ujvdpnW8Po51U7kmfZrQo42fxYUWYT6Y8Z8Ul8JPZKk8TEonl1HTv+U1pLHof5VYDFKn4vaHw==</ds:SignatureValue>\n      <ds:KeyInfo>\n        <ds:X509Data>\n          <ds:X509Certificate>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</ds:X509Certificate>\n        </ds:X509Data>\n      </ds:KeyInfo>\n    </ds:Signature>\n  </Evento>\n</RegistroEventos>\n",
                "Signature": "TPLqf09G0z3OMBc8p/i206wA57JSASrr0k3DxiTd9dJ2B4LAlLq7s+56CM5LIoNVWCGNZt3rA3cb5ar1pSTut/uas2JcrGiZ6C7lC5jR1RRPWEtn9zGtADTmWeZOnlBqKQ3UUYwIH37B0BUcZN5rzQ3c1OJxZYYl1tYmR03yOj3a6yZKvTz6lYDMYGFkTJ1AHoYiLCh4UNgCW8E7jQIxjuxROvwc+HMl0kPU5W1SdoMuBU/wVfASA1DJxQIZAhEcAIcQK2khUu4/6ujvdpnW8Po51U7kmfZrQo42fxYUWYT6Y8Z8Ul8JPZKk8TEonl1HTv+U1pLHof5VYDFKn4vaHw==",
                "Signature2": "TPLqf09G0z3OMBc8p/i206wA57JSASrr0k3DxiTd9dJ2B4LAlLq7s+56CM5LIoNVWCGNZt3rA3cb5ar1pSTut/uas2JcrGiZ6C7lC5jR1RRPWEtn9zGtADTmWeZOnlBqKQ3UUYwIH37B0BUcZN5rzQ3c1OJxZYYl1tYmR03yOj3a6yZKvTz6lYDMYGFkTJ1AHoYiLCh4UNgCW8E7jQIxjuxROvwc+HMl0kPU5W1SdoMuBU/wVfASA1DJxQIZAhEcAIcQK2khUu4/6ujvdpnW8Po51U7kmfZrQo42fxYUWYT6Y8Z8Ul8JPZKk8TEonl1HTv+U1pLHof5VYDFKn4vaHw==",
                "created_at": "2025-04-24T13:40:10.000000Z",
                "updated_at": "2025-04-24T13:40:10.000000Z",
                "deleted_at": null
            }
        ],
        "count": 6
    },
    "pagination": {
        "total": 6,
        "perPage": 10,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Request   

GET api/registro-eventos

Headers

Authorization      

Example: Bearer 36kVhca85PZfe1vD64bgadE

Content-Type      

Example: application/json

Obtener un evento por id

requires authentication

Muestra los datos de un evento filtrando por el ID.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/registro-eventos/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Vea34cfh6kE6aZD5bv18Pdg',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/registro-eventos/1"
);

const headers = {
    "Authorization": "Bearer Vea34cfh6kE6aZD5bv18Pdg",
    "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/registro-eventos/1" \
    --header "Authorization: Bearer Vea34cfh6kE6aZD5bv18Pdg" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/registro-eventos/1'
headers = {
  'Authorization': 'Bearer Vea34cfh6kE6aZD5bv18Pdg',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "RegistroEventos obtained successfully",
    "data": {
        "items": {
            "id": 2,
            "previous_id": 1,
            "IDVersion": 1,
            "SistemaInformatico_id": 2,
            "ObEmisNombreRazon": "EMPRESA TEST",
            "ObEmisNIF": "A39200019",
            "EmitidaTercODest": null,
            "TercODestNombreRazon": null,
            "TercODestNIF": null,
            "TercODestIDOtroCodigoPais": null,
            "TercODestIDOtroType": null,
            "TercODestIDOtroID": null,
            "FechaHoraHusoGenEvento": "2025-04-24T15:42:06+02:00",
            "TipoEvento": 3,
            "OtrosDatosEvento": null,
            "TipoEventoAnterior": 1,
            "FechaHoraHusoGenEventoAnterior": "2025-04-24T15:40:10+02:00",
            "HuellaEventoAnterior": "38A81273C421F8BDBA5979BC74EDF9015C6F32AE309949DACC913343DB26B653",
            "TipoHuella": 1,
            "HuellaEvento": "FE6A231664CF92DE7BBB666DE5D48E33565769654A785B542DE99CD1FA131E95",
            "xml": "<RegistroEventos xmlns:sf=\"http://www.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroInformacion.xsd\">\n   <IDVersion>1.0</IDVersion>\n   <Evento>\n       <sf:SistemaInformatico>\n           <sf:NombreRazon>NEMON INVOICE TO CASH, SL</sf:NombreRazon>\n           <sf:NIF>B70912613</sf:NIF>\n           <sf:NombreSistemaInformatico>NEMON INVOCASH VERIFACTU API</sf:NombreSistemaInformatico>\n           <sf:IdSistemaInformatico>01</sf:IdSistemaInformatico>\n           <sf:Version>1.0</sf:Version>\n           <sf:NumeroInstalacion>20250424154010_357522</sf:NumeroInstalacion>\n           <sf:TipoUsoPosibleSoloVerifactu>N</sf:TipoUsoPosibleSoloVerifactu>\n           <sf:TipoUsoPosibleMultiOT>S</sf:TipoUsoPosibleMultiOT>\n           <sf:IndicadorMultiplesOT>S</sf:IndicadorMultiplesOT>\n       </sf:SistemaInformatico>\n       <ObligadoEmisor>\n           <NombreRazon>EMPRESA TEST</NombreRazon>\n           <NIF>47859447N</NIF>\n       </ObligadoEmisor>\n       <FechaHoraHusoGenEvento>2025-04-24T15:42:06+02:00</FechaHoraHusoGenEvento>\n       <TipoEvento>03</TipoEvento>\n       <DatopsPropiosEvento>\n            <LanzamientoProcesoDeteccionAnomaliasRegFacturacion>\n               <RealizadoProcesoSobreIntegridadHuellasRegFacturacion>N</RealizadoProcesoSobreIntegridadHuellasRegFacturacion>\n               <RealizadoProcesoSobreIntegridadFirmasRegFacturacion>N</RealizadoProcesoSobreIntegridadFirmasRegFacturacion>\n               <RealizadoProcesoSobreTrazabilidadCadenaRegFacturacion>S</RealizadoProcesoSobreTrazabilidadCadenaRegFacturacion>\n               <NumeroDeRegistrosFacturacionProcesadosSobreTrazabilidadCadena>1</NumeroDeRegistrosFacturacionProcesadosSobreTrazabilidadCadena>\n               <RealizadoProcesoSobreTrazabilidadFechasRegFacturacion>N</RealizadoProcesoSobreTrazabilidadFechasRegFacturacion>\n           </LanzamientoProcesoDeteccionAnomaliasRegFacturacion>\n       </DatopsPropiosEvento>\n       <OtrosDatosEvento></OtrosDatosEvento>\n       <Encadenamiento>\n           <EventoAnterior>\n               <TipoEvento>01</TipoEvento>\n               <FechaHoraHusoGenEvento>2025-04-24T15:40:10+02:00</FechaHoraHusoGenEvento>\n               <HuellaEvento>38A81273C421F8BDBA5979BC74EDF9015C6F32AE309949DACC913343DB26B653</HuellaEvento>\n           </EventoAnterior>\n       </Encadenamiento>\n       <TipoHuella>01</TipoHuella>\n       <HuellaEvento>FE6A231664CF92DE7BBB666DE5D48E33565769654A785B542DE99CD1FA131E95</HuellaEvento>\n   </Evento>\n</RegistroEventos>",
            "xml_signed": "<?xml version=\"1.0\"?>\n<RegistroEventos xmlns:sf=\"http://www.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroInformacion.xsd\">\n  <IDVersion>1.0</IDVersion>\n  <Evento>\n    <sf:SistemaInformatico>\n      <sf:NombreRazon>NEMON INVOICE TO CASH, SL</sf:NombreRazon>\n      <sf:NIF>B70912613</sf:NIF>\n      <sf:NombreSistemaInformatico>NEMON INVOCASH VERIFACTU API</sf:NombreSistemaInformatico>\n      <sf:IdSistemaInformatico>01</sf:IdSistemaInformatico>\n      <sf:Version>1.0</sf:Version>\n      <sf:NumeroInstalacion>20250424154010_357522</sf:NumeroInstalacion>\n      <sf:TipoUsoPosibleSoloVerifactu>N</sf:TipoUsoPosibleSoloVerifactu>\n      <sf:TipoUsoPosibleMultiOT>S</sf:TipoUsoPosibleMultiOT>\n      <sf:IndicadorMultiplesOT>S</sf:IndicadorMultiplesOT>\n    </sf:SistemaInformatico>\n    <ObligadoEmisor>\n      <NombreRazon>EMPRESA TEST</NombreRazon>\n      <NIF>47859447N</NIF>\n    </ObligadoEmisor>\n    <FechaHoraHusoGenEvento>2025-04-24T15:42:06+02:00</FechaHoraHusoGenEvento>\n    <TipoEvento>03</TipoEvento>\n    <DatopsPropiosEvento>\n      <LanzamientoProcesoDeteccionAnomaliasRegFacturacion>\n        <RealizadoProcesoSobreIntegridadHuellasRegFacturacion>N</RealizadoProcesoSobreIntegridadHuellasRegFacturacion>\n        <RealizadoProcesoSobreIntegridadFirmasRegFacturacion>N</RealizadoProcesoSobreIntegridadFirmasRegFacturacion>\n        <RealizadoProcesoSobreTrazabilidadCadenaRegFacturacion>S</RealizadoProcesoSobreTrazabilidadCadenaRegFacturacion>\n        <NumeroDeRegistrosFacturacionProcesadosSobreTrazabilidadCadena>1</NumeroDeRegistrosFacturacionProcesadosSobreTrazabilidadCadena>\n        <RealizadoProcesoSobreTrazabilidadFechasRegFacturacion>N</RealizadoProcesoSobreTrazabilidadFechasRegFacturacion>\n      </LanzamientoProcesoDeteccionAnomaliasRegFacturacion>\n    </DatopsPropiosEvento>\n    <OtrosDatosEvento/>\n    <Encadenamiento>\n      <EventoAnterior>\n        <TipoEvento>01</TipoEvento>\n        <FechaHoraHusoGenEvento>2025-04-24T15:40:10+02:00</FechaHoraHusoGenEvento>\n        <HuellaEvento>38A81273C421F8BDBA5979BC74EDF9015C6F32AE309949DACC913343DB26B653</HuellaEvento>\n      </EventoAnterior>\n    </Encadenamiento>\n    <TipoHuella>01</TipoHuella>\n    <HuellaEvento>FE6A231664CF92DE7BBB666DE5D48E33565769654A785B542DE99CD1FA131E95</HuellaEvento>\n    <ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\n      <ds:SignedInfo>\n        <ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/>\n        <ds:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/>\n        <ds:Reference URI=\"\">\n          <ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/>\n          <ds:DigestValue>CePuedoTyzVXJOU5A46R1NyznUPx7wUtnUVEDL9Z3nM=</ds:DigestValue>\n        </ds:Reference>\n      </ds:SignedInfo>\n      <ds:SignatureValue>o0HLX/eLHYOGjXbPnhK4BrolGcv3FbSB1kQokaxTroQNIOzOEDzgakeK4Yo2b31twTQiRCl4SXj2ZgsQJEkFZP/FkKdLBQs3ip+qJXm41K9FCgMx9a7uMa0zgjzpOyLLbQUQj0dfCPgkjvoLWFhNhRn4u3rl6GpTzBbuGlo8Bs5gcF1LG1478xQ8D5AizyJp3I3M4hcIL6QEYJC46VWqlHx9qR0qPrN/+q8arUaSZQNBqlj33/JOwGBU/iv5w3ucBR3/HAeJevX9aZYbUck2qYuCSeJJdx3mzwZmz7+udlCcNAK8wNcu3vaJ+nXq2DOgs1uT9sfQQ3XldlZmo+MskQ==</ds:SignatureValue>\n      <ds:KeyInfo>\n        <ds:X509Data>\n          <ds:X509Certificate>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</ds:X509Certificate>\n        </ds:X509Data>\n      </ds:KeyInfo>\n    </ds:Signature>\n  </Evento>\n</RegistroEventos>\n",
            "Signature": "o0HLX/eLHYOGjXbPnhK4BrolGcv3FbSB1kQokaxTroQNIOzOEDzgakeK4Yo2b31twTQiRCl4SXj2ZgsQJEkFZP/FkKdLBQs3ip+qJXm41K9FCgMx9a7uMa0zgjzpOyLLbQUQj0dfCPgkjvoLWFhNhRn4u3rl6GpTzBbuGlo8Bs5gcF1LG1478xQ8D5AizyJp3I3M4hcIL6QEYJC46VWqlHx9qR0qPrN/+q8arUaSZQNBqlj33/JOwGBU/iv5w3ucBR3/HAeJevX9aZYbUck2qYuCSeJJdx3mzwZmz7+udlCcNAK8wNcu3vaJ+nXq2DOgs1uT9sfQQ3XldlZmo+MskQ==",
            "Signature2": "o0HLX/eLHYOGjXbPnhK4BrolGcv3FbSB1kQokaxTroQNIOzOEDzgakeK4Yo2b31twTQiRCl4SXj2ZgsQJEkFZP/FkKdLBQs3ip+qJXm41K9FCgMx9a7uMa0zgjzpOyLLbQUQj0dfCPgkjvoLWFhNhRn4u3rl6GpTzBbuGlo8Bs5gcF1LG1478xQ8D5AizyJp3I3M4hcIL6QEYJC46VWqlHx9qR0qPrN/+q8arUaSZQNBqlj33/JOwGBU/iv5w3ucBR3/HAeJevX9aZYbUck2qYuCSeJJdx3mzwZmz7+udlCcNAK8wNcu3vaJ+nXq2DOgs1uT9sfQQ3XldlZmo+MskQ==",
            "created_at": "2025-04-24T13:42:06.000000Z",
            "updated_at": "2025-04-24T13:42:06.000000Z",
            "deleted_at": null,
            "anomalias": {
                "id": 1,
                "registro_eventos_id": 2,
                "ProcesoIntegridadHuellas": 2,
                "NumeroDeProcesadosHuellas": null,
                "ProcesoIntegridadFirmas": 2,
                "NumeroDeProcesadosFirmas": null,
                "ProcesoTrazabilidadCadena": 1,
                "NumeroDeProcesadosCadena": 1,
                "ProcesoTrazabilidadFechas": 2,
                "NumeroDeProcesadosFechas": null,
                "TipoAnomalia": null,
                "OtrosDatosAnomalia": null,
                "IDEmisorFactura": null,
                "NumeroFactura": null,
                "FechaExpedicionFactura": null,
                "TipoEvento": 3,
                "FechaHoraHusoGenEvento": null,
                "HuellaEvento": null,
                "created_at": "2025-04-24T13:42:06.000000Z",
                "updated_at": "2025-04-24T13:42:06.000000Z",
                "deleted_at": null
            },
            "exp_res": null
        },
        "count": 1
    }
}
 

Example response (404):


{
    "success": false,
    "code": 404,
    "message": "No se encontró el evento especificado.",
    "data": null
}
 

Request   

GET api/registro-eventos/{id}

Headers

Authorization      

Example: Bearer Vea34cfh6kE6aZD5bv18Pdg

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del evento que se desea obtener. Example: 1

Listas

Verifactu

Listas especificas de Verifactu.

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 akVaZ4gP36vD5d18fE6bceh',
            '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 akVaZ4gP36vD5d18fE6bceh",
    "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 akVaZ4gP36vD5d18fE6bceh" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/listas'
headers = {
  'Authorization': 'Bearer akVaZ4gP36vD5d18fE6bceh',
  '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
    }
}
 

Request   

GET api/listas

Headers

Authorization      

Example: Bearer akVaZ4gP36vD5d18fE6bceh

Content-Type      

Example: application/json

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 6EvDk86fhbec1daVZP45ag3',
            '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 6EvDk86fhbec1daVZP45ag3",
    "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 6EvDk86fhbec1daVZP45ag3" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/listas/l1'
headers = {
  'Authorization': 'Bearer 6EvDk86fhbec1daVZP45ag3',
  '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
}
 

Request   

GET api/listas/{lista}

Headers

Authorization      

Example: Bearer 6EvDk86fhbec1daVZP45ag3

Content-Type      

Example: application/json

URL Parameters

lista   string   

El nombre de la lista que se desea obtener. Example: l1

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 aP81hfk6EZV3cavg64bde5D',
            '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 aP81hfk6EZV3cavg64bde5D",
    "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 aP81hfk6EZV3cavg64bde5D" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/listas/l1/01'
headers = {
  'Authorization': 'Bearer aP81hfk6EZV3cavg64bde5D',
  '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
}
 

Request   

GET api/listas/{lista}/{valor}

Headers

Authorization      

Example: Bearer aP81hfk6EZV3cavg64bde5D

Content-Type      

Example: application/json

URL Parameters

lista   string   

El nombre de la lista donde se encuentra el valor. Example: l1

valor   string   

El valor de la linea de la lista que se desea obtener. Example: 01

Tbai

Listas especificas de Tbai.

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 egavcEDfPVa8kbZd661453h',
            '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 egavcEDfPVa8kbZd661453h",
    "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 egavcEDfPVa8kbZd661453h" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/listas-tbai'
headers = {
  'Authorization': 'Bearer egavcEDfPVa8kbZd661453h',
  '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
    }
}
 

Request   

GET api/listas-tbai

Headers

Authorization      

Example: Bearer egavcEDfPVa8kbZd661453h

Content-Type      

Example: application/json

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 kh4663fPZga5b8Dcdeav1EV',
            '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 kh4663fPZga5b8Dcdeav1EV",
    "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 kh4663fPZga5b8Dcdeav1EV" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/listas-tbai/l0'
headers = {
  'Authorization': 'Bearer kh4663fPZga5b8Dcdeav1EV',
  '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
}
 

Request   

GET api/listas-tbai/{lista}

Headers

Authorization      

Example: Bearer kh4663fPZga5b8Dcdeav1EV

Content-Type      

Example: application/json

URL Parameters

lista   string   

El nombre de la lista que se desea obtener. Example: l0

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 c65fdkZabaVEhvg3PD4e186',
            '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 c65fdkZabaVEhvg3PD4e186",
    "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 c65fdkZabaVEhvg3PD4e186" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/listas-tbai/l0/1.2'
headers = {
  'Authorization': 'Bearer c65fdkZabaVEhvg3PD4e186',
  '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
}
 

Request   

GET api/listas-tbai/{lista}/{valor}

Headers

Authorization      

Example: Bearer c65fdkZabaVEhvg3PD4e186

Content-Type      

Example: application/json

URL Parameters

lista   string   

El nombre de la lista donde se encuentra el valor. Example: l0

valor   string   

El valor de la linea de la lista que se desea obtener. Example: 1.2

Webhook

Listado de Webhooks

requires authentication

Muestra un listado con todos los webhooks vinculados al usuario actual.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer a18eZcvh36Ed4Vg5PfD6kab',
            '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 a18eZcvh36Ed4Vg5PfD6kab",
    "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 a18eZcvh36Ed4Vg5PfD6kab" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/webhook'
headers = {
  'Authorization': 'Bearer a18eZcvh36Ed4Vg5PfD6kab',
  '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
 }
 }
}
 

Request   

GET api/webhook

Headers

Authorization      

Example: Bearer a18eZcvh36Ed4Vg5PfD6kab

Content-Type      

Example: application/json

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 h3P1k5eaa6Z8E6VDdbfvc4g',
            '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 h3P1k5eaa6Z8E6VDdbfvc4g",
    "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 h3P1k5eaa6Z8E6VDdbfvc4g" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/webhook/1'
headers = {
  'Authorization': 'Bearer h3P1k5eaa6Z8E6VDdbfvc4g',
  '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
}
 

Request   

GET api/webhook/{id}

Headers

Authorization      

Example: Bearer h3P1k5eaa6Z8E6VDdbfvc4g

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del webhook que se desea obtener. Example: 1

Crear un webhook

requires authentication

Crea un nuevo webhook vinculado al usuario actual.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer vPe4351gZEDkaVf6bhd6c8a',
            '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 vPe4351gZEDkaVf6bhd6c8a",
    "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 vPe4351gZEDkaVf6bhd6c8a" \
    --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 vPe4351gZEDkaVf6bhd6c8a',
  '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
}
 

Request   

POST api/webhook

Headers

Authorization      

Example: Bearer vPe4351gZEDkaVf6bhd6c8a

Content-Type      

Example: application/json

Body Parameters

url   string   

La URL del webhook. Example: https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}

http_method   string  optional  

El método HTTP del webhook. Example: POST

headers   object  optional  

optional Los headers del webhook.

secret_key   string   

La clave secreta del webhook. Example: m7&A,$'(6qYjg+BZ#su_3!

tag   string  optional  

optional La etiqueta del webhook. Example: emisor_1

description   string  optional  

optional La descripción del webhook. Example: Webhook para el emisor 1

Actualizar un webhook

requires authentication

Actualiza un webhook existente.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook/occaecati';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer VDfcZ1abv586hk43dPe6aEg',
            '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"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/webhook/occaecati"
);

const headers = {
    "Authorization": "Bearer VDfcZ1abv586hk43dPe6aEg",
    "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"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request PUT \
    "https://app.verifactuapi.es/api/webhook/occaecati" \
    --header "Authorization: Bearer VDfcZ1abv586hk43dPe6aEg" \
    --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\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/webhook/occaecati'
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"
}
headers = {
  'Authorization': 'Bearer VDfcZ1abv586hk43dPe6aEg',
  '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
}
 

Request   

PUT api/webhook/{webhook}

Headers

Authorization      

Example: Bearer VDfcZ1abv586hk43dPe6aEg

Content-Type      

Example: application/json

URL Parameters

webhook   string   

The webhook. Example: occaecati

id   integer   

El ID del webhook que se desea actualizar. Example: 1

Body Parameters

url   string   

La URL del webhook. Example: https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}

http_method   string  optional  

El método HTTP del webhook. Example: POST

secret_key   string   

La clave secreta del webhook. Example: m7&A,$'(6qYjg+BZ#su_3!

tag   string  optional  

optional La etiqueta del webhook. Example: emisor_2

Status

Server Status

Devuelve el estado del servidor.

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):


{
    "status": "UP",
    "message": "Server is running normally",
    "timestamp": "2025-01-16 12:00:00",
    "code": "200"
}
 

Example response (500):


{
    "success": false,
    "status": "DOWN",
    "message": "Server is down",
    "code": 500
}
 

Request   

GET api/status

Headers

Content-Type      

Example: application/json

SoftwareTBAI

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/dolor';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer kc5ea4d8VP6fEbZ6D1vah3g',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/software-tbai/dolor"
);

const headers = {
    "Authorization": "Bearer kc5ea4d8VP6fEbZ6D1vah3g",
    "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/dolor" \
    --header "Authorization: Bearer kc5ea4d8VP6fEbZ6D1vah3g" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/software-tbai/dolor'
headers = {
  'Authorization': 'Bearer kc5ea4d8VP6fEbZ6D1vah3g',
  '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
}
 

Request   

GET api/software-tbai/{type}

Headers

Authorization      

Example: Bearer kc5ea4d8VP6fEbZ6D1vah3g

Content-Type      

Example: application/json

URL Parameters

type   string   

Example: dolor