Saltar a contenido

Replace a CFDI template

Replace the whole body of a scoped template of the issuer: its cfdi, and its name and note when given. An omitted note keeps the current one. A global template is invalid_state, since global templates are read-only. Drafts made from the template are not changed. The result is the template.

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

Parámetros

Parámetro Tipo Obligatorio Descripción
template_id string Sí Id of the template, from list_cfdi_template.
cfdi object Sí The partial CFDI document as a JSON object.
name string No New name of the template.
note string No New note of the template.
issuer string Sí Id of the issuer the call acts for, from list_issuers.

Esquema de entrada (JSON Schema)

{
  "type": "object",
  "properties": {
    "template_id": {
      "type": "string",
      "description": "Id of the template, from list_cfdi_template."
    },
    "cfdi": {
      "type": "object",
      "description": "The partial CFDI document as a JSON object."
    },
    "name": {
      "type": "string",
      "description": "New name of the template."
    },
    "note": {
      "type": "string",
      "description": "New note of the template."
    },
    "issuer": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the issuer the call acts for, from list_issuers."
    }
  },
  "required": [
    "template_id",
    "cfdi",
    "issuer"
  ]
}