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 a5PVb6aEDdgh8134efZ6vck',
            'Content-Type' => 'application/json',
        ],
        'query' => [
            'nif' => 'P1716358E',
            'nombre' => 'Nombre del emisor',
            'type' => 'verifactu',
            'id_zona_tbai' => '1',
            'id_emisor_autofactura' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/emisor"
);

const params = {
    "nif": "P1716358E",
    "nombre": "Nombre del emisor",
    "type": "verifactu",
    "id_zona_tbai": "1",
    "id_emisor_autofactura": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://app.verifactuapi.es/api/emisor?nif=P1716358E&nombre=Nombre+del+emisor&type=verifactu&id_zona_tbai=1&id_emisor_autofactura=1" \
    --header "Authorization: Bearer a5PVb6aEDdgh8134efZ6vck" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor'
params = {
  'nif': 'P1716358E',
  'nombre': 'Nombre del emisor',
  'type': 'verifactu',
  'id_zona_tbai': '1',
  'id_emisor_autofactura': '1',
}
headers = {
  'Authorization': 'Bearer a5PVb6aEDdgh8134efZ6vck',
  '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 a5PVb6aEDdgh8134efZ6vck

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

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

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

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

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

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

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

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/emisor" \
    --header "Authorization: Bearer 4fbeEVdPka5v636hacg81DZ" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"P1716358E\",
    \"nombre\": \"Nombre del emisor\",
    \"cp\": \"43791\",
    \"default_webhook_id\": 1
}"
import requests
import json

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

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

emisor_autofactura   string  optional  

El NIF/CIF del emisor que genera la autofactura.

Actualizar un emisor

requires authentication

Permite actualizar el nombre, el cp y el webhook por defecto de un emisor

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

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

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

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request PUT \
    "https://app.verifactuapi.es/api/emisor/1" \
    --header "Authorization: Bearer fba5e6Za8VD3gdh14PvE6kc" \
    --header "Content-Type: application/json" \
    --data "{
    \"nombre\": \"Nombre del emisor\",
    \"cp\": \"12345\",
    \"default_webhook_id\": 1
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/1'
payload = {
    "nombre": "Nombre del emisor",
    "cp": "12345",
    "default_webhook_id": 1
}
headers = {
  'Authorization': 'Bearer fba5e6Za8VD3gdh14PvE6kc',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
 "success": true,
 "message": "Emisor updated successfully",
 "code": 200,
 "data": {
     "count": 1,
     "items": [
         {
             "id": 1,
             "nif": "A39200019",
             "nombre": "EMPRESA TEST",
             "created_at": "2025-06-09T08:49:53.000000Z",
             "updated_at": "2025-06-09T08:49:53.000000Z",
             "deleted_at": null,
             "representante_razon_social": null,
             "representante_nif": null,
             "default_webhook_id": null,
             "enviar_aeat": true,
             "sistema_informatico_id": 1,
             "cp": "43791",
             "type": "verifactu",
             "id_zona_tbai": null,
             "test_production": "t",
             "production_since": null,
             "datos_otorgamiento": null,
             "datos_otorgamiento_representante": null,
             "otorgamiento_base64": null,
             "otorgamiento_importado_base64": null,
             "otorgamiento_adjunto_base64": null,
             "otorgamiento_validado": "pendiente",
             "motivo_rechazo": null,
             "software_tbai": null
         }
     ]
 }
 

Example response (400):


{
 "success": false,
 "message": "El campo CP debe ser una cadena de texto formada por 5 números",
 "error": 400,
 "code": 400
 

Request   

PUT api/emisor/{id}

Headers

Authorization      

Example: Bearer fba5e6Za8VD3gdh14PvE6kc

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

default_webhook_id   integer  optional  

El ID del webhook por defecto. Example: 1

Pasar a produccion

Pasar a produccion

requires authentication

Pasar un emisor a produccion

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

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

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor. Example: 1

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

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

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

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

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

Verifactu

Listas

Listar listas

requires authentication

Muestra un listado con los nombres de todas las listas de Verifactu.

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

url = 'https://app.verifactuapi.es/api/listas'
headers = {
  'Authorization': 'Bearer bh5Da1kdP6a436EVvZg8efc',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Nombres de listas listed successfully",
    "data": {
        "items": [
            "l1",
            "l10",
            "l12",
            "l14",
            "l15",
            "l16",
            "l17",
            "l1e",
            "l2",
            "l2e",
            "l3",
            "l3e",
            "l4",
            "l4e",
            "l5",
            "l6",
            "l7",
            "l8a",
            "l8b",
            "l9"
        ],
        "count": 20
    },
    "pagination": {
        "total": 1,
        "perPage": 1,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Example response (404):


{
    "success": false,
    "message": "No se encontraron listas para el tipo especificado.",
    "error": 404,
    "code": 404
}
 

Request   

GET api/listas

Headers

Authorization      

Example: Bearer bh5Da1kdP6a436EVvZg8efc

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

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

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

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

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

Alta Registros Facturacion

Registrar una factura de Verifactu.

requires authentication

Registra una nuevo registro de factura en la base de datos para ser procesada y enviada.

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

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

Example response (201):


{
    "success": true,
    "message": "AltaRegistroFacturacion created successfully",
    "code": 201,
    "data": {
        "count": 1,
        "items": [
            {
                "id": 2,
                "previous_id": null,
                "alta_o_anulacion": 1,
                "id_registro_anulado": null,
                "modificacionOSubsanacion": null,
                "id_registro_modificadoOSubsanado": null,
                "IDEmisorFactura": "A39200019",
                "NumSerieFactura": "2025/002",
                "NumSerie": null,
                "NumFactura": null,
                "FechaExpedicionFactura": "2025-12-16",
                "HoraExpedicionFactura": null,
                "FechaOperacion": null,
                "DescripcionOperacion": "TEST",
                "NombreRazonDestinatario": null,
                "NIFDestinatario": null,
                "RefExterna": null,
                "CuotaTotal": 21,
                "ImporteTotal": 121,
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": null,
                "webhook_id": null,
                "verifactu": true,
                "no_verifactu": false,
                "tbai": false,
                "face": 0,
                "json": "JSON recibido por la API",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=2025/002&fecha=18-09-2025&importe=121",
                "qr_image": "QR formato base64",
                "qr_x": null,
                "qr_y": null,
                "qr_page": 1,
                "remitenteNacional": 1,
                "next_id": null,
                "IDVersion": 1,
                "Subsanacion": 2,
                "RechazoPrevio": 1,
                "TipoFactura": 2,
                "TipoRectificativa": null,
                "FacturaSimplificadaArt7273": 2,
                "FacturaSinIdentifDestinatarioArt61d": 2,
                "Macrodato": 2,
                "EmitidaPorTercODesti": null,
                "TercNombreRazon": null,
                "TercNIF": null,
                "TercOtroCodPais": null,
                "TercOtroIDType": null,
                "TercOtroID": null,
                "Cupon": 2,
                "SinRegistroPrevio": null,
                "RechazoPrevioA": 1,
                "GeneradoPor": null,
                "Generador_NombreRazon": null,
                "Generador_NIF": null,
                "Generador_OtroCodPais": null,
                "Generador_OtroIDType": null,
                "Generador_OtroID": null,
                "Huella": null,
                "Signature": null,
                "Signature2": null,
                "TipoHuella": 1,
                "NumRegistroAcuerdoFacturacion": null,
                "IdAcuerdoSistemaInformatico": null,
                "FechaHoraHusoGenRegistro": null,
                "IDEmisorFacturaAnterior": null,
                "NumSerieFacturaAnterior": null,
                "FechaExpedicionFacturaAnterior": null,
                "HuellaAnterior": null,
                "incidencia": false,
                "xml_aeat": null,
                "xml_signed": null,
                "xml_aeat_response": null,
                "estado_aeat": "No Registrado",
                "estado_registro_aeat": null,
                "codigo_error_aeat": null,
                "descripcion_error_aeat": null,
                "envios_aeat_id": null,
                "envios_aeat_lineas_id": null
            }
        ]
    }
}
 

Example response (400):


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

Request   

POST api/alta-registro-facturacion

Headers

Authorization      

Example: Bearer cDE6Pv5bd48gfVZa1a6h3ke

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

Incidencia   boolean  optional  

optional Indica si el envio se ha realizado posteriormente a la generación de la factura por alguna incidencia.

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 sin generar el registro en la base de datos.

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

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

Anular Registros Facturacion

Registrar una anulacion de Verifactu.

requires authentication

Registra una anulacion de registro Verifactu en la base de datos para ser procesada y enviada. Si la factura a anular no existe en la API, usar el campo SinRegistroPrevio.

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

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

Example response (201):


{
    "success": true,
    "message": "AnulacionRegistroFacturacion created successfully",
    "code": 201,
    "data": {
        "count": 1,
        "items": [
            {
                "id": 3,
                "previous_id": null,
                "alta_o_anulacion": 2,
                "id_registro_anulado": 2,
                "modificacionOSubsanacion": null,
                "id_registro_modificadoOSubsanado": null,
                "IDEmisorFactura": "A39200019",
                "NumSerieFactura": "2025/002",
                "NumSerie": null,
                "NumFactura": null,
                "FechaExpedicionFactura": "2025-12-15",
                "HoraExpedicionFactura": null,
                "FechaOperacion": null,
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": null,
                "NIFDestinatario": null,
                "RefExterna": null,
                "CuotaTotal": null,
                "ImporteTotal": null,
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": "/ANULACION",
                "webhook_id": null,
                "verifactu": true,
                "no_verifactu": false,
                "tbai": false,
                "face": 0,
                "json": "JSON recibido por la API",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": null,
                "qr_image": null,
                "qr_x": null,
                "qr_y": null,
                "qr_page": null,
                "remitenteNacional": 1,
                "next_id": null,
                "IDVersion": 1,
                "Subsanacion": null,
                "RechazoPrevio": null,
                "TipoFactura": null,
                "TipoRectificativa": null,
                "FacturaSimplificadaArt7273": null,
                "FacturaSinIdentifDestinatarioArt61d": null,
                "Macrodato": null,
                "EmitidaPorTercODesti": null,
                "TercNombreRazon": null,
                "TercNIF": null,
                "TercOtroCodPais": null,
                "TercOtroIDType": null,
                "TercOtroID": null,
                "Cupon": null,
                "SinRegistroPrevio": 2,
                "RechazoPrevioA": 1,
                "GeneradoPor": null,
                "Generador_NombreRazon": null,
                "Generador_NIF": null,
                "Generador_OtroCodPais": null,
                "Generador_OtroIDType": null,
                "Generador_OtroID": null,
                "Huella": null,
                "Signature": null,
                "Signature2": null,
                "TipoHuella": 1,
                "NumRegistroAcuerdoFacturacion": null,
                "IdAcuerdoSistemaInformatico": null,
                "FechaHoraHusoGenRegistro": null,
                "IDEmisorFacturaAnterior": null,
                "NumSerieFacturaAnterior": null,
                "FechaExpedicionFacturaAnterior": null,
                "HuellaAnterior": null,
                "incidencia": false,
                "xml_aeat": null,
                "xml_signed": null,
                "xml_aeat_response": null,
                "estado_aeat": "No Registrado",
                "estado_registro_aeat": null,
                "codigo_error_aeat": null,
                "descripcion_error_aeat": null,
                "envios_aeat_id": null,
                "envios_aeat_lineas_id": null
            }
        ]
    }
}
 

Example response (400):


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

Request   

POST api/anulacion-registro-facturacion

Headers

Authorization      

Example: Bearer Da63hZv41EaPkdfV685gebc

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 un registro Verifactu por id.

requires authentication

Anula un registro Verifactu existente en la base de datos usando el id, registra la anulacion y se procesa.

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

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

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

Example response (201):


{
    "success": true,
    "message": "AnulacionRegistroFacturacion created successfully",
    "code": 201,
    "data": {
        "count": 1,
        "items": [
            {
                "id": 3,
                "previous_id": null,
                "alta_o_anulacion": 2,
                "id_registro_anulado": 2,
                "modificacionOSubsanacion": null,
                "id_registro_modificadoOSubsanado": null,
                "IDEmisorFactura": "A39200019",
                "NumSerieFactura": "2025/002",
                "NumSerie": null,
                "NumFactura": null,
                "FechaExpedicionFactura": "2025-12-15",
                "HoraExpedicionFactura": null,
                "FechaOperacion": null,
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": null,
                "NIFDestinatario": null,
                "RefExterna": null,
                "CuotaTotal": null,
                "ImporteTotal": null,
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": "/ANULACION",
                "webhook_id": null,
                "verifactu": true,
                "no_verifactu": false,
                "tbai": false,
                "face": 0,
                "json": "JSON recibido",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": null,
                "qr_image": null,
                "qr_x": null,
                "qr_y": null,
                "qr_page": null,
                "remitenteNacional": 1,
                "next_id": null,
                "IDVersion": 1,
                "Subsanacion": null,
                "RechazoPrevio": null,
                "TipoFactura": null,
                "TipoRectificativa": null,
                "FacturaSimplificadaArt7273": null,
                "FacturaSinIdentifDestinatarioArt61d": null,
                "Macrodato": null,
                "EmitidaPorTercODesti": null,
                "TercNombreRazon": null,
                "TercNIF": null,
                "TercOtroCodPais": null,
                "TercOtroIDType": null,
                "TercOtroID": null,
                "Cupon": null,
                "SinRegistroPrevio": null,
                "RechazoPrevioA": 1,
                "GeneradoPor": null,
                "Generador_NombreRazon": null,
                "Generador_NIF": null,
                "Generador_OtroCodPais": null,
                "Generador_OtroIDType": null,
                "Generador_OtroID": null,
                "Huella": null,
                "Signature": null,
                "Signature2": null,
                "TipoHuella": 1,
                "NumRegistroAcuerdoFacturacion": null,
                "IdAcuerdoSistemaInformatico": null,
                "FechaHoraHusoGenRegistro": null,
                "IDEmisorFacturaAnterior": null,
                "NumSerieFacturaAnterior": null,
                "FechaExpedicionFacturaAnterior": null,
                "HuellaAnterior": null,
                "incidencia": false,
                "xml_aeat": null,
                "xml_signed": null,
                "xml_aeat_response": null,
                "estado_aeat": "No Registrado",
                "estado_registro_aeat": null,
                "codigo_error_aeat": null,
                "descripcion_error_aeat": null,
                "envios_aeat_id": null,
                "envios_aeat_lineas_id": null
            }
        ]
    }
}
 

Example response (404):


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

Request   

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

Headers

Authorization      

Example: Bearer e63ZaV6Pd45bvDgEkc18fha

Content-Type      

Example: application/json

URL Parameters

id   string   

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

Consultar Registros Facturacion

Obtener lista de registros Verifactu

requires authentication

Muestra una lista con todos los registros Verifactu del usuario. Añadiendo los campos del body se puede filtrar el listado.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-facturacion';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer cZe6kD4hgvPV15E6badaf83',
            'Content-Type' => 'application/json',
        ],
        'query' => [
            'IDEmisorFactura' => 'A39200019',
            'NumSerieFactura' => 'AX/202412-1',
            'FechaExpedicionFactura' => '2025-01-01',
            'NifDestinatario' => '123456789',
            'NombreRazonDestinatario' => 'Nombre del destinatario',
            'ImporteTotal' => '100',
            'tag' => '123456789',
            'alta_o_anulacion' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/alta-registro-facturacion"
);

const params = {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX/202412-1",
    "FechaExpedicionFactura": "2025-01-01",
    "NifDestinatario": "123456789",
    "NombreRazonDestinatario": "Nombre del destinatario",
    "ImporteTotal": "100",
    "tag": "123456789",
    "alta_o_anulacion": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://app.verifactuapi.es/api/alta-registro-facturacion?IDEmisorFactura=A39200019&NumSerieFactura=AX%2F202412-1&FechaExpedicionFactura=2025-01-01&NifDestinatario=123456789&NombreRazonDestinatario=Nombre+del+destinatario&ImporteTotal=100&tag=123456789&alta_o_anulacion=1" \
    --header "Authorization: Bearer cZe6kD4hgvPV15E6badaf83" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/alta-registro-facturacion'
params = {
  'IDEmisorFactura': 'A39200019',
  'NumSerieFactura': 'AX/202412-1',
  'FechaExpedicionFactura': '2025-01-01',
  'NifDestinatario': '123456789',
  'NombreRazonDestinatario': 'Nombre del destinatario',
  'ImporteTotal': '100',
  'tag': '123456789',
  'alta_o_anulacion': '1',
}
headers = {
  'Authorization': 'Bearer cZe6kD4hgvPV15E6badaf83',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
 "success": true,
 "code": 200,
 "message": "Invoices listed successfully",
 "data": {
     "items": [
         {
         "id": 2,
         "previous_id": 1,
         "alta_o_anulacion": 1,
         "id_registro_anulado": null,
         "modificacionOSubsanacion": null,
         "id_registro_modificadoOSubsanado": null,
         "IDEmisorFactura": "A39200019",
         "NumSerieFactura": "2025/002",
         "NumSerie": null,
         "NumFactura": null,
         "FechaExpedicionFactura": "2025-12-15",
         "HoraExpedicionFactura": null,
         "FechaOperacion": null,
         "DescripcionOperacion": "TEST",
         "NombreRazonDestinatario": null,
         "NIFDestinatario": null,
         "RefExterna": null,
         "CuotaTotal": 21,
         "ImporteTotal": 121,
         "moneda": "EUR",
         "BaseRectificada": null,
         "CuotaRectificada": null,
         "CuotaRecargoRectificada": null,
         "tag": null,
         "webhook_id": null,
         "verifactu": true,
         "no_verifactu": false,
         "tbai": false,
         "face": 0,
         "json": "JSON recibido por la API",
         "base64_pdf": null,
         "base64_qr_pdf": null,
         "url_qr": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=A39200019&numserie=2025/002&fecha=15-12-2025&importe=121",
         "qr_image": "QR en formato base64",
         "qr_x": null,
         "qr_y": null,
         "qr_page": 1,
         "remitenteNacional": 1,
         "next_id": null,
         "IDVersion": 1,
         "Subsanacion": 2,
         "RechazoPrevio": 1,
         "TipoFactura": 2,
         "TipoRectificativa": null,
         "FacturaSimplificadaArt7273": 2,
         "FacturaSinIdentifDestinatarioArt61d": 2,
         "Macrodato": 2,
         "EmitidaPorTercODesti": null,
         "TercNombreRazon": null,
         "TercNIF": null,
         "TercOtroCodPais": null,
         "TercOtroIDType": null,
         "TercOtroID": null,
         "Cupon": 2,
         "SinRegistroPrevio": null,
         "RechazoPrevioA": 1,
         "GeneradoPor": null,
         "Generador_NombreRazon": null,
         "Generador_NIF": null,
         "Generador_OtroCodPais": null,
         "Generador_OtroIDType": null,
         "Generador_OtroID": null,
         "Huella": "6FD01AD6D7CA3136A0A9CD9FD4F01B71F51E80133CC81104ABE0C4B23D04AC20",
         "Signature": null,
         "Signature2": null,
         "TipoHuella": 1,
         "NumRegistroAcuerdoFacturacion": null,
         "IdAcuerdoSistemaInformatico": null,
         "FechaHoraHusoGenRegistro": "2025-12-12T13:21:32+01:00",
         "IDEmisorFacturaAnterior": "A39200019",
         "NumSerieFacturaAnterior": "2025/001",
         "FechaExpedicionFacturaAnterior": "2025-12-15",
         "HuellaAnterior": "57B34C2738F68DC3736FF1EC2CD8C286BCF7704D3189C157754E4450731CB4EA",
         "incidencia": false,
         "xml_aeat": "XML del registro",
         "xml_signed": null,
         "xml_aeat_response": null,
         "estado_aeat": "Correcto",
         "estado_registro_aeat": "Registrado",
         "codigo_error_aeat": "",
         "descripcion_error_aeat": "",
         "envios_aeat_id": 2,
         "envios_aeat_lineas_id": 2
         }
     ],
     "count": 1,
     "pagination": {
         "total": 1,
         "perPage": 10,
         "currentPage": 1,
         "lastPage": 1
     }
 }
 

Example response (401):


{
    "success": false,
    "message": "El IDEmisor no coincide con el de tu cuenta.",
    "error": 401,
    "code": 401
}
 

Request   

GET api/alta-registro-facturacion

Headers

Authorization      

Example: Bearer cZe6kD4hgvPV15E6badaf83

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 Verifactu

requires authentication

Muestra los datos de un registro Verifactu filtrando por el ID.

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

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "status": "error",
    "message": "Token inválido",
    "code": 401
}
 

Example response (404):


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

Request   

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

Headers

Authorization      

Example: Bearer eEP84cvkbah53gf1VaZ66dD

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

Envíos

Listado de envíos

requires authentication

Muestra un listado paginado de todos los envíos a Verifactu.

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

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

Content-Type      

Example: application/json

Obtener un envío

requires authentication

Muestra un envío Verifactu específico. Se filtra por el ID del envío.

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

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

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

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

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

Content-Type      

Example: application/json

URL Parameters

linea_id   integer   

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

Consulta AEAT

Consultar registros a AEAT Realizar consulta de los registros de facturación registrados en AEAT

requires authentication

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/consultar-registros-aeat';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer kZ64PVgEbfD1ceava5d368h',
            '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 kZ64PVgEbfD1ceava5d368h",
    "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 kZ64PVgEbfD1ceava5d368h" \
    --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 kZ64PVgEbfD1ceava5d368h',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Consulta realizada correctamente. Se han encontrado 1 registros.",
    "code": 200,
    "total": 1,
    "data": [
        {
            "NombreRazonEmisor": null,
            "IDEmisorFactura": "A39200019",
            "NumSerieFactura": "N00002",
            "FechaExpedicionFactura": "05-08-2025",
            "TipoFactura": "F1",
            "DescripcionOperacion": "FACTURA",
            "Destinatarios": {
                "NombreRazon": "Sage Spain S. L.",
                "NIF": "B58836321"
            },
            "Cupon": null,
            "Desglose": {
                "Impuesto": "01",
                "ClaveRegimen": "01",
                "CalificacionOperacion": "S1",
                "TipoImpositivo": "21",
                "BaseImponibleOimporteNoSujeto": "0",
                "CuotaRepercutida": "0"
            },
            "CuotaTotal": "0",
            "ImporteTotal": "0",
            "Encadenamiento": {
                "RegistroAnterior": {
                    "IDEmisorFactura": "A39200019",
                    "NumSerieFactura": "N00001",
                    "FechaExpedicionFactura": "2025-08-05",
                    "Huella": "57A9F6F6C9640F03A289F63570DE1166260D038F891A9E7F2FABDF8B4EB18064"
                }
            },
            "FechaHoraHusoGenRegistro": "2025-08-05T12:06:40+02:00",
            "TipoHuella": "01",
            "Huella": "FBE84F66D602EE7ADBC20A314969A8806DCB6092E94363F43FFB17E78FBD302A",
            "NIFPresentador": "A39200019",
            "TimestampPresentacion": "2025-08-05T12:07:41+02:00",
            "IdPeticion": "20250805120741050034",
            "TimestampUltimaModificacion": "2025-08-05T12:07:41+02:00",
            "EstadoRegistro": "Correcta",
            "SistemaInformatico": null
        }
    ]
}
 

Example response (400):


{
    "success": false,
    "message": "El campo Entorno es obligatorio y debe ser PROD o TEST.",
    "error": 400,
    "code": 400
}
 

Request   

POST api/consultar-registros-aeat

Headers

Authorization      

Example: Bearer kZ64PVgEbfD1ceava5d368h

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.

Sistema Informatico

Obtener sistema informático

requires authentication

Muestra el sistema informático de un emisor filtrando por el ID del emisor.

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

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://app.verifactuapi.es/api/sistema-informatico/1" \
    --header "Authorization: Bearer hed3D58aPk466bEVvga1Zcf" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/sistema-informatico/1'
headers = {
  'Authorization': 'Bearer hed3D58aPk466bEVvga1Zcf',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "SistemaInformatico obtained successfully",
    "data": {
        "items": {
            "id": 2,
            "nombre_razon": "NEMON INVOICE TO CASH, SL",
            "nif": "B70912613",
            "nombre_sistema_informatico": "NEMON INVOCASH VERIFACTU API",
            "id_sistema_informatico": "01",
            "version": "1.0",
            "numero_instalacion": "20251125154237_858086",
            "tipo_uso_posible_solo_verifactu": true,
            "tipo_uso_posible_multi_ot": false,
            "indicador_multiples_ot": false,
            "is_test": true,
            "created_at": "2025-11-25T14:42:37.000000Z",
            "updated_at": "2025-11-25T14:42:37.000000Z"
        }
    }
}
 

Example response (404):


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

Request   

GET api/sistema-informatico/{id}

Headers

Authorization      

Example: Bearer hed3D58aPk466bEVvga1Zcf

Content-Type      

Example: application/json

URL Parameters

id   integer   

El ID del emisor. Example: 1

TBAI

Listas

Listar listas

requires authentication

Muestra un listado con los nombres de todas las listas de Tbai.

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

url = 'https://app.verifactuapi.es/api/listas-tbai'
headers = {
  'Authorization': 'Bearer ba5g6EhVZ38c61fPvDeka4d',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Nombres de las listas de Tbai listed successfully",
    "data": {
        "items": [
            "l0",
            "l10",
            "l11",
            "l12",
            "l13",
            "l2",
            "l3",
            "l4",
            "l5",
            "l6",
            "l7",
            "l8",
            "l9"
        ],
        "count": 13
    },
    "pagination": {
        "total": 1,
        "perPage": 1,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Example response (404):


{
    "success": false,
    "message": "No se encontraron listas para el tipo especificado.",
    "error": 404,
    "code": 404
}
 

Request   

GET api/listas-tbai

Headers

Authorization      

Example: Bearer ba5g6EhVZ38c61fPvDeka4d

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

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

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

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

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

Alta Registros Facturacion

Registrar una factura de Tbai.

requires authentication

Registra una nuevo registro de factura en la base de datos para ser procesada y enviada.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-tbai';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer V6vacgZ5Pb436d18DEafkeh',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "ModeloLROE": "140",
    "EpigrafeLROE": "304300",
    "tag": "test"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/alta-registro-tbai"
);

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

let body = {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX\/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "ModeloLROE": "140",
    "EpigrafeLROE": "304300",
    "tag": "test"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/alta-registro-tbai" \
    --header "Authorization: Bearer V6vacgZ5Pb436d18DEafkeh" \
    --header "Content-Type: application/json" \
    --data "{
    \"IDEmisorFactura\": \"A39200019\",
    \"NumSerie\": \"AX\\/202412\",
    \"NumFactura\": \"123\",
    \"FechaExpedicionFactura\": \"2025-1-1\",
    \"HoraExpedicionFactura\": \"10:00:00\",
    \"DescripcionFactura\": \"test\",
    \"Destinatarios\": [
        {
            \"NombreRazon\": \"IVAN SOLE MARTINEZ\",
            \"NIF\": \"39707287H\"
        }
    ],
    \"DetallesFactura\": [
        {
            \"Descripcion\": \"Producto 1\",
            \"Unidades\": 1,
            \"PrecioPorUnidad\": 100,
            \"SubTotal\": 100,
            \"ImporteTotal\": 100,
            \"Descuento\": 1234567890
        }
    ],
    \"Desglose\": [
        {
            \"TipoNoExenta\": 1,
            \"BaseImponibleOImporteNoSujeto\": 100,
            \"TipoImpositivo\": 21,
            \"CuotaRepercutida\": 21,
            \"TipoRecargoEquivalencia\": 21,
            \"CuotaRecargoEquivalencia\": 21
        }
    ],
    \"ImporteTotal\": 121,
    \"RetencionSoportada\": 21,
    \"Claves\": [
        1,
        2,
        3
    ],
    \"ModeloLROE\": \"140\",
    \"EpigrafeLROE\": \"304300\",
    \"tag\": \"test\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/alta-registro-tbai'
payload = {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX\/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "ModeloLROE": "140",
    "EpigrafeLROE": "304300",
    "tag": "test"
}
headers = {
  'Authorization': 'Bearer V6vacgZ5Pb436d18DEafkeh',
  'Content-Type': 'application/json'
}

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

Example response (201):


{
    "success": true,
    "message": "AltaRegistroFacturacion created successfully",
    "code": 201,
    "data": {
        "count": 1,
        "items": [
            {
                "id": 1,
                "previous_id": null,
                "alta_o_anulacion": 1,
                "id_registro_anulado": null,
                "modificacionOSubsanacion": null,
                "id_registro_modificadoOSubsanado": null,
                "IDEmisorFactura": "47859447N",
                "NumSerieFactura": "AX/2025-102",
                "NumSerie": "AX/2025",
                "NumFactura": "102",
                "FechaExpedicionFactura": "2025-12-17",
                "HoraExpedicionFactura": "10:00:00",
                "FechaOperacion": null,
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": "Ivan Sole",
                "NIFDestinatario": "39707287H",
                "RefExterna": null,
                "CuotaTotal": null,
                "ImporteTotal": "121",
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": null,
                "webhook_id": null,
                "verifactu": false,
                "no_verifactu": false,
                "tbai": true,
                "face": 0,
                "json": "JSON recibido por la API",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": null,
                "qr_image": null,
                "qr_x": null,
                "qr_y": null,
                "qr_page": 1,
                "remitenteNacional": 1,
                "next_id": null,
                "IDVersion": 1,
                "VariosDestinatarios": 2,
                "EmitidaPorTercODesti": 2,
                "FacturaSimplificada": 2,
                "FacturaEmitidaSustSimp": 2,
                "DescripcionFactura": "Test Desc Factura",
                "CodigoRectificativa": null,
                "TipoRectificativa": null,
                "RetencionSoportada": null,
                "BaseImponibleACoste": null,
                "FechaExpedicionFacturaAnterior": null,
                "NumSerieAnterior": null,
                "NumFacturaAnterior": null,
                "SignatureValueFacturaAnterior": null,
                "xml_tbai": null,
                "xml_signed": null,
                "SignatureValue": null,
                "xml_tbai_response": null,
                "estado_tbai": null,
                "estado_registro_tbai": "No Registrado",
                "codigo_error_tbai": null,
                "descripcion_error_tbai": null,
                "envio_tbai_id": null,
                "NumSerieDispositivo": null,
                "ModeloLROE": null,
                "EpigrafeLROE": null
            }
        ]
    }
}
 

Example response (400):


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

Request   

POST api/alta-registro-tbai

Headers

Authorization      

Example: Bearer V6vacgZ5Pb436d18DEafkeh

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  optional  

optional 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).

CausaExencion   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

ModeloLROE   string  optional  

optional (Bizkaia) Modelo de LROE (solo puede ser "140" o "240"). Example: 140

EpigrafeLROE   string  optional  

optional (Bizkaia) Epigrafe de LROE (solo para modelo 140). Example: 304300

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 Tbai.

requires authentication

Valida el formato y los datos de una factura de Tbai sin generar el registro en la base de datos.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/alta-registro-tbai/validar';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 38fbvaVcEa1h5kd6DPge6Z4',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "ModeloLROE": "140",
    "EpigrafeLROE": "304300",
    "tag": "test"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/alta-registro-tbai/validar"
);

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

let body = {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX\/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "ModeloLROE": "140",
    "EpigrafeLROE": "304300",
    "tag": "test"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/alta-registro-tbai/validar" \
    --header "Authorization: Bearer 38fbvaVcEa1h5kd6DPge6Z4" \
    --header "Content-Type: application/json" \
    --data "{
    \"IDEmisorFactura\": \"A39200019\",
    \"NumSerie\": \"AX\\/202412\",
    \"NumFactura\": \"123\",
    \"FechaExpedicionFactura\": \"2025-1-1\",
    \"HoraExpedicionFactura\": \"10:00:00\",
    \"DescripcionFactura\": \"test\",
    \"Destinatarios\": [
        {
            \"NombreRazon\": \"IVAN SOLE MARTINEZ\",
            \"NIF\": \"39707287H\"
        }
    ],
    \"DetallesFactura\": [
        {
            \"Descripcion\": \"Producto 1\",
            \"Unidades\": 1,
            \"PrecioPorUnidad\": 100,
            \"SubTotal\": 100,
            \"ImporteTotal\": 100,
            \"Descuento\": 1234567890
        }
    ],
    \"Desglose\": [
        {
            \"TipoNoExenta\": 1,
            \"BaseImponibleOImporteNoSujeto\": 100,
            \"TipoImpositivo\": 21,
            \"CuotaRepercutida\": 21,
            \"TipoRecargoEquivalencia\": 21,
            \"CuotaRecargoEquivalencia\": 21
        }
    ],
    \"ImporteTotal\": 121,
    \"RetencionSoportada\": 21,
    \"Claves\": [
        1,
        2,
        3
    ],
    \"ModeloLROE\": \"140\",
    \"EpigrafeLROE\": \"304300\",
    \"tag\": \"test\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/alta-registro-tbai/validar'
