Facturiadocs
Referencia API

Referencia de la API

Todos los endpoints de /v1, generados desde el OpenAPI 3.1 que publicamos junto con la especificación.

Esta referencia se genera desde public-api-openapi.yaml en cada build, así que no puede desviarse del contrato. La especificación en prosa manda donde ambas difieran.

https://api.facturia.cl/v1

Solo TLS 1.2+. No hay raíz sin versionar ni puerto sin cifrar. Cada respuesta lleva Facturia-Request-Id; cítalo en soporte.

Capítulos

Todos los endpoints

MétodoRutaQué hace
GET/accountRetrieve the account and the key in use
GET/api_keysList API keys (metadata only; secrets are never returned)
POST/api_keysMint an API key (root key only)
DELETE/api_keys/{key_id}Revoke an API key immediately (root key only)
POST/api_keys/{key_id}/rollIssue a replacement secret for a key (root key only)
GET/empresasList empresas visible to this key
POST/empresasCreate an empresa
GET/empresas/{empresa_id}Retrieve an empresa
PATCH/empresas/{empresa_id}Update an empresa
GET/empresas/{empresa_id}/certificateRetrieve certificate metadata
POST/empresas/{empresa_id}/certificateUpload (or reuse) the empresa's digital certificate
DELETE/empresas/{empresa_id}/certificatePurge the certificate from the vault (revokes custody, suspends emission)
POST/empresas/{empresa_id}/mandatoRecord the mandato authorizing Facturia to act before the SII
DELETE/empresas/{empresa_id}/mandatoRevoke the mandato
GET/empresas/{empresa_id}/onboardingOnboarding lifecycle, steps and blocking human actions
GET/empresas/{empresa_id}/automation_settingsRetrieve per-empresa automation settings
PATCH/empresas/{empresa_id}/automation_settingsUpdate per-empresa automation settings
PATCH/empresas/{empresa_id}/brandingUpdate logo, default print format and footer text
GET/foliosFolio availability per doc type
POST/folios/requestsRequest a new CAF from the SII (async)
GET/cafsList CAFs held for this empresa
POST/cafsUpload a CAF you already hold
DELETE/cafs/{caf_id}Deactivate a CAF (history is preserved)
GET/documentsList emitted documents
POST/documentsEmit a DTE
POST/documents/previewsPrice and validate a document without emitting it
GET/documents/previews/{preview_id}Retrieve a stored preview
GET/documents/{document_id}Retrieve a document
GET/documents/{document_id}/pdfDownload the PDF
GET/documents/{document_id}/xmlDownload the signed XML exactly as sent to the SII
GET/documents/{document_id}/eventsLifecycle events for one document
POST/documents/{document_id}/retryRetry a document in failed
POST/documents/{document_id}/sendEmail the document to the receptor
POST/documents/{document_id}/credit_noteEmit a nota de crédito against this document
POST/documents/{document_id}/public_linksCreate or rotate public links for this document's artifacts
DELETE/documents/{document_id}/public_linksRevoke every public link for this document
GET/received_documentsList supplier DTEs received for this empresa
GET/received_documents/{received_document_id}Retrieve a received document
GET/received_documents/{received_document_id}/xmlDownload the original supplier XML
GET/received_documents/{received_document_id}/pdfRender the received document as PDF
POST/received_documents/{received_document_id}/acceptAccept the content (SII acción ACD)
POST/received_documents/{received_document_id}/rejectReclamar the document (RCD / RFP / RFT)
POST/received_documents/{received_document_id}/acknowledge_receiptOtorgar recibo de mercaderías o servicios (SII acción ERM)
GET/tax/purchasesRCV — registro de compras
GET/tax/salesRCV — registro de ventas
GET/tax/summaryAggregated RCV totals for a period (the F29 inputs)
POST/tax/syncForce an RCV resync (async)
POST/tax/purchases/characterizeCaracterizar up to 500 purchase entries in one call
POST/tax/purchases/{entry_id}/characterizeCaracterizar one purchase entry (writes to the SII registry)
POST/tax/purchases/{entry_id}/estado_contableMove an entry between REGISTRO / PENDIENTE / NO_INCLUIR
GET/tax/f29/proposals/{period}Computed F29 propuesta for a period
GET/tax/f29/proposals/{period}/upload_fileDownload the SII-format upload .txt for this proposal
POST/tax/f29/proposals/{period}/public_linksMint a no-auth link to the propuesta's upload .txt
DELETE/tax/f29/proposals/{period}/public_linksRevoke every public link for this propuesta
POST/tax/f29/proposals/{period}/recomputeRecompute the proposal, optionally overriding codes
GET/tax/f29/filingsList F29 filings
POST/tax/f29/filingsFile the F29 for a period (async job)
GET/tax/f29/filings/{filing_id}Retrieve a filing
GET/tax/expensesList ingested foreign-currency charges
POST/tax/expensesIngest a charge that may require a tipo-46 factura de compra
GET/tax/suggestionsList tax suggestions
GET/tax/suggestions/{suggestion_id}Retrieve a suggestion
POST/tax/suggestions/{suggestion_id}/confirmAct on a suggestion (for emit_46, emits the document)
POST/tax/suggestions/{suggestion_id}/dismissDismiss a suggestion
GET/connectionsList connector connections for this empresa
POST/connectionsCreate a Fintoc bank/card connection
GET/connections/{connection_id}Retrieve a connection
DELETE/connections/{connection_id}Disconnect (revokes the link, stops ingestion)
POST/connections/{connection_id}/syncForce a movement sync (async)
GET/tax/statementsList uploaded cartolas
POST/tax/statementsUpload a cartola (CSV/XLSX) to create expenses
GET/webhook_endpointsList webhook endpoints
POST/webhook_endpointsRegister a webhook endpoint
GET/webhook_endpoints/{webhook_endpoint_id}Retrieve a webhook endpoint
PATCH/webhook_endpoints/{webhook_endpoint_id}Update a webhook endpoint
DELETE/webhook_endpoints/{webhook_endpoint_id}Delete a webhook endpoint
POST/webhook_endpoints/{webhook_endpoint_id}/pingSend a synthetic event to verify plumbing
POST/webhook_endpoints/{webhook_endpoint_id}/rotate_secretRotate the signing secret
GET/webhook_endpoints/{webhook_endpoint_id}/deliveriesInspect delivery attempts
POST/webhook_endpoints/{webhook_endpoint_id}/deliveries/{delivery_id}/retryRedeliver an event
GET/eventsQuery the event ledger (retained 12 months)
GET/events/{event_id}Retrieve an event
GET/usageUsage summary for a billing period
GET/usage/recordsThe immutable metering ledger
POST/test_helpers/received_documentsInject a supplier DTE as if it had arrived at the reception address
POST/test_helpers/rcv/seedSeed RCV rows for a period so F29 propuestas have data
POST/test_helpers/clockAdvance this empresa's simulated clock
POST/test_helpers/empresas/{empresa_id}/onboardingDrive an empresa's onboarding to any state
GET/jobs/{job_id}Retrieve an async job (folio request, RCV sync, certification step)
GET/mandato_termsThe current mandato text and version
GET/error_codesThe machine-readable error dictionary (unauthenticated)

Webhooks

El OpenAPI también describe los envíos salientes. Su forma, su firma y su calendario de reintentos están en Webhooks.

GrupoEventos
document.lifecycledocument.created | .sent | .accepted | .reparo | .rejected | .failed | .annulled
received_document.lifecyclereceived_document.created | .deadline_approaching | .accepted | .rejected | .receipt_acknowledged
empresa.lifecycleempresa.onboarding.* | empresa.suspended | certificate.expiring | folios.*
tax.lifecycletax.rcv.synced | tax.f29.* | tax.suggestion.*

En esta página