Saltar a contenido

Update invoice draft


title: Update an invoice draft

Replace the whole CFDI document of a draft invoice. expected_version is the version last read; a stale version answers a conflict with the current version. Drafts only, and not while the draft has an open share link (revoke_invoice_share closes it); returns the stored invoice in the get_invoice shape.

Alcance (scope): invoices:write · Características: Destructiva, Idempotente

Parámetros

Parámetro Tipo Obligatorio Descripción
invoice_id string Sí
cfdi object Sí The CFDI 4.0 Comprobante document.
expected_version integer Sí
issuer string Sí Id of the issuer the call acts for, from list_issuers.

Esquema de entrada (JSON Schema)

{
  "type": "object",
  "properties": {
    "invoice_id": {
      "type": "string"
    },
    "cfdi": {
      "type": "object",
      "description": "The CFDI 4.0 Comprobante document."
    },
    "expected_version": {
      "type": "integer",
      "minimum": 1
    },
    "issuer": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the issuer the call acts for, from list_issuers."
    }
  },
  "required": [
    "invoice_id",
    "cfdi",
    "expected_version",
    "issuer"
  ]
}