payload = {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX\/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "ModeloLROE": "140",
    "EpigrafeLROE": "304300",
    "tag": "test"
}
headers = {
  'Authorization': 'Bearer 38fbvaVcEa1h5kd6DPge6Z4',
  '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-tbai/validar

Headers

Authorization      

Example: Bearer 38fbvaVcEa1h5kd6DPge6Z4

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  optional  

optional 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).

CausaExencion   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

ModeloLROE   string  optional  

optional (Bizkaia) Modelo de LROE (solo puede ser "140" o "240"). Example: 140

EpigrafeLROE   string  optional  

optional (Bizkaia) Epigrafe de LROE (solo para modelo 140). Example: 304300

webhook_id   integer  optional  

optional El ID del webhook asociado a la factura.

tag   string  optional  

optional Etiqueta personalizada para la factura. Example: test

Anular Registros Facturacion

Registrar una anulacion de Tbai.

requires authentication

Registra una anulacion de registro Tbai en la base de datos para ser procesada y enviada.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer g31P86kZehcV6favaE54bdD',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX/202412-1",
    "FechaExpedicionFactura": "2025-11-11\n\n @response 201 {\n \"success\": true,\n \"message\": \"AnulacionRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n     \"count\": 1,\n     \"items\": [\n         {\n             \"id\": 2,\n             \"previous_id\": null,\n             \"alta_o_anulacion\": 2,\n             \"id_registro_anulado\": 1,\n             \"modificacionOSubsanacion\": null,\n             \"id_registro_modificadoOSubsanado\": null,\n             \"IDEmisorFactura\": \"47859447N\",\n             \"NumSerieFactura\": \"AX/2025-102\",\n             \"NumSerie\": \"AX/2025\",\n             \"NumFactura\": \"102\",\n             \"FechaExpedicionFactura\": \"2025-12-17\",\n             \"HoraExpedicionFactura\": null,\n             \"FechaOperacion\": null,\n             \"DescripcionOperacion\": null,\n             \"NombreRazonDestinatario\": null,\n             \"NIFDestinatario\": \"39707287H\",\n             \"RefExterna\": null,\n             \"CuotaTotal\": null,\n             \"ImporteTotal\": null,\n             \"moneda\": \"EUR\",\n             \"BaseRectificada\": null,\n             \"CuotaRectificada\": null,\n             \"CuotaRecargoRectificada\": null,\n             \"tag\": \"/ANULACION\",\n             \"webhook_id\": null,\n             \"verifactu\": false,\n             \"no_verifactu\": false,\n             \"tbai\": true,\n             \"face\": 0,\n             \"json\": \"JSON recibido por la API\",\n             \"base64_pdf\": null,\n             \"base64_qr_pdf\": null,\n             \"url_qr\": null,\n             \"qr_image\": null,\n             \"qr_x\": null,\n             \"qr_y\": null,\n             \"qr_page\": null,\n             \"remitenteNacional\": 1,\n             \"next_id\": null,\n             \"IDVersion\": 1,\n             \"VariosDestinatarios\": null,\n             \"EmitidaPorTercODesti\": null,\n             \"FacturaSimplificada\": null,\n             \"FacturaEmitidaSustSimp\": null,\n             \"DescripcionFactura\": \"RegistroAnulacion\",\n             \"CodigoRectificativa\": null,\n             \"TipoRectificativa\": null,\n             \"RetencionSoportada\": null,\n             \"BaseImponibleACoste\": null,\n             \"FechaExpedicionFacturaAnterior\": null,\n             \"NumSerieAnterior\": null,\n             \"NumFacturaAnterior\": null,\n             \"SignatureValueFacturaAnterior\": null,\n             \"xml_tbai\": null,\n             \"xml_signed\": null,\n             \"SignatureValue\": null,\n             \"xml_tbai_response\": null,\n             \"estado_tbai\": null,\n             \"estado_registro_tbai\": \"No Registrado\",\n             \"codigo_error_tbai\": null,\n             \"descripcion_error_tbai\": null,\n             \"envio_tbai_id\": null,\n             \"NumSerieDispositivo\": null,\n             \"ModeloLROE\": null,\n             \"EpigrafeLROE\": null\n         }\n     ]\n  }\n}"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/anulacion-registro-tbai"
);

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

