Saltar al contenido
MultiFactu · Blume POC
English
Esc
navigateopen⌘Jpreview

Cancel invoice in deferred mode (canonical command endpoint)

POST/no-verifactu/invoices/cancellations
Request body
requiredapplication/json
generated_bystring
Indica quién genera el registro de anulación: E=Expedidor, D=Destinatario, T=Tercero
Allowed:EDT
generatorobject
Datos del generador (obligatorio si generated_by está informado)
Show properties
id_otroobject
IDOtro del generador (si no se identifica por NIF)
Show properties
country_codestring
Country code in ISO 3166-1 alpha-2 format (e.g., FR, DE, IT). Required unless id_type = 02 (NIF-IVA). Not allowed when id_type = 07 and country ≠ ES.
idstringrequired
Identifier value. Maximum 20 characters.
min length 1 · max length 20
id_typestringrequired
Type of identification: • 02 = NIF-IVA (EU VAT number) • 03 = Passport • 04 = Official identification document issued in country of residence • 05 = Residence certificate • 06 = Other supporting document • 07 = Not registered in census (only allowed for Spain)
Allowed:020304050607
namestringrequired
NombreRazon del generador del registro de anulación
max length 120
NIFstring
NIF del generador (si se identifica por NIF)
incidencestring
Set to "S" only if an incident occurred during cancellation
matches FLAG_S_RE
issue_datestringrequired
Issue date of the invoice to cancel (DD-MM-YYYY). Cannot be future date.
matches ISSUE_DATE_RE
numberstringrequired
Invoice number. Required. The concatenation of series + number cannot exceed 60 characters.
previous_rejectionstring
N = First cancellation attempt (or invoice was accepted) S = Previous cancellation was rejected by AEAT (retry)
default: "N"
Allowed:NS
seriesstringrequired
Invoice series. Can be empty string (""). Must not begin with a space. The concatenation of series + number cannot exceed 60 characters.
matches NO_LEADING_SPACE_OR_EMPTY_RE
without_prior_registrationstring
N = Invoice IS registered in AEAT (most common case) S = Invoice was NEVER registered in AEAT (e.g. cancel before sending, or error in emission)
default: "N"
Allowed:NS
Responses
200Invoice successfully canceled
correlationIdstringrequired
Correlation ID for tracking this cancellation request across distributed systems
dataobjectrequired
Cancellation data returned after successful submission to AEAT
Show properties
csvstring
CSV devuelto por AEAT para el registro
estadostringrequired
Validation status returned by VeriFactu AEAT for the cancellation
Allowed:CorrectaAceptadaConErroresIncorrecto
huellastringrequired
VeriFactu hash (huella) of the cancellation record - SHA-256 fingerprint used for chain integrity
min length 64 · max length 64
idPeticionstring
IdPeticion devuelto por AEAT
nifPresentadorstring
NIFPresentador devuelto por AEAT
timestampPresentacionstring
TimestampPresentacion devuelto por AEAT
uuidstring<uuid>required
Unique identifier (UUID) of the cancellation record in the system
successbooleanrequired
Indicates whether the cancellation submission was successful
warningobject
Present only when VeriFactu accepts the cancellation with correctable errors (EstadoRegistro = 'AceptadaConErrores'). These are admissible errors in the RegistroAnulacion that don't prevent cancellation registration.
Show properties
additionalErrorInfoobject
Additional detailed error information
Show properties
causastringrequired
Root cause of the error
messagestringrequired
Brief error message describing the issue
solucionstringrequired
Detailed solution or recommended action to resolve the error
subsanablebooleanrequired
Indicates whether the error is correctable/recoverable through subsanation (correction) process
codigostringrequired
Error code from VeriFactu (correctable error code 2000-2999)
mensajestringrequired
Human-readable error description from VeriFactu AEAT
severitystringrequired
Severity level of the warning
Allowed:warning
typestringrequired
Warning type identifier
400Bad request
correlationIdstringrequired
messagestringrequired
pathstringrequired
statusCodenumberrequired
successbooleanrequired
timestampstringrequired
422Unprocessable error
correlationIdstringrequired
errorDetailsobject
Present only when the error comes from VeriFactu submission
Show properties
verifactuErrorVerifactuErrorrequired
Show properties
causastring
Root cause of the error
codigoErrorRegistrostring
descripcionErrorRegistrostring
errorTypestringrequired
Allowed:ADMISSIBLEINADMISSIBLE
messagestring
Brief error message describing the issue
registroDuplicadoobject
Información del registro ya existente cuando AEAT rechaza por duplicidad
Show properties
codigoErrorRegistrostring
Código de error del registro duplicado almacenado en AEAT, si aplica
descripcionErrorRegistrostring
Descripción del error del registro duplicado almacenado en AEAT, si aplica
estadoRegistroDuplicadostring
Estado del registro duplicado almacenado en AEAT (Correcta, AceptadaConErrores, Anulada)
idPeticionRegistroDuplicadostring
IdPeticion asociado a la factura registrada previamente en AEAT (solo se informa si el rechazo es por duplicidad)
solucionstring
Detailed solution or recommended action to resolve the error
subsanableboolean
Indicates whether the error is correctable/recoverable through subsanation (correction) process
messagestringrequired
pathstringrequired
statusCodenumberrequired
successbooleanrequired
timestampstringrequired
500Internal server error
correlationIdstringrequired
messagestringrequired
pathstringrequired
statusCodenumberrequired
successbooleanrequired
timestampstringrequired
Request
curl -X POST "https://api.multifactu.com/no-verifactu/invoices/cancellations" \
  -H "Content-Type: application/json" \
  -d '{
  "generated_by": "E",
  "generator": {
    "id_otro": {
      "country_code": "FR",
      "id": "FR123456789",
      "id_type": "02"
    },
    "name": "ACME Asesores S.L.",
    "NIF": "B12345678"
  },
  "incidence": "S",
  "issue_date": "07-12-2025",
  "number": "2025/00123",
  "previous_rejection": "N",
  "series": "",
  "without_prior_registration": "N"
}'
Response
{
  "correlationId": "550e8400-e29b-41d4-a716-446655440000",
  "data": {
    "csv": "CSV1234567890",
    "estado": "Correcta",
    "huella": "4C5E93A95C5F78A45EE1D0GB5598GAFE0FG565C26B2B13FCC9AC2DBEF00C70GA",
    "idPeticion": "1234567890ABCDEF",
    "nifPresentador": "B12345678",
    "timestampPresentacion": "2025-01-01T12:34:56",
    "uuid": "dcfe95fd-b6b8-5bg4-b9gb-4d865c43822b"
  },
  "success": true,
  "warning": {
    "codigo": "2007",
    "mensaje": "No debería informarse como primer registro; existen facturas emitidas con el obligado emisor y el sistema informático actual. Should not be reported as first record - previous invoices exist.",
    "severity": "warning",
    "type": "verifactu_accepted_with_errors"
  }
}