Create a draft from a template
Create a CFDI draft for the calling issuer as a copy of a template: the template's cfdi is copied in, and its note is recorded on the draft, so get_cfdi shows what the draft still needs. template_id is a global template or one of the issuer's own, from list_cfdi_template; another issuer's template is not_found. The draft is validated and stored like create_invoice_draft, with version 1. 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 |
|---|---|---|---|
template_id |
string | Sí | Id of the template, from list_cfdi_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."
},
"issuer": {
"type": "string",
"format": "uuid",
"description": "Id of the issuer the call acts for, from list_issuers."
}
},
"required": [
"template_id",
"issuer"
]
}