let body = {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX\/202412-1",
    "FechaExpedicionFactura": "2025-11-11\n\n @response 201 {\n \"success\": true,\n \"message\": \"AnulacionRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n     \"count\": 1,\n     \"items\": [\n         {\n             \"id\": 2,\n             \"previous_id\": null,\n             \"alta_o_anulacion\": 2,\n             \"id_registro_anulado\": 1,\n             \"modificacionOSubsanacion\": null,\n             \"id_registro_modificadoOSubsanado\": null,\n             \"IDEmisorFactura\": \"47859447N\",\n             \"NumSerieFactura\": \"AX\/2025-102\",\n             \"NumSerie\": \"AX\/2025\",\n             \"NumFactura\": \"102\",\n             \"FechaExpedicionFactura\": \"2025-12-17\",\n             \"HoraExpedicionFactura\": null,\n             \"FechaOperacion\": null,\n             \"DescripcionOperacion\": null,\n             \"NombreRazonDestinatario\": null,\n             \"NIFDestinatario\": \"39707287H\",\n             \"RefExterna\": null,\n             \"CuotaTotal\": null,\n             \"ImporteTotal\": null,\n             \"moneda\": \"EUR\",\n             \"BaseRectificada\": null,\n             \"CuotaRectificada\": null,\n             \"CuotaRecargoRectificada\": null,\n             \"tag\": \"\/ANULACION\",\n             \"webhook_id\": null,\n             \"verifactu\": false,\n             \"no_verifactu\": false,\n             \"tbai\": true,\n             \"face\": 0,\n             \"json\": \"JSON recibido por la API\",\n             \"base64_pdf\": null,\n             \"base64_qr_pdf\": null,\n             \"url_qr\": null,\n             \"qr_image\": null,\n             \"qr_x\": null,\n             \"qr_y\": null,\n             \"qr_page\": null,\n             \"remitenteNacional\": 1,\n             \"next_id\": null,\n             \"IDVersion\": 1,\n             \"VariosDestinatarios\": null,\n             \"EmitidaPorTercODesti\": null,\n             \"FacturaSimplificada\": null,\n             \"FacturaEmitidaSustSimp\": null,\n             \"DescripcionFactura\": \"RegistroAnulacion\",\n             \"CodigoRectificativa\": null,\n             \"TipoRectificativa\": null,\n             \"RetencionSoportada\": null,\n             \"BaseImponibleACoste\": null,\n             \"FechaExpedicionFacturaAnterior\": null,\n             \"NumSerieAnterior\": null,\n             \"NumFacturaAnterior\": null,\n             \"SignatureValueFacturaAnterior\": null,\n             \"xml_tbai\": null,\n             \"xml_signed\": null,\n             \"SignatureValue\": null,\n             \"xml_tbai_response\": null,\n             \"estado_tbai\": null,\n             \"estado_registro_tbai\": \"No Registrado\",\n             \"codigo_error_tbai\": null,\n             \"descripcion_error_tbai\": null,\n             \"envio_tbai_id\": null,\n             \"NumSerieDispositivo\": null,\n             \"ModeloLROE\": null,\n             \"EpigrafeLROE\": null\n         }\n     ]\n  }\n}"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/anulacion-registro-tbai" \
    --header "Authorization: Bearer g31P86kZehcV6favaE54bdD" \
    --header "Content-Type: application/json" \
    --data "{
    \"IDEmisorFactura\": \"A39200019\",
    \"NumSerieFactura\": \"AX\\/202412-1\",
    \"FechaExpedicionFactura\": \"2025-11-11\\n\\n @response 201 {\\n \\\"success\\\": true,\\n \\\"message\\\": \\\"AnulacionRegistroFacturacion created successfully\\\",\\n \\\"code\\\": 201,\\n \\\"data\\\": {\\n     \\\"count\\\": 1,\\n     \\\"items\\\": [\\n         {\\n             \\\"id\\\": 2,\\n             \\\"previous_id\\\": null,\\n             \\\"alta_o_anulacion\\\": 2,\\n             \\\"id_registro_anulado\\\": 1,\\n             \\\"modificacionOSubsanacion\\\": null,\\n             \\\"id_registro_modificadoOSubsanado\\\": null,\\n             \\\"IDEmisorFactura\\\": \\\"47859447N\\\",\\n             \\\"NumSerieFactura\\\": \\\"AX\\/2025-102\\\",\\n             \\\"NumSerie\\\": \\\"AX\\/2025\\\",\\n             \\\"NumFactura\\\": \\\"102\\\",\\n             \\\"FechaExpedicionFactura\\\": \\\"2025-12-17\\\",\\n             \\\"HoraExpedicionFactura\\\": null,\\n             \\\"FechaOperacion\\\": null,\\n             \\\"DescripcionOperacion\\\": null,\\n             \\\"NombreRazonDestinatario\\\": null,\\n             \\\"NIFDestinatario\\\": \\\"39707287H\\\",\\n             \\\"RefExterna\\\": null,\\n             \\\"CuotaTotal\\\": null,\\n             \\\"ImporteTotal\\\": null,\\n             \\\"moneda\\\": \\\"EUR\\\",\\n             \\\"BaseRectificada\\\": null,\\n             \\\"CuotaRectificada\\\": null,\\n             \\\"CuotaRecargoRectificada\\\": null,\\n             \\\"tag\\\": \\\"\\/ANULACION\\\",\\n             \\\"webhook_id\\\": null,\\n             \\\"verifactu\\\": false,\\n             \\\"no_verifactu\\\": false,\\n             \\\"tbai\\\": true,\\n             \\\"face\\\": 0,\\n             \\\"json\\\": \\\"JSON recibido por la API\\\",\\n             \\\"base64_pdf\\\": null,\\n             \\\"base64_qr_pdf\\\": null,\\n             \\\"url_qr\\\": null,\\n             \\\"qr_image\\\": null,\\n             \\\"qr_x\\\": null,\\n             \\\"qr_y\\\": null,\\n             \\\"qr_page\\\": null,\\n             \\\"remitenteNacional\\\": 1,\\n             \\\"next_id\\\": null,\\n             \\\"IDVersion\\\": 1,\\n             \\\"VariosDestinatarios\\\": null,\\n             \\\"EmitidaPorTercODesti\\\": null,\\n             \\\"FacturaSimplificada\\\": null,\\n             \\\"FacturaEmitidaSustSimp\\\": null,\\n             \\\"DescripcionFactura\\\": \\\"RegistroAnulacion\\\",\\n             \\\"CodigoRectificativa\\\": null,\\n             \\\"TipoRectificativa\\\": null,\\n             \\\"RetencionSoportada\\\": null,\\n             \\\"BaseImponibleACoste\\\": null,\\n             \\\"FechaExpedicionFacturaAnterior\\\": null,\\n             \\\"NumSerieAnterior\\\": null,\\n             \\\"NumFacturaAnterior\\\": null,\\n             \\\"SignatureValueFacturaAnterior\\\": null,\\n             \\\"xml_tbai\\\": null,\\n             \\\"xml_signed\\\": null,\\n             \\\"SignatureValue\\\": null,\\n             \\\"xml_tbai_response\\\": null,\\n             \\\"estado_tbai\\\": null,\\n             \\\"estado_registro_tbai\\\": \\\"No Registrado\\\",\\n             \\\"codigo_error_tbai\\\": null,\\n             \\\"descripcion_error_tbai\\\": null,\\n             \\\"envio_tbai_id\\\": null,\\n             \\\"NumSerieDispositivo\\\": null,\\n             \\\"ModeloLROE\\\": null,\\n             \\\"EpigrafeLROE\\\": null\\n         }\\n     ]\\n  }\\n}\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/anulacion-registro-tbai'
payload = {
    "IDEmisorFactura": "A39200019",
    "NumSerieFactura": "AX\/202412-1",
    "FechaExpedicionFactura": "2025-11-11\n\n @response 201 {\n \"success\": true,\n \"message\": \"AnulacionRegistroFacturacion created successfully\",\n \"code\": 201,\n \"data\": {\n     \"count\": 1,\n     \"items\": [\n         {\n             \"id\": 2,\n             \"previous_id\": null,\n             \"alta_o_anulacion\": 2,\n             \"id_registro_anulado\": 1,\n             \"modificacionOSubsanacion\": null,\n             \"id_registro_modificadoOSubsanado\": null,\n             \"IDEmisorFactura\": \"47859447N\",\n             \"NumSerieFactura\": \"AX\/2025-102\",\n             \"NumSerie\": \"AX\/2025\",\n             \"NumFactura\": \"102\",\n             \"FechaExpedicionFactura\": \"2025-12-17\",\n             \"HoraExpedicionFactura\": null,\n             \"FechaOperacion\": null,\n             \"DescripcionOperacion\": null,\n             \"NombreRazonDestinatario\": null,\n             \"NIFDestinatario\": \"39707287H\",\n             \"RefExterna\": null,\n             \"CuotaTotal\": null,\n             \"ImporteTotal\": null,\n             \"moneda\": \"EUR\",\n             \"BaseRectificada\": null,\n             \"CuotaRectificada\": null,\n             \"CuotaRecargoRectificada\": null,\n             \"tag\": \"\/ANULACION\",\n             \"webhook_id\": null,\n             \"verifactu\": false,\n             \"no_verifactu\": false,\n             \"tbai\": true,\n             \"face\": 0,\n             \"json\": \"JSON recibido por la API\",\n             \"base64_pdf\": null,\n             \"base64_qr_pdf\": null,\n             \"url_qr\": null,\n             \"qr_image\": null,\n             \"qr_x\": null,\n             \"qr_y\": null,\n             \"qr_page\": null,\n             \"remitenteNacional\": 1,\n             \"next_id\": null,\n             \"IDVersion\": 1,\n             \"VariosDestinatarios\": null,\n             \"EmitidaPorTercODesti\": null,\n             \"FacturaSimplificada\": null,\n             \"FacturaEmitidaSustSimp\": null,\n             \"DescripcionFactura\": \"RegistroAnulacion\",\n             \"CodigoRectificativa\": null,\n             \"TipoRectificativa\": null,\n             \"RetencionSoportada\": null,\n             \"BaseImponibleACoste\": null,\n             \"FechaExpedicionFacturaAnterior\": null,\n             \"NumSerieAnterior\": null,\n             \"NumFacturaAnterior\": null,\n             \"SignatureValueFacturaAnterior\": null,\n             \"xml_tbai\": null,\n             \"xml_signed\": null,\n             \"SignatureValue\": null,\n             \"xml_tbai_response\": null,\n             \"estado_tbai\": null,\n             \"estado_registro_tbai\": \"No Registrado\",\n             \"codigo_error_tbai\": null,\n             \"descripcion_error_tbai\": null,\n             \"envio_tbai_id\": null,\n             \"NumSerieDispositivo\": null,\n             \"ModeloLROE\": null,\n             \"EpigrafeLROE\": null\n         }\n     ]\n  }\n}"
}
headers = {
  'Authorization': 'Bearer g31P86kZehcV6favaE54bdD',
  'Content-Type': 'application/json'
}

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

Example response (400):


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

Request   

POST api/anulacion-registro-tbai

Headers

Authorization      

Example: Bearer g31P86kZehcV6favaE54bdD

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

@response 201 { "success": true, "message": "AnulacionRegistroFacturacion created successfully", "code": 201, "data": { "count": 1, "items": [ { "id": 2, "previous_id": null, "alta_o_anulacion": 2, "id_registro_anulado": 1, "modificacionOSubsanacion": null, "id_registro_modificadoOSubsanado": null, "IDEmisorFactura": "47859447N", "NumSerieFactura": "AX/2025-102", "NumSerie": "AX/2025", "NumFactura": "102", "FechaExpedicionFactura": "2025-12-17", "HoraExpedicionFactura": null, "FechaOperacion": null, "DescripcionOperacion": null, "NombreRazonDestinatario": null, "NIFDestinatario": "39707287H", "RefExterna": null, "CuotaTotal": null, "ImporteTotal": null, "moneda": "EUR", "BaseRectificada": null, "CuotaRectificada": null, "CuotaRecargoRectificada": null, "tag": "/ANULACION", "webhook_id": null, "verifactu": false, "no_verifactu": false, "tbai": true, "face": 0, "json": "JSON recibido por la API", "base64_pdf": null, "base64_qr_pdf": null, "url_qr": null, "qr_image": null, "qr_x": null, "qr_y": null, "qr_page": null, "remitenteNacional": 1, "next_id": null, "IDVersion": 1, "VariosDestinatarios": null, "EmitidaPorTercODesti": null, "FacturaSimplificada": null, "FacturaEmitidaSustSimp": null, "DescripcionFactura": "RegistroAnulacion", "CodigoRectificativa": null, "TipoRectificativa": null, "RetencionSoportada": null, "BaseImponibleACoste": null, "FechaExpedicionFacturaAnterior": null, "NumSerieAnterior": null, "NumFacturaAnterior": null, "SignatureValueFacturaAnterior": null, "xml_tbai": null, "xml_signed": null, "SignatureValue": null, "xml_tbai_response": null, "estado_tbai": null, "estado_registro_tbai": "No Registrado", "codigo_error_tbai": null, "descripcion_error_tbai": null, "envio_tbai_id": null, "NumSerieDispositivo": null, "ModeloLROE": null, "EpigrafeLROE": null } ] } }`

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

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

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

Example response (201):


{
    "success": true,
    "message": "AnulacionRegistroFacturacion created successfully",
    "code": 201,
    "data": {
        "count": 1,
        "items": [
            {
                "id": 2,
                "previous_id": null,
                "alta_o_anulacion": 2,
                "id_registro_anulado": 1,
                "modificacionOSubsanacion": null,
                "id_registro_modificadoOSubsanado": null,
                "IDEmisorFactura": "47859447N",
                "NumSerieFactura": "AX/2025-102",
                "NumSerie": "AX/2025",
                "NumFactura": "102",
                "FechaExpedicionFactura": "2025-12-17",
                "HoraExpedicionFactura": null,
                "FechaOperacion": null,
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": null,
                "NIFDestinatario": "39707287H",
                "RefExterna": null,
                "CuotaTotal": null,
                "ImporteTotal": null,
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": "/ANULACION",
                "webhook_id": null,
                "verifactu": false,
                "no_verifactu": false,
                "tbai": true,
                "face": 0,
                "json": "JSON recibido por la API",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": null,
                "qr_image": null,
                "qr_x": null,
                "qr_y": null,
                "qr_page": null,
                "remitenteNacional": 1,
                "next_id": null,
                "IDVersion": 1,
                "VariosDestinatarios": null,
                "EmitidaPorTercODesti": null,
                "FacturaSimplificada": null,
                "FacturaEmitidaSustSimp": null,
                "DescripcionFactura": "RegistroAnulacion",
                "CodigoRectificativa": null,
                "TipoRectificativa": null,
                "RetencionSoportada": null,
                "BaseImponibleACoste": null,
                "FechaExpedicionFacturaAnterior": null,
                "NumSerieAnterior": null,
                "NumFacturaAnterior": null,
                "SignatureValueFacturaAnterior": null,
                "xml_tbai": null,
                "xml_signed": null,
                "SignatureValue": null,
                "xml_tbai_response": null,
                "estado_tbai": null,
                "estado_registro_tbai": "No Registrado",
                "codigo_error_tbai": null,
                "descripcion_error_tbai": null,
                "envio_tbai_id": null,
                "NumSerieDispositivo": null,
                "ModeloLROE": null,
                "EpigrafeLROE": null
            }
        ]
    }
}
 

Example response (404):


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

Request   

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

Headers

Authorization      

Example: Bearer dP1vDafceEa58Z3kVhb66g4

Content-Type      

Example: application/json

URL Parameters

id   string   

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

Consultar Registros Facturacion

Obtener lista de registros TBAI

requires authentication

Muestra una lista con todos los registros TBAI del usuario. Añadiendo los campos del body se puede filtrar el listado.

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

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Invoices listed successfully",
    "data": {
        "items": [
            {
                "id": 1,
                "previous_id": null,
                "alta_o_anulacion": 1,
                "id_registro_anulado": null,
                "modificacionOSubsanacion": null,
                "id_registro_modificadoOSubsanado": null,
                "IDEmisorFactura": "47859447N",
                "NumSerieFactura": "AX/2025-100",
                "NumSerie": "AX/2025",
                "NumFactura": "100",
                "FechaExpedicionFactura": "2025-12-17",
                "HoraExpedicionFactura": "10:00:00",
                "FechaOperacion": null,
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": "Ivan Sole",
                "NIFDestinatario": "39707287H",
                "RefExterna": null,
                "CuotaTotal": null,
                "ImporteTotal": "121",
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": null,
                "webhook_id": null,
                "verifactu": false,
                "no_verifactu": false,
                "tbai": true,
                "face": 0,
                "json": "JSON recibido",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": "https://tbai.prep.gipuzkoa.eus/qr/?id=TBAI-47859447N-171225-ivFyfDgmtpLqb-211&s=AX/2025&nf=100&i=121&cr=234",
                "qr_image": "QR en formato base64",
                "qr_x": null,
                "qr_y": null,
                "qr_page": 1,
                "remitenteNacional": 1,
                "next_id": 2,
                "IDVersion": 1,
                "VariosDestinatarios": 2,
                "EmitidaPorTercODesti": 2,
                "FacturaSimplificada": 2,
                "FacturaEmitidaSustSimp": 2,
                "DescripcionFactura": "Test Desc Factura",
                "CodigoRectificativa": null,
                "TipoRectificativa": null,
                "RetencionSoportada": null,
                "BaseImponibleACoste": null,
                "FechaExpedicionFacturaAnterior": null,
                "NumSerieAnterior": null,
                "NumFacturaAnterior": null,
                "SignatureValueFacturaAnterior": null,
                "xml_tbai": "XML TBAI",
                "xml_signed": "XML TBAI firmado",
                "SignatureValue": "SignatureValue de la factura",
                "xml_tbai_response": "XML respuesta de TBAI",
                "estado_tbai": "Recibido - ALTA PREP",
                "estado_registro_tbai": "Registrado",
                "codigo_error_tbai": null,
                "descripcion_error_tbai": null,
                "envio_tbai_id": 1,
                "NumSerieDispositivo": null,
                "ModeloLROE": null,
                "EpigrafeLROE": null
            }
        ],
        "count": 1
    },
    "pagination": {
        "total": 1,
        "perPage": 10,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Example response (401):


{
    "success": false,
    "message": "El IDEmisor no coincide con el de tu cuenta.",
    "error": 401,
    "code": 401
}
 

Request   

GET api/alta-registro-tbai

Headers

Authorization      

Example: Bearer VcP5Zd3aehEa861gkb6fv4D

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

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

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Invoice obtained successfully",
    "data": {
        "items": {
            "id": 1,
            "previous_id": null,
            "alta_o_anulacion": 1,
            "id_registro_anulado": null,
            "modificacionOSubsanacion": null,
            "id_registro_modificadoOSubsanado": null,
            "IDEmisorFactura": "47859447N",
            "NumSerieFactura": "AX/2025-100",
            "NumSerie": "AX/2025",
            "NumFactura": "100",
            "FechaExpedicionFactura": "2025-12-17",
            "HoraExpedicionFactura": "10:00:00",
            "FechaOperacion": null,
            "DescripcionOperacion": null,
            "NombreRazonDestinatario": "Ivan Sole",
            "NIFDestinatario": "39707287H",
            "RefExterna": null,
            "CuotaTotal": null,
            "ImporteTotal": "121",
            "moneda": "EUR",
            "BaseRectificada": null,
            "CuotaRectificada": null,
            "CuotaRecargoRectificada": null,
            "tag": null,
            "webhook_id": null,
            "verifactu": false,
            "no_verifactu": false,
            "tbai": true,
            "face": 0,
            "json": "JSON recibido",
            "base64_pdf": null,
            "base64_qr_pdf": null,
            "url_qr": "https://tbai.prep.gipuzkoa.eus/qr/?id=TBAI-47859447N-171225-ivFyfDgmtpLqb-211&s=AX/2025&nf=100&i=121&cr=234",
            "qr_image": "QR en formato base64",
            "qr_x": null,
            "qr_y": null,
            "qr_page": 1,
            "remitenteNacional": 1,
            "next_id": 2,
            "IDVersion": 1,
            "VariosDestinatarios": 2,
            "EmitidaPorTercODesti": 2,
            "FacturaSimplificada": 2,
            "FacturaEmitidaSustSimp": 2,
            "DescripcionFactura": "Test Desc Factura",
            "CodigoRectificativa": null,
            "TipoRectificativa": null,
            "RetencionSoportada": null,
            "BaseImponibleACoste": null,
            "FechaExpedicionFacturaAnterior": null,
            "NumSerieAnterior": null,
            "NumFacturaAnterior": null,
            "SignatureValueFacturaAnterior": null,
            "xml_tbai": "XML TBAI",
            "xml_signed": "XML TBAI firmado",
            "SignatureValue": "SignatureValue de la factura",
            "xml_tbai_response": "XML respuesta de TBAI",
            "estado_tbai": "Recibido - ALTA PREP",
            "estado_registro_tbai": "Registrado",
            "codigo_error_tbai": null,
            "descripcion_error_tbai": null,
            "envio_tbai_id": 1,
            "NumSerieDispositivo": null,
            "ModeloLROE": null,
            "EpigrafeLROE": null
        },
        "count": 1
    }
}
 

Example response (404):


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

Request   

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

Headers

Authorization      

Example: Bearer 1a6e6PdVak4hcfvZE5b3gD8

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

QR

Generar QR de TBAI

requires authentication

Genera el QR de un registro TBAI. Si el PDF ya existe, añade el QR al PDF. El registro debe haber sido enviado a TBAI.

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

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

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

ZUZENDU

Modificar un registro de Tbai.

requires authentication

Registra una modificacion de registro Tbai en la base de datos para ser procesada y enviada. Permite modificar los datos que no se pueden corregir usando rectificativas de los registros recibidos por TBAI.

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

const headers = {
    "Authorization": "Bearer eZd1P48baf3E6ahk5DVcg6v",
    "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/quae" \
    --header "Authorization: Bearer eZd1P48baf3E6ahk5DVcg6v" \
    --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/quae'
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 eZd1P48baf3E6ahk5DVcg6v',
  'Content-Type': 'application/json'
}

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

Example response (201):


{
    "success": true,
    "message": "AltaRegistroFacturacion created successfully",
    "code": 201,
    "data": {
        "count": 1,
        "items": [
            {
                "id": 2,
                "previous_id": null,
                "alta_o_anulacion": 1,
                "id_registro_anulado": null,
                "modificacionOSubsanacion": "MODIFICAR",
                "id_registro_modificadoOSubsanado": 1,
                "IDEmisorFactura": "47859447N",
                "NumSerieFactura": "AX/2025-102",
                "NumSerie": "AX/2025",
                "NumFactura": "102",
                "FechaExpedicionFactura": "2025-12-17",
                "HoraExpedicionFactura": "10:00:00",
                "FechaOperacion": "2022-07-10",
                "DescripcionOperacion": null,
                "NombreRazonDestinatario": "Lluis Martinez",
                "NIFDestinatario": "47859447N",
                "RefExterna": null,
                "CuotaTotal": null,
                "ImporteTotal": "121",
                "moneda": "EUR",
                "BaseRectificada": null,
                "CuotaRectificada": null,
                "CuotaRecargoRectificada": null,
                "tag": null,
                "webhook_id": null,
                "verifactu": false,
                "no_verifactu": false,
                "tbai": true,
                "face": 0,
                "json": "JSON recibido por la API",
                "base64_pdf": null,
                "base64_qr_pdf": null,
                "url_qr": null,
                "qr_image": null,
                "qr_x": null,
                "qr_y": null,
                "qr_page": 1,
                "remitenteNacional": 1,
                "next_id": null,
                "IDVersion": 1,
                "VariosDestinatarios": 2,
                "EmitidaPorTercODesti": 2,
                "FacturaSimplificada": 2,
                "FacturaEmitidaSustSimp": 2,
                "DescripcionFactura": "Test Desc Factura",
                "CodigoRectificativa": null,
                "TipoRectificativa": null,
                "RetencionSoportada": null,
                "BaseImponibleACoste": null,
                "FechaExpedicionFacturaAnterior": "2025-12-17",
                "NumSerieAnterior": "AX/2025",
                "NumFacturaAnterior": "102",
                "SignatureValueFacturaAnterior": "SignatureValueFacturaAnterior",
                "xml_tbai": null,
                "xml_signed": "XML firmado",
                "SignatureValue": "SignatureValue",
                "xml_tbai_response": null,
                "estado_tbai": null,
                "estado_registro_tbai": "No Registrado",
                "codigo_error_tbai": null,
                "descripcion_error_tbai": null,
                "envio_tbai_id": null,
                "NumSerieDispositivo": null,
                "ModeloLROE": null,
                "EpigrafeLROE": null
            }
        ]
    }
}
 

Example response (400):


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

Request   

POST api/tbai/modificar/{id}

Headers

Authorization      

Example: Bearer eZd1P48baf3E6ahk5DVcg6v

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the modificar. Example: quae

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  optional  

optional 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).

CausaExencion   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/sit';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer vfZekbgc61dhaVaE8436D5P',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "tag": "test\n\n\n* @response 201 {\n   \"success\": true,\n   \"message\": \"AltaRegistroFacturacion created successfully\",\n   \"code\": 201,\n   \"data\": {\n       \"count\": 1,\n       \"items\": [\n           {\n               \"id\": 2,\n               \"previous_id\": null,\n               \"alta_o_anulacion\": 1,\n               \"id_registro_anulado\": null,\n               \"modificacionOSubsanacion\": \"SUBSANAR\",\n               \"id_registro_modificadoOSubsanado\": 1,\n               \"IDEmisorFactura\": \"47859447N\",\n               \"NumSerieFactura\": \"AX/2025-102\",\n               \"NumSerie\": \"AX/2025\",\n               \"NumFactura\": \"102\",\n               \"FechaExpedicionFactura\": \"2025-12-17\",\n               \"HoraExpedicionFactura\": \"10:00:00\",\n               \"FechaOperacion\": \"2022-07-10\",\n               \"DescripcionOperacion\": null,\n               \"NombreRazonDestinatario\": \"Lluis Martinez\",\n               \"NIFDestinatario\": \"47859447N\",\n               \"RefExterna\": null,\n               \"CuotaTotal\": null,\n               \"ImporteTotal\": \"121\",\n               \"moneda\": \"EUR\",\n               \"BaseRectificada\": null,\n               \"CuotaRectificada\": null,\n               \"CuotaRecargoRectificada\": null,\n               \"tag\": null,\n               \"webhook_id\": null,\n               \"verifactu\": false,\n               \"no_verifactu\": false,\n               \"tbai\": true,\n               \"face\": 0,\n               \"json\": \"JSON recibido por la API\",\n               \"base64_pdf\": null,\n               \"base64_qr_pdf\": null,\n               \"url_qr\": null,\n               \"qr_image\": null,\n               \"qr_x\": null,\n               \"qr_y\": null,\n               \"qr_page\": 1,\n               \"remitenteNacional\": 1,\n               \"next_id\": null,\n               \"IDVersion\": 1,\n               \"VariosDestinatarios\": 2,\n               \"EmitidaPorTercODesti\": 2,\n               \"FacturaSimplificada\": 2,\n               \"FacturaEmitidaSustSimp\": 2,\n               \"DescripcionFactura\": \"Test Desc Factura\",\n               \"CodigoRectificativa\": null,\n               \"TipoRectificativa\": null,\n               \"RetencionSoportada\": null,\n               \"BaseImponibleACoste\": null,\n               \"FechaExpedicionFacturaAnterior\": \"2025-12-17\",\n               \"NumSerieAnterior\": \"AX/2025\",\n               \"NumFacturaAnterior\": \"102\",\n               \"SignatureValueFacturaAnterior\": \"SignatureValueFacturaAnterior\",\n               \"xml_tbai\": null,\n               \"xml_signed\": \"XML firmado\",\n               \"SignatureValue\": \"SignatureValue\",\n               \"xml_tbai_response\": null,\n               \"estado_tbai\": null,\n               \"estado_registro_tbai\": \"No Registrado\",\n               \"codigo_error_tbai\": null,\n               \"descripcion_error_tbai\": null,\n               \"envio_tbai_id\": null,\n               \"NumSerieDispositivo\": null,\n               \"ModeloLROE\": null,\n               \"EpigrafeLROE\": null\n           }\n       ]\n   }\n}"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/tbai/subsanar/sit"
);

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

let body = {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX\/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "tag": "test\n\n\n* @response 201 {\n   \"success\": true,\n   \"message\": \"AltaRegistroFacturacion created successfully\",\n   \"code\": 201,\n   \"data\": {\n       \"count\": 1,\n       \"items\": [\n           {\n               \"id\": 2,\n               \"previous_id\": null,\n               \"alta_o_anulacion\": 1,\n               \"id_registro_anulado\": null,\n               \"modificacionOSubsanacion\": \"SUBSANAR\",\n               \"id_registro_modificadoOSubsanado\": 1,\n               \"IDEmisorFactura\": \"47859447N\",\n               \"NumSerieFactura\": \"AX\/2025-102\",\n               \"NumSerie\": \"AX\/2025\",\n               \"NumFactura\": \"102\",\n               \"FechaExpedicionFactura\": \"2025-12-17\",\n               \"HoraExpedicionFactura\": \"10:00:00\",\n               \"FechaOperacion\": \"2022-07-10\",\n               \"DescripcionOperacion\": null,\n               \"NombreRazonDestinatario\": \"Lluis Martinez\",\n               \"NIFDestinatario\": \"47859447N\",\n               \"RefExterna\": null,\n               \"CuotaTotal\": null,\n               \"ImporteTotal\": \"121\",\n               \"moneda\": \"EUR\",\n               \"BaseRectificada\": null,\n               \"CuotaRectificada\": null,\n               \"CuotaRecargoRectificada\": null,\n               \"tag\": null,\n               \"webhook_id\": null,\n               \"verifactu\": false,\n               \"no_verifactu\": false,\n               \"tbai\": true,\n               \"face\": 0,\n               \"json\": \"JSON recibido por la API\",\n               \"base64_pdf\": null,\n               \"base64_qr_pdf\": null,\n               \"url_qr\": null,\n               \"qr_image\": null,\n               \"qr_x\": null,\n               \"qr_y\": null,\n               \"qr_page\": 1,\n               \"remitenteNacional\": 1,\n               \"next_id\": null,\n               \"IDVersion\": 1,\n               \"VariosDestinatarios\": 2,\n               \"EmitidaPorTercODesti\": 2,\n               \"FacturaSimplificada\": 2,\n               \"FacturaEmitidaSustSimp\": 2,\n               \"DescripcionFactura\": \"Test Desc Factura\",\n               \"CodigoRectificativa\": null,\n               \"TipoRectificativa\": null,\n               \"RetencionSoportada\": null,\n               \"BaseImponibleACoste\": null,\n               \"FechaExpedicionFacturaAnterior\": \"2025-12-17\",\n               \"NumSerieAnterior\": \"AX\/2025\",\n               \"NumFacturaAnterior\": \"102\",\n               \"SignatureValueFacturaAnterior\": \"SignatureValueFacturaAnterior\",\n               \"xml_tbai\": null,\n               \"xml_signed\": \"XML firmado\",\n               \"SignatureValue\": \"SignatureValue\",\n               \"xml_tbai_response\": null,\n               \"estado_tbai\": null,\n               \"estado_registro_tbai\": \"No Registrado\",\n               \"codigo_error_tbai\": null,\n               \"descripcion_error_tbai\": null,\n               \"envio_tbai_id\": null,\n               \"NumSerieDispositivo\": null,\n               \"ModeloLROE\": null,\n               \"EpigrafeLROE\": null\n           }\n       ]\n   }\n}"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/tbai/subsanar/sit" \
    --header "Authorization: Bearer vfZekbgc61dhaVaE8436D5P" \
    --header "Content-Type: application/json" \
    --data "{
    \"IDEmisorFactura\": \"A39200019\",
    \"NumSerie\": \"AX\\/202412\",
    \"NumFactura\": \"123\",
    \"FechaExpedicionFactura\": \"2025-1-1\",
    \"HoraExpedicionFactura\": \"10:00:00\",
    \"DescripcionFactura\": \"test\",
    \"Destinatarios\": [
        {
            \"NombreRazon\": \"IVAN SOLE MARTINEZ\",
            \"NIF\": \"39707287H\"
        }
    ],
    \"DetallesFactura\": [
        {
            \"Descripcion\": \"Producto 1\",
            \"Unidades\": 1,
            \"PrecioPorUnidad\": 100,
            \"SubTotal\": 100,
            \"ImporteTotal\": 100,
            \"Descuento\": 1234567890
        }
    ],
    \"Desglose\": [
        {
            \"TipoNoExenta\": 1,
            \"BaseImponibleOImporteNoSujeto\": 100,
            \"TipoImpositivo\": 21,
            \"CuotaRepercutida\": 21,
            \"TipoRecargoEquivalencia\": 21,
            \"CuotaRecargoEquivalencia\": 21
        }
    ],
    \"ImporteTotal\": 121,
    \"RetencionSoportada\": 21,
    \"Claves\": [
        1,
        2,
        3
    ],
    \"tag\": \"test\\n\\n\\n* @response 201 {\\n   \\\"success\\\": true,\\n   \\\"message\\\": \\\"AltaRegistroFacturacion created successfully\\\",\\n   \\\"code\\\": 201,\\n   \\\"data\\\": {\\n       \\\"count\\\": 1,\\n       \\\"items\\\": [\\n           {\\n               \\\"id\\\": 2,\\n               \\\"previous_id\\\": null,\\n               \\\"alta_o_anulacion\\\": 1,\\n               \\\"id_registro_anulado\\\": null,\\n               \\\"modificacionOSubsanacion\\\": \\\"SUBSANAR\\\",\\n               \\\"id_registro_modificadoOSubsanado\\\": 1,\\n               \\\"IDEmisorFactura\\\": \\\"47859447N\\\",\\n               \\\"NumSerieFactura\\\": \\\"AX\\/2025-102\\\",\\n               \\\"NumSerie\\\": \\\"AX\\/2025\\\",\\n               \\\"NumFactura\\\": \\\"102\\\",\\n               \\\"FechaExpedicionFactura\\\": \\\"2025-12-17\\\",\\n               \\\"HoraExpedicionFactura\\\": \\\"10:00:00\\\",\\n               \\\"FechaOperacion\\\": \\\"2022-07-10\\\",\\n               \\\"DescripcionOperacion\\\": null,\\n               \\\"NombreRazonDestinatario\\\": \\\"Lluis Martinez\\\",\\n               \\\"NIFDestinatario\\\": \\\"47859447N\\\",\\n               \\\"RefExterna\\\": null,\\n               \\\"CuotaTotal\\\": null,\\n               \\\"ImporteTotal\\\": \\\"121\\\",\\n               \\\"moneda\\\": \\\"EUR\\\",\\n               \\\"BaseRectificada\\\": null,\\n               \\\"CuotaRectificada\\\": null,\\n               \\\"CuotaRecargoRectificada\\\": null,\\n               \\\"tag\\\": null,\\n               \\\"webhook_id\\\": null,\\n               \\\"verifactu\\\": false,\\n               \\\"no_verifactu\\\": false,\\n               \\\"tbai\\\": true,\\n               \\\"face\\\": 0,\\n               \\\"json\\\": \\\"JSON recibido por la API\\\",\\n               \\\"base64_pdf\\\": null,\\n               \\\"base64_qr_pdf\\\": null,\\n               \\\"url_qr\\\": null,\\n               \\\"qr_image\\\": null,\\n               \\\"qr_x\\\": null,\\n               \\\"qr_y\\\": null,\\n               \\\"qr_page\\\": 1,\\n               \\\"remitenteNacional\\\": 1,\\n               \\\"next_id\\\": null,\\n               \\\"IDVersion\\\": 1,\\n               \\\"VariosDestinatarios\\\": 2,\\n               \\\"EmitidaPorTercODesti\\\": 2,\\n               \\\"FacturaSimplificada\\\": 2,\\n               \\\"FacturaEmitidaSustSimp\\\": 2,\\n               \\\"DescripcionFactura\\\": \\\"Test Desc Factura\\\",\\n               \\\"CodigoRectificativa\\\": null,\\n               \\\"TipoRectificativa\\\": null,\\n               \\\"RetencionSoportada\\\": null,\\n               \\\"BaseImponibleACoste\\\": null,\\n               \\\"FechaExpedicionFacturaAnterior\\\": \\\"2025-12-17\\\",\\n               \\\"NumSerieAnterior\\\": \\\"AX\\/2025\\\",\\n               \\\"NumFacturaAnterior\\\": \\\"102\\\",\\n               \\\"SignatureValueFacturaAnterior\\\": \\\"SignatureValueFacturaAnterior\\\",\\n               \\\"xml_tbai\\\": null,\\n               \\\"xml_signed\\\": \\\"XML firmado\\\",\\n               \\\"SignatureValue\\\": \\\"SignatureValue\\\",\\n               \\\"xml_tbai_response\\\": null,\\n               \\\"estado_tbai\\\": null,\\n               \\\"estado_registro_tbai\\\": \\\"No Registrado\\\",\\n               \\\"codigo_error_tbai\\\": null,\\n               \\\"descripcion_error_tbai\\\": null,\\n               \\\"envio_tbai_id\\\": null,\\n               \\\"NumSerieDispositivo\\\": null,\\n               \\\"ModeloLROE\\\": null,\\n               \\\"EpigrafeLROE\\\": null\\n           }\\n       ]\\n   }\\n}\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/tbai/subsanar/sit'
payload = {
    "IDEmisorFactura": "A39200019",
    "NumSerie": "AX\/202412",
    "NumFactura": "123",
    "FechaExpedicionFactura": "2025-1-1",
    "HoraExpedicionFactura": "10:00:00",
    "DescripcionFactura": "test",
    "Destinatarios": [
        {
            "NombreRazon": "IVAN SOLE MARTINEZ",
            "NIF": "39707287H"
        }
    ],
    "DetallesFactura": [
        {
            "Descripcion": "Producto 1",
            "Unidades": 1,
            "PrecioPorUnidad": 100,
            "SubTotal": 100,
            "ImporteTotal": 100,
            "Descuento": 1234567890
        }
    ],
    "Desglose": [
        {
            "TipoNoExenta": 1,
            "BaseImponibleOImporteNoSujeto": 100,
            "TipoImpositivo": 21,
            "CuotaRepercutida": 21,
            "TipoRecargoEquivalencia": 21,
            "CuotaRecargoEquivalencia": 21
        }
    ],
    "ImporteTotal": 121,
    "RetencionSoportada": 21,
    "Claves": [
        1,
        2,
        3
    ],
    "tag": "test\n\n\n* @response 201 {\n   \"success\": true,\n   \"message\": \"AltaRegistroFacturacion created successfully\",\n   \"code\": 201,\n   \"data\": {\n       \"count\": 1,\n       \"items\": [\n           {\n               \"id\": 2,\n               \"previous_id\": null,\n               \"alta_o_anulacion\": 1,\n               \"id_registro_anulado\": null,\n               \"modificacionOSubsanacion\": \"SUBSANAR\",\n               \"id_registro_modificadoOSubsanado\": 1,\n               \"IDEmisorFactura\": \"47859447N\",\n               \"NumSerieFactura\": \"AX\/2025-102\",\n               \"NumSerie\": \"AX\/2025\",\n               \"NumFactura\": \"102\",\n               \"FechaExpedicionFactura\": \"2025-12-17\",\n               \"HoraExpedicionFactura\": \"10:00:00\",\n               \"FechaOperacion\": \"2022-07-10\",\n               \"DescripcionOperacion\": null,\n               \"NombreRazonDestinatario\": \"Lluis Martinez\",\n               \"NIFDestinatario\": \"47859447N\",\n               \"RefExterna\": null,\n               \"CuotaTotal\": null,\n               \"ImporteTotal\": \"121\",\n               \"moneda\": \"EUR\",\n               \"BaseRectificada\": null,\n               \"CuotaRectificada\": null,\n               \"CuotaRecargoRectificada\": null,\n               \"tag\": null,\n               \"webhook_id\": null,\n               \"verifactu\": false,\n               \"no_verifactu\": false,\n               \"tbai\": true,\n               \"face\": 0,\n               \"json\": \"JSON recibido por la API\",\n               \"base64_pdf\": null,\n               \"base64_qr_pdf\": null,\n               \"url_qr\": null,\n               \"qr_image\": null,\n               \"qr_x\": null,\n               \"qr_y\": null,\n               \"qr_page\": 1,\n               \"remitenteNacional\": 1,\n               \"next_id\": null,\n               \"IDVersion\": 1,\n               \"VariosDestinatarios\": 2,\n               \"EmitidaPorTercODesti\": 2,\n               \"FacturaSimplificada\": 2,\n               \"FacturaEmitidaSustSimp\": 2,\n               \"DescripcionFactura\": \"Test Desc Factura\",\n               \"CodigoRectificativa\": null,\n               \"TipoRectificativa\": null,\n               \"RetencionSoportada\": null,\n               \"BaseImponibleACoste\": null,\n               \"FechaExpedicionFacturaAnterior\": \"2025-12-17\",\n               \"NumSerieAnterior\": \"AX\/2025\",\n               \"NumFacturaAnterior\": \"102\",\n               \"SignatureValueFacturaAnterior\": \"SignatureValueFacturaAnterior\",\n               \"xml_tbai\": null,\n               \"xml_signed\": \"XML firmado\",\n               \"SignatureValue\": \"SignatureValue\",\n               \"xml_tbai_response\": null,\n               \"estado_tbai\": null,\n               \"estado_registro_tbai\": \"No Registrado\",\n               \"codigo_error_tbai\": null,\n               \"descripcion_error_tbai\": null,\n               \"envio_tbai_id\": null,\n               \"NumSerieDispositivo\": null,\n               \"ModeloLROE\": null,\n               \"EpigrafeLROE\": null\n           }\n       ]\n   }\n}"
}
headers = {
  'Authorization': 'Bearer vfZekbgc61dhaVaE8436D5P',
  'Content-Type': 'application/json'
}

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

Example response (400):


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

Request   

POST api/tbai/subsanar/{id}

Headers

Authorization      

Example: Bearer vfZekbgc61dhaVaE8436D5P

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the subsanar. Example: sit

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  optional  

optional 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).

CausaExencion   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

  • @response 201 { "success": true, "message": "AltaRegistroFacturacion created successfully", "code": 201, "data": { "count": 1, "items": [ { "id": 2, "previous_id": null, "alta_o_anulacion": 1, "id_registro_anulado": null, "modificacionOSubsanacion": "SUBSANAR", "id_registro_modificadoOSubsanado": 1, "IDEmisorFactura": "47859447N", "NumSerieFactura": "AX/2025-102", "NumSerie": "AX/2025", "NumFactura": "102", "FechaExpedicionFactura": "2025-12-17", "HoraExpedicionFactura": "10:00:00", "FechaOperacion": "2022-07-10", "DescripcionOperacion": null, "NombreRazonDestinatario": "Lluis Martinez", "NIFDestinatario": "47859447N", "RefExterna": null, "CuotaTotal": null, "ImporteTotal": "121", "moneda": "EUR", "BaseRectificada": null, "CuotaRectificada": null, "CuotaRecargoRectificada": null, "tag": null, "webhook_id": null, "verifactu": false, "no_verifactu": false, "tbai": true, "face": 0, "json": "JSON recibido por la API", "base64_pdf": null, "base64_qr_pdf": null, "url_qr": null, "qr_image": null, "qr_x": null, "qr_y": null, "qr_page": 1, "remitenteNacional": 1, "next_id": null, "IDVersion": 1, "VariosDestinatarios": 2, "EmitidaPorTercODesti": 2, "FacturaSimplificada": 2, "FacturaEmitidaSustSimp": 2, "DescripcionFactura": "Test Desc Factura", "CodigoRectificativa": null, "TipoRectificativa": null, "RetencionSoportada": null, "BaseImponibleACoste": null, "FechaExpedicionFacturaAnterior": "2025-12-17", "NumSerieAnterior": "AX/2025", "NumFacturaAnterior": "102", "SignatureValueFacturaAnterior": "SignatureValueFacturaAnterior", "xml_tbai": null, "xml_signed": "XML firmado", "SignatureValue": "SignatureValue", "xml_tbai_response": null, "estado_tbai": null, "estado_registro_tbai": "No Registrado", "codigo_error_tbai": null, "descripcion_error_tbai": null, "envio_tbai_id": null, "NumSerieDispositivo": null, "ModeloLROE": null, "EpigrafeLROE": null } ] } }`

Envíos

Listado de envíos

requires authentication

Muestra un listado paginado de todos los envíos a Tbai.

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

url = 'https://app.verifactuapi.es/api/envios-tbai'
headers = {
  'Authorization': 'Bearer avVc5k3ghEPa4e6D1fbZ86d',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
  "success": true,
  "code": 200,
  "message": "Envíos Tbai listed successfully",
  "data": {
     "items": [
         {
             "id": 1,
             "IDEmisor": "12345678A",
             "endpoint": "https://pruebas-ticketbai.araba.eus/TicketBAI/v1/facturas/",
             "xml_envio": "</xml>",
             "xml_respuesta": "</xml>",
             "tbai_id": "TBAI-97192097P-090125-K+bigfSdRLk0n-140",
             "estado_tbai": "Recibido",
             "codigo_error_tbai": null,
             "descripcion_error_tbai": null,
             "fecha_hora_envio": "2024-12-17 11:21:22",
             "fecha_hora_respuesta": "2024-12-17 11:21:22",
             "created_at": "2024-12-17T10:21:22.000000Z",
             "updated_at": "2024-12-17T10:21:22.000000Z",
             "deleted_at": null
         },
     ],
     "count": 1
 },
 "pagination": {
     "total": 1,
     "perPage": 1,
     "currentPage": 1,
     "lastPage": 1
 }
}
 

Example response (401):


{
    "success": false,
    "message": "El IDEmisor no coincide con el de tu cuenta.",
    "error": 401,
    "code": 401
}
 

Request   

GET api/envios-tbai

Headers

Authorization      

Example: Bearer avVc5k3ghEPa4e6D1fbZ86d

Content-Type      

Example: application/json

Obtener un envío

requires authentication

Muestra un envío Tbai específico. Se filtra por el ID del envío.

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

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

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Envío Tbai obtained successfully",
    "data": {
        "items": {
            "id": 1,
            "IDEmisor": "12345678A",
            "endpoint": "https://pruebas-ticketbai.araba.eus/TicketBAI/v1/facturas/",
            "xml_envio": "</xml>",
            "xml_respuesta": "</xml>",
            "tbai_id": "TBAI-97192097P-090125-K+bigfSdRLk0n-140",
            "estado_tbai": "Recibido",
            "codigo_error_tbai": null,
            "descripcion_error_tbai": null,
            "fecha_hora_envio": "2024-12-17 11:21:22",
            "fecha_hora_respuesta": "2024-12-17 11:21:22",
            "created_at": "2024-12-17T10:21:22.000000Z",
            "updated_at": "2024-12-17T10:21:22.000000Z",
            "deleted_at": null
        }
    }
}
 

Example response (404):


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

Request   

GET api/envios-tbai/{id}

Headers

Authorization      

Example: Bearer ba1D3k6avfghEc856eZ4PVd

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

Software TBAI

Obtener software TBAI

requires authentication

Muestra el software TBAI de la provincia indicada. se indica como ultimo parametro de la url. Admite los siguientes valores: alava, araba, guipuzcoa, gipuzkoa, vizcaya, bizkaia.

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

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://app.verifactuapi.es/api/software-tbai/alava" \
    --header "Authorization: Bearer 4fPVkbDcaavg5Z6e36hd8E1" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/software-tbai/alava'
headers = {
  'Authorization': 'Bearer 4fPVkbDcaavg5Z6e36hd8E1',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Software TBAI obtenido correctamente",
    "data": {
        "CIF": "123456789",
        "NombreRazon": "Nombre de la razón",
        "NombreSoftware": "Nombre del software",
        "Version": "1.0"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Provincia TBAI no válida",
    "error": 400,
    "code": 400
}
 

Request   

GET api/software-tbai/{type}

Headers

Authorization      

Example: Bearer 4fPVkbDcaavg5Z6e36hd8E1

Content-Type      

Example: application/json

URL Parameters

type   string   

La provincia del software TBAI que se desea obtener. (alava, araba, guipuzcoa, gipuzkoa, vizcaya, bizkaia) Example: alava

Webhook

Listar Webhooks

requires authentication

Muestra un listado con todos los webhooks generados en la API.

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

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

Content-Type      

Example: application/json

Obtener los logs de un webhook

requires authentication

Obtiene los logs asociados a un webhook específico.

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

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://app.verifactuapi.es/api/webhook/1/logs" \
    --header "Authorization: Bearer vP8bhED64akg6eZ15fd3acV" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/webhook/1/logs'
headers = {
  'Authorization': 'Bearer vP8bhED64akg6eZ15fd3acV',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "code": 200,
    "message": "Webhook logs listed successfully",
    "data": {
        "items": [
            {
                "id": 1,
                "webhook_id": 1,
                "url": "https://webhook.site/c500a769-9e2e-434c-bdeb-6333705404b6/{id}",
                "invoice_id": 1,
                "status": "success",
                "response_body": null,
                "http_status_code": 200,
                "error_message": "",
                "attempt_number": 1,
                "next_retry_at": null,
                "request_headers": [
                    "Authorization: Bearer m7&A,$'(6qYjg+BZ#su_3!"
                ],
                "request_body": {
                    "estado": "Correcto",
                    "num_serie": "AZ50/55",
                    "factura_id": 1,
                    "codigo_error": "",
                    "descripcion_error": "",
                    "fecha_notificacion": "2025-05-16 12:20:46"
                },
                "response_headers": false,
                "execution_time": "2706.142",
                "created_at": "2025-05-16T10:20:46.000000Z",
                "updated_at": "2025-05-16T10:21:12.000000Z"
            }
        ],
        "count": 1
    },
    "pagination": {
        "total": 1,
        "perPage": 10,
        "currentPage": 1,
        "lastPage": 1
    }
}
 

Example response (404):


{
    "success": false,
    "message": "No se encontró el webhook especificado.",
    "error": 404,
    "code": 404
}
 

Request   

GET api/webhook/{id}/logs

Headers

Authorization      

Example: Bearer vP8bhED64akg6eZ15fd3acV

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

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

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

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

Generar un webhook

requires authentication

Genera un nuevo webhook para ser utilizado en la API.

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

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. Solo puede ser POST, GET, PUT o PATCH. 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 los datos de un webhook existente.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/webhook/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer a6D168Pfhgv5dcbV3k4aeEZ',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "url": "https://webhook.site/766f4435-f4f9-414b-b26f-47dbd10339ce/{id}",
    "http_method": "POST",
    "secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
    "tag": "emisor_2",
    "description": "Webhook para el emisor 2"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/webhook/1"
);

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

let body = {
    "url": "https:\/\/webhook.site\/766f4435-f4f9-414b-b26f-47dbd10339ce\/{id}",
    "http_method": "POST",
    "secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
    "tag": "emisor_2",
    "description": "Webhook para el emisor 2"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request PUT \
    "https://app.verifactuapi.es/api/webhook/1" \
    --header "Authorization: Bearer a6D168Pfhgv5dcbV3k4aeEZ" \
    --header "Content-Type: application/json" \
    --data "{
    \"url\": \"https:\\/\\/webhook.site\\/766f4435-f4f9-414b-b26f-47dbd10339ce\\/{id}\",
    \"http_method\": \"POST\",
    \"secret_key\": \"m7&A,$\'(6qYjg+BZ#su_3!\",
    \"tag\": \"emisor_2\",
    \"description\": \"Webhook para el emisor 2\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/webhook/1'
payload = {
    "url": "https:\/\/webhook.site\/766f4435-f4f9-414b-b26f-47dbd10339ce\/{id}",
    "http_method": "POST",
    "secret_key": "m7&A,$'(6qYjg+BZ#su_3!",
    "tag": "emisor_2",
    "description": "Webhook para el emisor 2"
}
headers = {
  'Authorization': 'Bearer a6D168Pfhgv5dcbV3k4aeEZ',
  '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/{id}

Headers

Authorization      

Example: Bearer a6D168Pfhgv5dcbV3k4aeEZ

Content-Type      

Example: application/json

URL Parameters

id   integer   

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

Body Parameters

url   string  optional  

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

http_method   string  optional  

optional El método HTTP del webhook. Solo puede ser POST, GET, PUT o PATCH. Example: POST

secret_key   string  optional  

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

tag   string  optional  

optional La etiqueta del webhook. Example: emisor_2

description   string  optional  

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

Consultas Externas

Verificar destinatarios

requires authentication

Endpoint antiguo, mantenido para compatibilidad. Ver documentación de censoAeat.

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

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/destinatarios/validar" \
    --header "Authorization: Bearer 1Pc5V66DEZ8vah3fg4debka" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/destinatarios/validar'
headers = {
  'Authorization': 'Bearer 1Pc5V66DEZ8vah3fg4debka',
  'Content-Type': 'application/json'
}

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

Request   

POST api/destinatarios/validar

Headers

Authorization      

Example: Bearer 1Pc5V66DEZ8vah3fg4debka

Content-Type      

Example: application/json

Censo AEAT

requires authentication

Verificar los datos de uno o varios destinatarios en el censo de AEAT para validar su existencia.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/censo-aeat';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 1dcegPf6Z3k85a6EaD4vVbh',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "Destinatarios": [
        {
            "NIF": "39707287H",
            "NombreRazon": "IVAN SOLE"
        },
        {
            "NIF": "B70912613"
        }
    ]
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/censo-aeat"
);

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

let body = {
    "Destinatarios": [
        {
            "NIF": "39707287H",
            "NombreRazon": "IVAN SOLE"
        },
        {
            "NIF": "B70912613"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/censo-aeat" \
    --header "Authorization: Bearer 1dcegPf6Z3k85a6EaD4vVbh" \
    --header "Content-Type: application/json" \
    --data "{
    \"Destinatarios\": [
        {
            \"NIF\": \"39707287H\",
            \"NombreRazon\": \"IVAN SOLE\"
        },
        {
            \"NIF\": \"B70912613\"
        }
    ]
}"
import requests
import json

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

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

Example response (200):


{
    "success": true,
    "message": "Datos consultados correctamente",
    "code": 200,
    "data": [
        {
            "NIF": "39707287H",
            "NombreRazon": "IVAN SOLE",
            "NIF_response": "39707287H",
            "NombreRazon_response": "SOLE MARTINEZ IVAN",
            "status_response": "IDENTIFICADO"
        },
        {
            "NIF": "B70912613",
            "NombreRazon": null,
            "NIF_response": "B70912613",
            "NombreRazon_response": "NEMON INVOICE TO CASH",
            "status_response": "IDENTIFICADO"
        }
    ]
}
 

Example response (400):


{
    "success": false,
    "message": "La solicitud está vacía o contiene errores de formato.",
    "code": 400,
    "data": null
}
 

Example response (404):


{
    "success": false,
    "message": "Error de conexion con AEAT al consultar los datos, intente-lo mas tarde.",
    "code": 404,
    "data": null
}
 

Request   

POST api/censo-aeat

Headers

Authorization      

Example: Bearer 1dcegPf6Z3k85a6EaD4vVbh

Content-Type      

Example: application/json

Body Parameters

Destinatarios   string[]   

El array de destinatarios a verificar.

*   object  optional  
NIF   string   

El NIF del destinatario. Example: qui

NombreRazon   string  optional  

optional El nombre del destinatario. Example: consectetur

Utilidades

Server Status

Devuelve el estado del servidor. Si la petición llega aquí, el servidor está funcionando.

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

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://app.verifactuapi.es/api/status" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/status'
headers = {
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "status": "UP",
    "message": "Server is running",
    "code": 200
}
 

Request   

GET api/status

Headers

Content-Type      

Example: application/json

Otorgamientos

Verifactu

Generar PDF otorgamiento

requires authentication

Genera el PDF de otorgamiento de un emisor Verifactu.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 1vPcDdg5b3eE64aZf8Vhk6a',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "municipio": "Castellon",
    "via_publica": "C/Principal",
    "numero": "5",
    "representante": []
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "municipio": "Castellon",
    "via_publica": "C\/Principal",
    "numero": "5",
    "representante": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento" \
    --header "Authorization: Bearer 1vPcDdg5b3eE64aZf8Vhk6a" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"municipio\": \"Castellon\",
    \"via_publica\": \"C\\/Principal\",
    \"numero\": \"5\",
    \"representante\": []
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/generar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "municipio": "Castellon",
    "via_publica": "C\/Principal",
    "numero": "5",
    "representante": []
}
headers = {
  'Authorization': 'Bearer 1vPcDdg5b3eE64aZf8Vhk6a',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento generado correctamente",
    "code": 200,
    "data": {
        "nombre": "Empresa S.L.",
        "nif": "B33912413",
        "municipio": "Ascó",
        "via_publica": "C/test",
        "numero": "5",
        "representante": {
            "nombre": "Pedro Perez",
            "nif": "12345678A",
            "municipio": "Castellon",
            "via_publica": "C/Principal",
            "numero": "10"
        },
        "otorgamiento_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/verifactu/generar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer 1vPcDdg5b3eE64aZf8Vhk6a

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

municipio   string   

El municipio del emisor. Example: Castellon

via_publica   string   

La vía pública del emisor. Example: C/Principal

numero   string   

El número de la vía pública del emisor. Example: 5

representante   object  optional  

conditional Datos del representante del emisor. Es obligatorio cuando el NIF del emisor corresponde a empresa/entidad (comienza por A,B,C,D,E,F,G,H,J,N,P,Q,R,S,U,V,W) y está prohibido cuando el NIF corresponde a persona física.

nombre   string  optional  

required_when:representante presente El nombre del representante del emisor.

nif   string  optional  

required_when:representante presente El NIF del representante del emisor.

municipio   string  optional  

required_when:representante presente El municipio del representante del emisor.

via_publica   string  optional  

required_when:representante presente La vía pública del representante del emisor.

numero   string  optional  

required_when:representante presente El número de la vía pública del representante del emisor.

Importar el PDF de otorgamiento

requires authentication

Importa el PDF de otorgamiento de un emisor Verifactu y sus adjuntos.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer g4eVbEfa3v1Z5c6a6dPhD8k',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64",
    "adjuntos_base64": [
        "jpg en base 64",
        "png en base 64"
    ]
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64",
    "adjuntos_base64": [
        "jpg en base 64",
        "png en base 64"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento" \
    --header "Authorization: Bearer g4eVbEfa3v1Z5c6a6dPhD8k" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"otorgamiento_base64\": \"pdf en base 64\",
    \"adjuntos_base64\": [
        \"jpg en base 64\",
        \"png en base 64\"
    ]
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/verifactu/importar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64",
    "adjuntos_base64": [
        "jpg en base 64",
        "png en base 64"
    ]
}
headers = {
  'Authorization': 'Bearer g4eVbEfa3v1Z5c6a6dPhD8k',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento importado correctamente",
    "code": 200,
    "data": {
        "nif": "B33912413",
        "nombre": "Empresa S.L.",
        "otorgamiento_importado_base64": "pdf en base 64",
        "adjunto_importado_base64": "pdf adjunto en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/verifactu/importar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer g4eVbEfa3v1Z5c6a6dPhD8k

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

otorgamiento_base64   string   

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

adjuntos_base64   string[]   

Array de adjuntos en base 64. Debe contener 1 o 2 elementos. Formatos soportados: pdf, png, jpg, jpeg.

Generar PDF otorgamiento (LEGACY)

requires authentication

Visitar la documentacion en la nueva ruta /otorgamientos/verifactu/generar-pdf-otorgamiento Este endpoint está obsoleto, se mantiene para compatibilidad con versiones anteriores.

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

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/emisor/pdf-otorgamiento" \
    --header "Authorization: Bearer aEPd6af5V6bg81vZh3ek4Dc" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/pdf-otorgamiento'
headers = {
  'Authorization': 'Bearer aEPd6af5V6bg81vZh3ek4Dc',
  'Content-Type': 'application/json'
}

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

Request   

POST api/emisor/pdf-otorgamiento

Headers

Authorization      

Example: Bearer aEPd6af5V6bg81vZh3ek4Dc

Content-Type      

Example: application/json

Importar el PDF de otorgamiento (LEGACY)

requires authentication

Visitar la documentacion en la nueva ruta /otorgamientos/verifactu/importar-pdf-otorgamiento Este endpoint está obsoleto, se mantiene para compatibilidad con versiones anteriores.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer Evhk3DV6db8e4c6afPga5Z1',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento" \
    --header "Authorization: Bearer Evhk3DV6db8e4c6afPga5Z1" \
    --header "Content-Type: application/json"
import requests
import json

url = 'https://app.verifactuapi.es/api/emisor/importar-pdf-otorgamiento'
headers = {
  'Authorization': 'Bearer Evhk3DV6db8e4c6afPga5Z1',
  'Content-Type': 'application/json'
}

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

Request   

POST api/emisor/importar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer Evhk3DV6db8e4c6afPga5Z1

Content-Type      

Example: application/json

Araba

Generar PDF otorgamiento

requires authentication

Genera el PDF de otorgamiento de un emisor TBAI de Araba.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer g6eD1kb3VZEPa5vc6ahf84d',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "domicilio_fiscal": "C/Principal",
    "municipio": "Castellon",
    "provincia": "Tarragona",
    "representante": []
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "domicilio_fiscal": "C\/Principal",
    "municipio": "Castellon",
    "provincia": "Tarragona",
    "representante": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento" \
    --header "Authorization: Bearer g6eD1kb3VZEPa5vc6ahf84d" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"domicilio_fiscal\": \"C\\/Principal\",
    \"municipio\": \"Castellon\",
    \"provincia\": \"Tarragona\",
    \"representante\": []
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/araba/generar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "domicilio_fiscal": "C\/Principal",
    "municipio": "Castellon",
    "provincia": "Tarragona",
    "representante": []
}
headers = {
  'Authorization': 'Bearer g6eD1kb3VZEPa5vc6ahf84d',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento generado correctamente",
    "code": 200,
    "data": {
        "nombre": "Empresa S.L.",
        "nif": "B33912413",
        "domicilio_fiscal": "C/Principal",
        "municipio": "Castellon",
        "cp": "12345",
        "provincia": "Tarragona",
        "representante": {
            "nombre": "Pedro Perez",
            "nif": "12345678A"
        },
        "otorgamiento_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/araba/generar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer g6eD1kb3VZEPa5vc6ahf84d

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

domicilio_fiscal   string   

El domicilio fiscal del emisor. Example: C/Principal

municipio   string   

El municipio del emisor. Example: Castellon

provincia   string   

La provincia del emisor. Example: Tarragona

representante   object  optional  

conditional Datos del representante del emisor. Es obligatorio cuando el NIF del emisor corresponde a empresa/entidad (comienza por A,B,C,D,E,F,G,H,J,N,P,Q,R,S,U,V,W) y está prohibido cuando el NIF corresponde a persona física.

nombre   string  optional  

required_when:representante presente El nombre del representante del emisor.

nif   string  optional  

required_when:representante presente El NIF del representante del emisor.

Importar el PDF de otorgamiento

requires authentication

Importa el PDF de otorgamiento de un emisor TBAI de Araba.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer cbPhdVkg1aDv63aefE6Z485',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento" \
    --header "Authorization: Bearer cbPhdVkg1aDv63aefE6Z485" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"otorgamiento_base64\": \"pdf en base 64\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/araba/importar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
}
headers = {
  'Authorization': 'Bearer cbPhdVkg1aDv63aefE6Z485',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento importado correctamente",
    "code": 200,
    "data": {
        "nif": "B33912413",
        "nombre": "Empresa S.L.",
        "otorgamiento_importado_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/araba/importar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer cbPhdVkg1aDv63aefE6Z485

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

otorgamiento_base64   string   

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

Bizkaia

Generar PDF otorgamiento

requires authentication

Genera el PDF de otorgamiento de un emisor TBAI de Bizkaia.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer f45DeP6abhk1a8cZdE6V3gv',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "domicilio_fiscal": "C/Principal",
    "municipio": "Castellon",
    "provincia": "Tarragona",
    "representante": []
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "domicilio_fiscal": "C\/Principal",
    "municipio": "Castellon",
    "provincia": "Tarragona",
    "representante": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento" \
    --header "Authorization: Bearer f45DeP6abhk1a8cZdE6V3gv" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"domicilio_fiscal\": \"C\\/Principal\",
    \"municipio\": \"Castellon\",
    \"provincia\": \"Tarragona\",
    \"representante\": []
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/generar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "domicilio_fiscal": "C\/Principal",
    "municipio": "Castellon",
    "provincia": "Tarragona",
    "representante": []
}
headers = {
  'Authorization': 'Bearer f45DeP6abhk1a8cZdE6V3gv',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento generado correctamente",
    "code": 200,
    "data": {
        "nombre": "Empresa S.L.",
        "nif": "B33912413",
        "domicilio_fiscal": "C/Principal",
        "municipio": "Castellon",
        "cp": "12345",
        "provincia": "Tarragona",
        "representante": {
            "nombre": "Pedro Perez",
            "nif": "12345678A"
        },
        "otorgamiento_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/bizkaia/generar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer f45DeP6abhk1a8cZdE6V3gv

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

domicilio_fiscal   string   

El domicilio fiscal del emisor. Example: C/Principal

municipio   string   

El municipio del emisor. Example: Castellon

provincia   string   

La provincia del emisor. Example: Tarragona

representante   object  optional  

conditional Datos del representante del emisor. Es obligatorio cuando el NIF del emisor corresponde a empresa/entidad (comienza por A,B,C,D,E,F,G,H,J,N,P,Q,R,S,U,V,W) y está prohibido cuando el NIF corresponde a persona física.

nombre   string  optional  

required_when:representante presente El nombre del representante del emisor.

nif   string  optional  

required_when:representante presente El NIF del representante del emisor.

Importar el PDF de otorgamiento

requires authentication

Importa el PDF de otorgamiento de un emisor TBAI de Bizkaia.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 6Ecg4P6a8v5e3ZbaVDf1dkh',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento" \
    --header "Authorization: Bearer 6Ecg4P6a8v5e3ZbaVDf1dkh" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"otorgamiento_base64\": \"pdf en base 64\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/bizkaia/importar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
}
headers = {
  'Authorization': 'Bearer 6Ecg4P6a8v5e3ZbaVDf1dkh',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento importado correctamente",
    "code": 200,
    "data": {
        "nif": "B33912413",
        "nombre": "Empresa S.L.",
        "otorgamiento_importado_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/bizkaia/importar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer 6Ecg4P6a8v5e3ZbaVDf1dkh

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

otorgamiento_base64   string   

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

Gipuzkoa

Generar PDF otorgamiento

requires authentication

Genera el PDF de otorgamiento de un emisor TBAI de Gipuzkoa.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer df63c48EVahP6a5Dk1vgbZe',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento" \
    --header "Authorization: Bearer df63c48EVahP6a5Dk1vgbZe" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1
}
headers = {
  'Authorization': 'Bearer df63c48EVahP6a5Dk1vgbZe',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento generado correctamente",
    "code": 200,
    "data": {
        "otorgamiento_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/gipuzkoa/generar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer df63c48EVahP6a5Dk1vgbZe

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

Importar el PDF de otorgamiento

requires authentication

Importa el PDF de otorgamiento de un emisor TBAI de Gipuzkoa.

Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer 8fZPbg51a6v3cDhVdE6k4ea',
            'Content-Type' => 'application/json',
        ],
        'json' => {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
},
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento"
);

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

let body = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
curl --request POST \
    "https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento" \
    --header "Authorization: Bearer 8fZPbg51a6v3cDhVdE6k4ea" \
    --header "Content-Type: application/json" \
    --data "{
    \"nif\": \"A39200019\",
    \"id_emisor\": 1,
    \"otorgamiento_base64\": \"pdf en base 64\"
}"
import requests
import json

url = 'https://app.verifactuapi.es/api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento'
payload = {
    "nif": "A39200019",
    "id_emisor": 1,
    "otorgamiento_base64": "pdf en base 64"
}
headers = {
  'Authorization': 'Bearer 8fZPbg51a6v3cDhVdE6k4ea',
  'Content-Type': 'application/json'
}

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

Example response (200):


{
    "success": true,
    "message": "Otorgamiento importado correctamente",
    "code": 200,
    "data": {
        "nif": "B33912413",
        "nombre": "Empresa S.L.",
        "otorgamiento_importado_base64": "pdf en base 64"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Debes informar al menos uno de los siguientes campos: nif o id_emisor",
    "error": 400,
    "code": 400
}
 

Request   

POST api/otorgamiento/gipuzkoa/importar-pdf-otorgamiento

Headers

Authorization      

Example: Bearer 8fZPbg51a6v3cDhVdE6k4ea

Content-Type      

Example: application/json

Body Parameters

nif   string  optional  

optional El NIF del emisor. Obligatorio si no se informa id_emisor. Example: A39200019

id_emisor   integer  optional  

optional El ID del emisor. Obligatorio si no se informa nif. Example: 1

otorgamiento_base64   string   

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