# Basic operation Here you will find the technical documentation of our API for general management of your NIFs in our system.
NIFs can be created in the test environment, which communicates with the administration's test environment.
GET /nifsList NIFs
This endpoint returns a list of all NIFs.
| Status | Description |
|---|---|
200 | NIF list |
400 | Invalid query parameters |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error. |
POST /nifsAdd NIFs
This endpoint adds new NIFs.
| Status | Description |
|---|---|
200 | NIF |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
409 | NIF already exists |
500 | Internal server error. |
GET /nifs/{entorno}/{nif}NIF Information
This endpoint returns the information of a specific NIF.
| Status | Description |
|---|---|
200 | NIF |
401 | Unauthorized — invalid or missing API key. |
404 | NIF not found |
500 | Internal server error. |
PUT /nifs/{entorno}/{nif}Modify NIF
This endpoint allows modifying the information of a specific NIF.
| Field | Type | Required | Description |
|---|---|---|---|
nombre | string | no | Full name or company name of the NIF. |
direccion | string | no | NIF address. |
cp | string | no | NIF postal code. |
poblacion | string | no | NIF city. |
provincia | string | no | NIF province. |
webhooks | array | no | List of webhook identifiers to which the NIF will be linked. |
label | string | no | Label associated with the NIF. |
| Status | Description |
|---|---|
200 | NIF |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
404 | NIF not found |
500 | Internal server error. |
DELETE /nifs/{entorno}/{nif}Deactivate NIF
This endpoint allows deactivating a NIF.
| Status | Description |
|---|---|
200 | OK |
401 | Unauthorized — invalid or missing API key. |
403 | NIF is already inactive |
404 | NIF not found |
500 | Internal server error. |
DELETE /nifs/{entorno}/{nif}/permanentDelete NIF
This endpoint allows <u><strong>permanently</strong></u> deleting a NIF.
| Status | Description |
|---|---|
200 | OK |
401 | Unauthorized — invalid or missing API key. |
404 | NIF not found |
500 | Internal server error. |
PUT /nifs/activate/{entorno}/{nif}Activate NIF
This endpoint allows activating a NIF that has been previously deactivated.
| Status | Description |
|---|---|
200 | OK |
401 | Unauthorized — invalid or missing API key. |
403 | NIF is already active |
404 | NIF not found |
500 | Internal server error. |
GET /nifs/keys/{entorno}/{nif}NIF API Key
This endpoint returns the API key for a specific NIF in a specific environment.
| Status | Description |
|---|---|
200 | API key |
401 | Unauthorized — invalid or missing API key. |
404 | NIF not found |
500 | Internal server error. |
There are many circumstances where it is useful to validate that a NIF is correct and registered with the administration, for both companies (CIF) and national citizens (DNI) and foreign residents (NIE).
POST /nifs/validarValidate NIF at the AEAT
This endpoint validates whether a NIF of an individual or legal entity is identified at the tax agency.
| Field | Type | Required | Description |
|---|---|---|---|
nif | string | yes | NIF of the individual or legal entity to be verified. |
nombre | string | no | Last name and first name of the individual or company name of the legal entity for which the verification query is to be made. |
| Status | Description |
|---|---|
200 | AEAT response |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error or AEAT service unavailable |
POST /nifs/validar_lotesBatch Validate NIFs
This endpoint allows validating up to 20,000 NIFs in a single call, checking whether each NIF of an individual or legal entity exists.
| Status | Description |
|---|---|
200 | AEAT response |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error or AEAT service unavailable |
POST /nifs/validar/viesValidate VAT in VIES
This endpoint allows validating that an intra-community VAT number is registered in the VIES census.
| Field | Type | Required | Description |
|---|---|---|---|
codigo_pais | string | yes | Country code to which the VAT number belongs. |
iva | string | yes | Intra-community VAT number. |
| Status | Description |
|---|---|
200 | VIES census response |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error. |
To generate and send invoices to the AEAT production environment using our API, it is necessary to fill out a representation grant form and <span style="font-weight: bold; text-decoration: underline">the invoice issuer NIF</span> must sign it digitally.
POST /representacion/generar/{nif}Generate Representation PDF
This endpoint allows downloading the representation grant PDF document for a VeriFactu NIF.
| Field | Type | Required | Description |
|---|---|---|---|
tipo_entidad | object | no | Entity type, individuals or legal entities. |
nombre | string | no | Required for individuals. |
municipio | string | no | Required for individuals. |
calle | string | no | Required for individuals. |
numero | string | no | Required for individuals. |
nombre_entidad | string | no | Required for legal entities. |
municipio_entidad | string | no | Required for legal entities. |
calle_entidad | string | no | Required for legal entities. |
numero_entidad | string | no | Required for legal entities. |
nombre_representante | string | no | Required for legal entities. |
nif_representante | string | no | Required for legal entities. |
municipio_representante | string | no | Required for legal entities. |
calle_representante | string | no | Required for legal entities. |
numero_representante | string | no | Required for legal entities. |
| Status | Description |
|---|---|
200 | Representation grant PDF document |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error. |
POST /representacion/enviar/{nif}Submit Signed PDF
This endpoint submits the representation grant PDF document for a VeriFactu NIF.
| Status | Description |
|---|---|
200 | PDF submitted successfully |
400 | PDF not submitted correctly |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error or failure processing the PDF |
PUT /representacion/cancelar/{nif}Cancel Signed PDF
This endpoint cancels the representation grant PDF document for a VeriFactu NIF.
| Status | Description |
|---|---|
200 | PDF cancelled successfully |
401 | Unauthorized — invalid or missing API key. |
404 | Representation not found |
500 | Internal server error while processing the cancellation |
GET /representacion/descargar/{nif}Download Signed PDF
This endpoint allows downloading the signed representation grant PDF document for a VeriFactu NIF.
| Status | Description |
|---|---|
200 | PDF downloaded successfully |
401 | Unauthorized — invalid or missing API key. |
404 | PDF not found for the given NIF |
500 | Internal server error. |
GET /representacion/estado/{nif}Representation Status
This endpoint allows retrieving the representation status for a NIF.
| Status | Description |
|---|---|
200 | PDF submitted successfully |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error. |
Our platform supports webhooks to receive automatic notifications when a invoicing record is generated.
GET /webhooksList Webhooks
This endpoint returns a list of all configured webhooks.
| Status | Description |
|---|---|
200 | Webhook list |
400 | Invalid query parameters |
401 | Unauthorized — invalid or missing API key. |
500 | Internal server error. |
POST /webhooksAdd Webhook
This endpoint allows registering a webhook.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | URL that will be called when the webhook fires. |
entorno | string | yes | Webhook environment. Can be "test" or "prod". |
secret | object | no | Optional parameter. A secret key shared between our API and the webhook receiver. |
nifs | object | no | NIF list. When invoicing records are sent for any of these NIFs, the webhook will be triggered with the tax authority's result once obtained. |
| Status | Description |
|---|---|
200 | Webhook |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
409 | Webhook already exists with that URL |
500 | Internal server error. |
GET /webhooks/{webhook_id}Webhook Information
This endpoint returns the information of a specific webhook.
| Status | Description |
|---|---|
200 | Webhook |
401 | Unauthorized — invalid or missing API key. |
404 | Webhook not found |
500 | Internal server error. |
PUT /webhooks/{webhook_id}Modify Webhook
This endpoint allows modifying a specific webhook.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | no | URL that will be called when the webhook fires. |
secret | string | no | Key to generate the HMAC signature. |
activo | boolean | no | Indicates whether the webhook will be active or not. |
nifs | array | no | NIF list. When invoicing records are sent for any of these NIFs, the webhook will be triggered with the tax authority's result once obtained. |
| Status | Description |
|---|---|
200 | Webhook |
400 | Invalid input data |
401 | Unauthorized — invalid or missing API key. |
404 | Webhook not found |
409 | Webhook URL conflicts with an existing one |
500 | Internal server error. |
DELETE /webhooks/{webhook_id}Delete Webhook
This endpoint allows deleting a specific webhook.
| Status | Description |
|---|---|
200 | OK |
401 | Unauthorized — invalid or missing API key. |
404 | Webhook not found |
500 | Internal server error. |
POST /webhooks/{webhook_id}/nifs/{nif}Associate NIF with Webhook
This endpoint allows associating a specific NIF with a specific webhook.
| Status | Description |
|---|---|
200 | OK |
401 | Unauthorized — invalid or missing API key. |
404 | Webhook or NIF not found |
500 | Internal server error. |
DELETE /webhooks/{webhook_id}/nifs/{nif}Dissociate NIF from Webhook
This endpoint allows dissociating a specific NIF from a specific webhook.
| Status | Description |
|---|---|
200 | OK |
204 | NIF successfully dissociated from the webhook (no content) |
401 | Unauthorized — invalid or missing API key. |
404 | Webhook or NIF not found |
500 | Internal server error. |