Saltar a contenido

Create a CFDI template

Save a new scoped template of the issuer. Without from_template_id, note and cfdi are required. With from_template_id, the new template starts as a copy of that template's cfdi and note, and a note or cfdi given here replaces that field whole. cfdi must contain TipoDeComprobante, which is I, E or P, and a blank note is refused. The rest of the CFDI is checked when a draft made from the template is validated. The result is the template. A from_template_id the issuer cannot see is not_found.

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

Parámetros

Parámetro Tipo Obligatorio Descripción
name string Sí Name of the template.
note string No What a draft made from the template still needs before it can be signed.
cfdi object No The partial CFDI document as a JSON object.
from_template_id string No Id of a template to copy the cfdi and note from.
issuer string Sí Id of the issuer the call acts for, from list_issuers.

Esquema de entrada (JSON Schema)

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the template."
    },
    "note": {
      "type": "string",
      "description": "What a draft made from the template still needs before it can be signed."
    },
    "cfdi": {
      "type": "object",
      "description": "The partial CFDI document as a JSON object."
    },
    "from_template_id": {
      "type": "string",
      "description": "Id of a template to copy the cfdi and note from."
    },
    "issuer": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the issuer the call acts for, from list_issuers."
    }
  },
  "required": [
    "name",
    "issuer"
  ]
}