https://api.cufea.com/openapi.json, also committed as sdk/openapi.json in the Cufea
repository) gets a new info.version and an entry here. The format follows Keep a Changelog.
Versioning
The contract follows semantic versioning. While it is below 1.0.0:- Minor (0.2.0 → 0.3.0): additive changes. New paths, new optional request fields, new response fields, new webhook event types. A client written for an older minor keeps working if it ignores fields and event types it does not know.
- Patch (0.2.0 → 0.2.1): the document changes without changing behaviour, such as descriptions or examples.
- Breaking changes (a removed or renamed path or field, a field that becomes required in a request, a narrower value range) also bump the minor while the contract is below 1.0.0, and their entry lists them under Changed (breaking) or Removed, spelled out. From 1.0.0 on they bump the major.
info.version is the cufea package version ([project] version in pyproject.toml); the
TypeScript SDK @cufea/sdk carries the same version.
Pinning the contract
Each entry records the sha256 of the snapshot for that version:sdk/openapi.json, which is
the served document rendered with sorted keys, two-space indentation and a trailing newline.
To compare the live document with a pinned hash:
info.version stays the same, or when a released hash is edited.
[0.8.0] - 2026-12-01
Snapshot sha256:ba8c664950a88b262d31c2da66212b3d1dcc0ee7d141fc317b559d6032c640bc
Changed (breaking)
- Payment means codes are checked against the DIAN list (CUF-60):
method_codeofPaymentInandInvoicePaymentIn(invoicepayment, everypaymentsentry and the notepayment) must be a code of MediosPago-2.1 (Anexo 1.9 table 13.3.4.2, toolboxMediosPago-2.1.gcof the Caja de herramientas FE V1.9 v2026). Unknown codes, which were accepted before and then rejected by the DIAN (“Medio de pago inválido”, FAN03 / CAN03a / DAN03a), are now rejected with422 validation_erroron the field, e.g.loc["body", "payments", "1", "method_code"]. The rejected value is never echoed.- The v2026 list differs from older copies of MediosPago-2.1 (such as the one in
oc-facho): it adds
71(Bonos) and72(Vales), which Cufea accepts, and drops8(Mantener), which Cufea now rejects. - The schema documents the 76 codes as the
enumofmethod_code(it replacesmaxLength: 5), so the TypeScript SDK typesmethod_codeas their union instead ofstring. The SDK also exports them at run time asPAYMENT_MEANS_CODES(with the typePaymentMeansCode), generated from this contract, and the MCP toolscufea_create_invoiceandcufea_create_noteadvertise and enforce the same list. - Unchanged:
formtakes only1or2, and a credit (2) entry needs itsdue_date. Cufea does not tie a code to a business case; the payments guide describes the payment means of a credit note as guidance.
- The v2026 list differs from older copies of MediosPago-2.1 (such as the one in
oc-facho): it adds
[0.7.1] - 2026-12-01
Snapshot sha256:5b2c667068d7ce063a192e4250eef89bf30f7c52d7ada100ab4ed70223edc4dd
No behaviour changes.
Changed
- Documentation links (CUF-58):
info.descriptionpoints to the documentation site, https://docs.cufea.com, and its quickstart, instead of a file of the repository.
[0.7.0] - 2026-12-01
Snapshot sha256:427b6d62de263cd56185f8fbb26980554c60fd46e6f9422e4f6a3ed924b15a8a
All changes are additive.
Added
- List and filter invoices and notes (CUF-43):
GET /v1/invoices(InvoiceList) andGET /v1/notes(NoteList), newest first. Each item is exactly the single read (InvoiceRecord,NoteRecord).- Optional filters, combined with AND:
reference,prefix,number,customer_id_number(as signed, without check digit),dian_outcome(accepted,rejectedorpending),issued_fromandissued_to(Colombian dates, inclusive), andkind(credit_noteordebit_note) on/v1/notes. - Cursor pagination:
limit(1 to 50, default 20) andcursor, the opaquenext_cursorof the previous page (nullon the last one). A cursor sent with other filters answers422 invalid_cursor;issued_fromafterissued_toanswers422 validation_error. No match is200with an emptyitems.
- Optional filters, combined with AND:
customeron every invoice and note response (CustomerOut:id_type,id_number,name), read from the signedcac:AccountingCustomerParty. It appears on create, get, send, refresh,GET /v1/documentsand the new lists.
[0.6.0] - 2026-12-01
Snapshot sha256:41d686882ad6f25c39a3076dfab5ba1d79b1e51df4878b074b259aff1aae5310
All changes are additive.
Added
- Per-key rate limit (CUF-49): each API key, tenant or partner, has its own quota of 120
requests per minute by default, in a fixed window aligned to the clock minute. Two keys of
the same tenant count apart; a missing or invalid key gets
401and uses no quota.- Every response of a route that takes a key (all but
/v1/health), errors included except401, carriesX-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Reset(whole seconds until the window restarts, at least 1), documented undercomponents.headers. - Over the quota the answer is
429with the problem coderate_limited, the three headers andRetry-Afterin whole seconds (equal toX-RateLimit-Reset); every keyed operation documents that429. - The edge limit per client IP stays as the outer guard, raised from 120 to 600 requests per
minute by default; its
429carries onlyRetry-After.
- Every response of a route that takes a key (all but
[0.5.0] - 2026-11-27
Snapshot sha256:100986ab4ccaaec9d9dc492672978624667f84cbd443fecb91df16d5971e3557
All changes are additive.
Added
- Several means of payment per invoice (#82, CUF-20):
InvoiceCreate.payments, a list of 1 to 20InvoicePaymentIn(form,method_code,due_date, optionalamount): onecac:PaymentMeanseach, in order (Anexo 1.9 FAN01, 1..N), e.g. cash plus a card. A credit entry needs itsdue_date(FAN04).amountis stored and returned but is not in the signed XML (the Anexo defines no amount inPaymentMeans) and is not checked against the total.InvoiceCreate.paymentis no longer required: sendpayment(one means, as before, now also with an optionalamount) orpayments, exactly one of them (422validation_errorotherwise).- Invoice responses (
InvoiceCreated,InvoiceRecord,InvoiceSend) carrypayments(PaymentOut:form,method_code,due_dateas signed, and the storedamount). - Notes are unchanged:
NoteCreate.paymentstays a singlePaymentIn.
[0.4.0] - 2026-11-26
Snapshot sha256:9aae2092066a96f644e73fa97f9aa808a273f7076ff379758f0ce5b51b6f4b86
All changes are additive.
Added
- Partner provisioning (#81, CUF-54): a new
PartnerKeyAuthsecurity scheme (Authorization: Bearer cufea_partner_..., issued by the operator) and thepartnertag.POST /v1/partner/tenants(PartnerTenantInwithClientAuthorizationIn): provisions a client company as a tenant by NIT and check digit, with the client’s written authorization, and optionally issues its first sandbox and test keys. Idempotent per partner and NIT:201withcreated: true, or200withcreated: falseand no keys for the same data;409 tenant_nit_conflictfor other data,403 partner_tenant_limit,422 tenant_invalidfor a check digit that does not match.GET /v1/partner/tenants(nit,cursor,limit;PartnerTenantList) andGET /v1/partner/tenants/{tenant_id}(PartnerTenantInfo).POST,GET /v1/partner/tenants/{tenant_id}/api-keysandDELETE /v1/partner/tenants/{tenant_id}/api-keys/{key_id}: the tenant’s keys (PartnerKeyIn;409 stage_closedfor a production key before the promotion).- A tenant of another partner, or of none, answers
404 tenant_not_found.
- NIT lock (#81, CUF-54):
PUT /v1/tenant/issuerdocuments409 issuer_nit_locked, answered only for a tenant provisioned by a partner whose issuer would change NIT. Tenants without a partner are unaffected.
[0.3.0] - 2026-11-25
Snapshot sha256:0f0668ed62305427dc7a2ef918745fb5ce921e9d21b3623c098c1c0accd43503
All changes are additive.
Added
- DIAN onboarding with an API key (#80, CUF-54): the steps the console offers a tenant
owner, for an integrator or a reseller acting for its client.
PUT /v1/tenant/certificate/{stage}uploads a .p12 (CertificateIn:p12_base64,password) as the signing certificate oftestorproductionand answers its public metadata (CertificateInfoOut, with thenit_mismatchwarning);GET /v1/tenant/certificate/{stage}reads it back for the key’s own stage.GET /v1/tenant/test-setreports the habilitación test set (TestSetStatus: status, test-stage counts per kind inTestSetDocuments/TestSetDocumentCounts, andTestSetDianAnswer).GET /v1/tenant/promotionlists what the promotion still needs andPOST /v1/tenant/promote(PromotionIn, test key only) opens the DIAN production stage (PromotionStatus), or answers422 promotion_refusedwithmissing(PromotionRefusedProblem).- New problem codes:
certificate_invalid,certificate_not_stored,payload_too_large,promotion_refused.
[0.2.0] - 2026-11-22
Snapshot sha256:d6a3d6adb905a5d26c84000e9d048d58ef2edb561ecb6fa4cddfbf8fb30c0c23
All changes are additive. The live document served these changes under info.version 0.1.0
while they were merged (#72 to #76, 2026-11-16 to 2026-11-22); those interim documents are not
versions of their own, so pin 0.2.0.
Added
- Buyer like Factus (#72):
CustomerIn.address,fiscal_responsibilities(default["R-99-PN"]) andtax_scheme(defaultZZ) are now optional, so an identified person needs only identification and name. The customer of an invoice or note takes akind:identified(default,CustomerIn) orfinal_consumer(FinalConsumerIn) for consumidor final. - Excluded line taxes (#75): a line tax entry may be
{"is_excluded": true}, with noschemeorpercent(LineTaxIn.is_excluded;schemeandpercentare no longer required). - Per-line discounts (#74):
LineIn.discount_rate(percent) orLineIn.discount_amount, mutually exclusive, on invoice and note lines. - Totals, taxes, lines and QR as JSON (#78): invoice and note responses (
InvoiceCreated,InvoiceRecord,InvoiceSend,NoteCreated,NoteRecord,NoteSend) carrytotals,taxes,withholdings,linesandqr, read from the signed XML (DocumentTotals,TaxAmountOut,LineSummaryOut,QrOut). - Observations (#77):
InvoiceCreate.notes(a list of legends) andobservation(Factus’s single-string alias) on invoices;NoteCreate.observationon notes. Responses carrynotes. - Delivery to the buyer by email (#76):
send_email(defaulttrue) onInvoiceCreateandNoteCreate.deliveryon every invoice and note response (Delivery).- New paths:
GET /v1/invoices/{document_id}/pdf,GET /v1/invoices/{document_id}/email-content,POST /v1/invoices/{document_id}/send-email, and the same three under/v1/notes/{kind}/{document_id}/(EmailContent,SendEmailRequest,EmailSent). - New webhook event types:
invoice.delivered,invoice.delivery_failed,note.delivered,note.delivery_failed;WebhookEventData.reasonexplains a failed delivery.
[0.1.0] - 2026-11-16
Snapshot sha256:7b986cdf71734a702a6d2930e52315fb2905d3479e4b4348393d4e5e0510b625
Baseline: the contract as of #65 (26 paths; webhook event types event.registered,
invoice.accepted, invoice.rejected, note.accepted, note.rejected).