Factuarea APIDevelopers

Anular el envío de una factura

Clear the delivery marker (sent_at) of a sent invoice while keeping its sent status.

  • The correlative number and VeriFactu record stay intact — the invoice is not reverted to draft and remains immutable per AEAT.
  • Use it to undo an accidental mark-as-sent.
  • Idempotent: a no-op when sent_at is already null.
  • It does not touch stock: undoing the delivery marker does NOT return any goods to the warehouse, because the movement was booked when the invoice was issued and not when it was marked as sent.
  • To undo the sale itself — and with it its stock — void the invoice or issue a corrective one.
POST
/invoices/{invoice}/unsend
AuthorizationBearer <token>

En: header

Parámetros de ruta

invoice*string

Headers

Idempotency-Key?string

Clave opaca generada por el cliente (hasta 255 caracteres; se recomienda UUID v7) que hace seguros los reintentos: la primera respuesta se cachea y se reproduce en las repeticiones sin volver a ejecutar la mutación. Reutilizar una clave con un cuerpo distinto devuelve 409 idempotency_key_reused. Consulta la guía de Idempotency.

Longitud1 <= length <= 255
Factuarea-Version?string

Fija la versión de la API (YYYY-MM-DD, versionado por fecha estilo Stripe) para esta petición; omítelo para usar la versión fijada de la clave, o la última si no hay ninguna. Versión no soportada → 400 unsupported_api_version; malformada → 400 parameter_invalid_format. La versión efectiva se refleja en la cabecera de respuesta Factuarea-Version. Consulta la guía de Versioning.

Formatodate
X-Active-Profile?string

Opera en nombre de una empresa hija (API key maestra de gestoría): pasa su id público (UUID v7) y la petición se ejecuta contra los datos de esa hija sin cambiar el scope, el tier ni el environment de la clave (omítelo para usar la propia empresa de la clave). UUID inválido → 400 parameter_invalid_uuid; id desconocido o no propio → 404 profile_not_found. Consulta la guía de Acting on behalf.

Formatouuid

Cuerpo de la respuesta

application/json

application/json

application/json

application/json

application/json

application/json

application/json