Saltar a contenido

Create invoice draft


title: Create an invoice draft

Create a CFDI draft for the calling issuer from a whole CFDI document (the Comprobante JSON object). The document is validated and stored as given; the result is the stored invoice in the get_invoice shape, with version 1. A type I draft may omit Receptor (a receiver can fill it in through share_invoice_draft), but it is required to sign. Returns a needs_csd status instead of a draft if the issuer has no CSD.

Alcance (scope): invoices:write · Características: —

Parámetros

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

Esquema de entrada (JSON Schema)

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