{
"code": "validation_error",
"detail": "The request is not valid; see `errors` for the offending fields.",
"errors": [
{
"loc": [
"body",
"customer"
],
"msg": "Field required"
},
{
"loc": [
"body",
"lines"
],
"msg": "List should have at least 1 item after validation, not 0"
}
],
"request_id": "88272d6eb903438690d3193e3113270a",
"status": 422,
"title": "Request validation failed",
"type": "urn:cufea:problem:validation_error"
}
{
"code": "rate_limited",
"detail": "This API key made more than 120 requests in the current window. Retry after 17 seconds.",
"request_id": "5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b",
"status": 429,
"title": "Too Many Requests",
"type": "urn:cufea:problem:rate_limited"
}
Reserves the next number of the tenant’s range, builds the sales invoice, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/invoices/{document_id}/send does) or when you call that route. Returns the signed XML (base64).
Send an Idempotency-Key to retry safely: a retry with the same key and body returns this response again without taking a second number.
{
"code": "validation_error",
"detail": "The request is not valid; see `errors` for the offending fields.",
"errors": [
{
"loc": [
"body",
"customer"
],
"msg": "Field required"
},
{
"loc": [
"body",
"lines"
],
"msg": "List should have at least 1 item after validation, not 0"
}
],
"request_id": "88272d6eb903438690d3193e3113270a",
"status": 422,
"title": "Request validation failed",
"type": "urn:cufea:problem:validation_error"
}
{
"code": "rate_limited",
"detail": "This API key made more than 120 requests in the current window. Retry after 17 seconds.",
"request_id": "5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b",
"status": 429,
"title": "Too Many Requests",
"type": "urn:cufea:problem:rate_limited"
}
Send your Cufea API key as Authorization: Bearer <key>.
Headers
Idempotency-Key
string | null
Makes the call safe to retry. Same key and same request: the first response is replayed with Idempotent-Replayed: true and nothing is done again. Same key and another request: 422 idempotency_key_reused. Same key while the first request still runs: 409 idempotency_in_progress. Keys belong to your account; they expire 24 hours after first use, after which the same key is usable again for a new request. A 5xx, 403, 404 or 409 answer is not stored, so the same key can be retried after it.
Required string length: 1 - 255
Body
application/json
A sales invoice. The issuer, numbering range and signer come from the tenant.
customer
CustomerIn · object
required
An identified buyer: a natural or legal person with real identification data.
Only the identification and the name are required. Without address the XML leaves
out PhysicalLocation and RegistrationAddress, both 0..1 for the buyer (Anexo 1.9
FAK07/FAK28); a sale outside the issuer's premises still needs it (FAK07).
CustomerIn
FinalConsumerIn
Show child attributes
lines
LineIn · object[]
required
Required array length: 1 - 500 elements
Show child attributes
issue_datetime
string<date-time> | null
Issue instant with a UTC offset. Default: now, in Colombian time.
notes
string[]
Free-text legends printed on the document, such as the return policy, the warranty or "Gracias por su compra": one cbc:Note each, in order, 1-500 characters each, at most 20. They appear on the PDF and in the JSON record. Default: none.
Maximum array length: 20
Required string length: 1 - 500
Example:
[
"Cambios y devoluciones dentro de los 30 días.",
"Gracias por su compra"
]
observation
string | null
Factus's name for a single note, 1-500 characters: the same as notes with one item. Send notes or observation, not both.
Required string length: 1 - 500
Example:
"Gracias por su compra"
payment
InvoicePaymentIn · object | null
A single means of payment: the same as payments with one entry. Send payment or payments, not both.
Show child attributes
payments
InvoicePaymentIn · object[] | null
Every means of payment used in the sale, in order: one cac:PaymentMeans each (Anexo 1.9 FAN01, 1..N), e.g. cash plus a card. Each credit (form2) entry needs its due_date. At most 20. Send payment or payments, not both.
Series (the prefix of the numbering range) to issue under. Default: the tenant's default range. The chosen range must exist for the tenant's DIAN environment; every series counts its numbers on its own.
Maximum string length: 4
Pattern: ^[A-Za-z0-9]*$
reference
string | null
Your own reference of the document (1-100 characters of A-Z a-z 0-9 . _ : -), unique per stage and document kind. Find the document by it with GET /v1/documents?reference=...&kind=..., e.g. after a create whose answer was lost. A create reusing a reference answers 409 reference_conflict, even with the same body, unless it is the replay of the same request through its Idempotency-Key; resolve it with that lookup.
Required string length: 1 - 100
Pattern: ^[A-Za-z0-9._:-]{1,100}$
Example:
"ORDER-2026-000123"
send
boolean
default:false
Also queue the invoice for sending to the DIAN right after it is stored, as POST /v1/invoices/{document_id}/send does. If queueing fails the invoice is still created and the response says send: not_queued.
send_email
boolean
default:true
Email the buyer after the DIAN accepts the document (default true, like Factus): a ZIP with the signed AttachedDocument and the PDF goes to the buyer's email, from no-reply@cufea.com under your company's name, answers to your company's email. Only in production: the sandbox and the DIAN test stage never email anyone (delivery.statusskipped). Send false to deliver it yourself with GET .../email-content or POST .../send-email.
withholdings
WithholdingIn · object[]
Maximum array length: 3
Show child attributes
Response
Successful Response
cufe
string
required
CUFE: 96 hexadecimal characters (SHA-384).
customer
CustomerOut · object
required
The buyer. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.
Show child attributes
delivery
Delivery · object
required
The email of the invoice to its buyer.
Show child attributes
document_id
string
required
Prefix and number, e.g. SETP990000001.
issue_datetime
string<date-time>
required
lines
LineSummaryOut · object[]
required
The lines in order. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.
Show child attributes
number
integer
required
prefix
string
required
qr
QrOut · object
required
Show child attributes
state
string
required
prepared until the document is sent; then the latest DIAN outcome (accepted, rejected, not_found...) or, before any answer, the last event (sent, send_failed...).
taxes
TaxAmountOut · object[]
required
Taxes per code and percent, ordered by code and percent, then the IVA-excluded entry when a line has no IVA. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.
Show child attributes
totals
DocumentTotals · object
required
Monetary totals. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.
Show child attributes
withholdings
TaxAmountOut · object[]
required
Withholdings per code and percent; empty on notes. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.
Show child attributes
xml_base64
string
required
The signed UBL XML, base64 encoded.
dian_errors
DianMessage · object[]
Rule messages of the latest DIAN answer.
Show child attributes
dian_status_code
string | null
StatusCode of the latest DIAN answer, e.g. 00; none yet.
dian_status_description
string | null
StatusDescription of the latest DIAN answer.
kind
string
default:invoice
Always invoice.
Allowed value: "invoice"
notes
string[]
The document's cbc:Note legends as signed, in order (notes, or the observation, given on create); empty when none.
payments
PaymentOut · object[]
The means of payment as signed (cac:PaymentMeans), in order, with the amounts given on create. A single payment on create is one entry.
Show child attributes
reference
string | null
The reference given on create; null when none was given.
send
enum<string> | null
Only when send was requested: queued, or not_queued if the job queue failed (send it with POST /v1/invoices/{document_id}/send).
Available options:
queued,
pending,
sent,
not_queued
sent_at
string<date-time> | null
When the DIAN last received the document; none if never.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cufea","description":"Colombian DIAN electronic invoicing over a REST API.","colors":{"primary":"#121211","light":"#F2F1ED","dark":"#121211"},"logo":{"light":"https://mintcdn.com/cufea/TQMXUpl4W5MDYEjW/logo/light.svg?fit=max\u0026auto=format\u0026n=TQMXUpl4W5MDYEjW\u0026q=85\u0026s=3fb3cb984171272f2790de13971ec643","dark":"https://mintcdn.com/cufea/TQMXUpl4W5MDYEjW/logo/dark.svg?fit=max\u0026auto=format\u0026n=TQMXUpl4W5MDYEjW\u0026q=85\u0026s=6adb6699d9f4470ae9db5449af33cb09","href":"https://cufea.com"},"favicon":"https://mintcdn.com/cufea/TQMXUpl4W5MDYEjW/favicon.svg?fit=max\u0026auto=format\u0026n=TQMXUpl4W5MDYEjW\u0026q=85\u0026s=ed675e6c3e46b89eb52c37d55c016228","api":{"playground":{"display":"interactive","proxy":true},"examples":{"defaults":"required","languages":["bash","javascript","python"]}},"footer":{"links":[{"header":"Cufea","items":[{"label":"cufea.com","href":"https://cufea.com"},{"label":"Console","href":"https://app.cufea.com"}]}]},"seo":{"metatags":{"canonical":"https://docs.cufea.com"}},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":false},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"app.cufea.com","icon":"key-round","href":"https://app.cufea.com/signup"}]},"languages":[{"language":"es","navbar":{"links":[{"href":"https://cufea.com","label":"cufea.com"}],"primary":{"type":"button","label":"Obtener clave de sandbox","href":"https://app.cufea.com/signup"}},"href":""},{"language":"en","navbar":{"links":[{"href":"https://cufea.com","label":"cufea.com"}],"primary":{"type":"button","label":"Get a sandbox key","href":"https://app.cufea.com/signup"}},"href":"en"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cufea","hasAudioNarration":false,"actualSubdomain":"cufea","customDomains":["docs.cufea.com"],"gitSource":{"type":"github","owner":"cailash-labs","repo":"cufea","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6b0f51ccbca01e694bcc0d8e"},"entitlements":{},"buildId":"6b0f6471a5e2b0c26a8b7b6a","clientVersion":"0.0.4402","searchFilterCounts":[{"language":"es","tag":"Docs API","count":81},{"language":"en","tag":"API docs","count":81},{"language":"es","tag":"Endpoints","count":59},{"language":"en","tag":"Endpoints","count":59},{"language":"es","tag":"tenant","count":16},{"language":"en","tag":"tenant","count":16},{"language":"es","tag":"webhooks","count":12},{"language":"en","tag":"webhooks","count":12},{"language":"es","tag":"Guías","count":9},{"language":"es","tag":"invoices","count":9},{"language":"en","tag":"Guides","count":9},{"language":"en","tag":"invoices","count":9},{"language":"es","tag":"Documentación","count":8},{"language":"en","tag":"Documentation","count":8},{"language":"es","tag":"notes","count":7},{"language":"en","tag":"notes","count":7},{"language":"es","tag":"partner","count":6},{"language":"en","tag":"partner","count":6},{"language":"es","tag":"events","count":5},{"language":"en","tag":"events","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"en/api-reference/invoices/create-a-signed-invoice","slug":"/en/api-reference/invoices/create-a-signed-invoice","pageMetadata":{"title":"Create a signed invoice","description":"Reserves the next number of the tenant's range, builds the sales invoice, signs it and stores it. Its state is `prepared`; it is sent to the DIAN only when `send` is true (queued, as `POST /v1/invoices/{document_id}/send` does) or when you call that route. Returns the signed XML (base64).\n\nSend an `Idempotency-Key` to retry safely: a retry with the same key and body returns this response again without taking a second number.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices","href":"/en/api-reference/invoices/create-a-signed-invoice","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Reserves the next number of the tenant’s range, builds the sales invoice, signs it and stores it. Its state is \", _jsx(_components.code, {\n children: \"prepared\"\n }), \"; it is sent to the DIAN only when \", _jsx(_components.code, {\n children: \"send\"\n }), \" is true (queued, as \", _jsx(_components.code, {\n children: \"POST /v1/invoices/{document_id}/send\"\n }), \" does) or when you call that route. Returns the signed XML (base64).\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send an \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" to retry safely: a retry with the same key and body returns this response again without taking a second number.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a signed invoice","description":"Reserves the next number of the tenant's range, builds the sales invoice, signs it and stores it. Its state is `prepared`; it is sent to the DIAN only when `send` is true (queued, as `POST /v1/invoices/{document_id}/send` does) or when you call that route. Returns the signed XML (base64).\n\nSend an `Idempotency-Key` to retry safely: a retry with the same key and body returns this response again without taking a second number.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices","href":"/en/api-reference/invoices/create-a-signed-invoice","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Reserves the next number of the tenant's range, builds the sales invoice, signs it and stores it. Its state is `prepared`; it is sent to the DIAN only when `send` is true (queued, as `POST /v1/invoices/{document_id}/send` does) or when you call that route. Returns the signed XML (base64).\n\nSend an `Idempotency-Key` to retry safely: a retry with the same key and body returns this response again without taking a second number.","operationId":"create_invoice_v1_invoices_post","parameters":["77fb5e6c-0241-4022-80f4-96632406bcaf"],"requestBody":"c65b6a19-16fe-40d5-b9bf-aa7df79382b2","responses":{"201":"54699dfa-4fa8-46e4-bf56-bd0f7f1391b2","401":"910fc551-a2e0-427d-a7ee-089ee55d80d3","403":"09b72ad3-f6c7-4dc0-b0bc-14c406385e2b","409":"f0fa3828-9f10-4549-9416-6e184cd6a9c3","422":"10d1b6ed-1293-469c-8e2f-ee23eca4cbba","429":"4bc967ed-7c57-453c-ba2e-9892cabd8578","500":"09466850-c668-45cb-9864-e15ce933b94d","503":"cd51f106-d5b8-478f-9eff-fa0f6f857b7d"},"security":["7e942291-2ddb-43e4-91b6-65f3cd88bbea"],"summary":"Create a signed invoice","tags":["invoices"],"method":"post","type":"path","servers":["ae8063d8-96db-456d-8a36-870da52300bb"],"path":"/v1/invoices","baseUrlOptions":["https://api.cufea.com"],"title":"Create a signed invoice","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"77fb5e6c-0241-4022-80f4-96632406bcaf":{"description":"Makes the call safe to retry. Same key and same request: the first response is replayed with `Idempotent-Replayed: true` and nothing is done again. Same key and another request: 422 `idempotency_key_reused`. Same key while the first request still runs: 409 `idempotency_in_progress`. Keys belong to your account; they expire 24 hours after first use, after which the same key is usable again for a new request. A 5xx, 403, 404 or 409 answer is not stored, so the same key can be retried after it.","in":"header","name":"Idempotency-Key","required":false,"schema":{"oneOf":[{"type":"string","title":"Idempotency-Key","description":"Makes the call safe to retry. Same key and same request: the first response is replayed with `Idempotent-Replayed: true` and nothing is done again. Same key and another request: 422 `idempotency_key_reused`. Same key while the first request still runs: 409 `idempotency_in_progress`. Keys belong to your account; they expire 24 hours after first use, after which the same key is usable again for a new request. A 5xx, 403, 404 or 409 answer is not stored, so the same key can be retried after it.","maxLength":255,"minLength":1,"uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Idempotency-Key","description":"Makes the call safe to retry. Same key and same request: the first response is replayed with `Idempotent-Replayed: true` and nothing is done again. Same key and another request: 422 `idempotency_key_reused`. Same key while the first request still runs: 409 `idempotency_in_progress`. Keys belong to your account; they expire 24 hours after first use, after which the same key is usable again for a new request. A 5xx, 403, 404 or 409 answer is not stored, so the same key can be retried after it.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}}},"requestBody":{"content":{"application/json":{"examples":{"first_sandbox_invoice":{"title":"first_sandbox_invoice","summary":"A credit sale of one service with 19% IVA (the console's first invoice)","value":{"customer":{"address":{"city_code":"11001","city_name":"Bogota, D.C.","department_code":"11","department_name":"Bogota","line":"Cra 7 # 1-10"},"check_digit":"4","fiscal_responsibilities":["O-13"],"id_number":"800197268","id_type":"31","organization_type":"1","registration_name":"Acme S.A.S.","tax_scheme":"01"},"lines":[{"description":"Service","quantity":"1","taxes":[{"percent":"19","scheme":"01"}],"unit_price":"100000"}],"payments":[{"amount":"60000.00","form":"1","method_code":"10"},{"amount":"59000.00","due_date":"2026-12-14","form":"2","method_code":"1"}],"reference":"ORDER-1001"}}},"schema":{"additionalProperties":false,"description":"A sales invoice. The issuer, numbering range and signer come from the tenant.","properties":{"customer":{"oneOf":[{"type":"object","title":"CustomerIn","description":"An identified buyer: a natural or legal person with real identification data.\n\nOnly the identification and the name are required. Without ``address`` the XML leaves\nout PhysicalLocation and RegistrationAddress, both 0..1 for the buyer (Anexo 1.9\nFAK07/FAK28); a sale outside the issuer's premises still needs it (FAK07).","required":["organization_type","id_type","id_number","registration_name"],"properties":{"id_number":{"description":"Identification number (NIT without DV).","maxLength":20,"title":"Id Number","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.id_number","typeLabel":"string"},"id_type":{"description":"Fiscal identification type, e.g. `31` NIT.","enum":["11","12","13","21","22","31","41","42","50","91"],"title":"IdentificationType","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.id_type","typeLabel":"enum\u003cstring>"},"organization_type":{"description":"`1` legal entity, `2` natural person.","enum":["1","2"],"title":"OrganizationType","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.organization_type","typeLabel":"enum\u003cstring>"},"registration_name":{"maxLength":300,"title":"Registration Name","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.registration_name","typeLabel":"string"},"address":{"oneOf":[{"type":"object","title":"AddressIn","description":"Buyer address. Omit it when the buyer gives none.","required":["line","city_code","city_name","department_code","department_name"],"properties":{"city_code":{"description":"DANE municipality code (5 digits).","examples":["11001"],"title":"City Code","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.city_code","typeLabel":"string"},"city_name":{"examples":["Bogotá, D.C."],"maxLength":100,"title":"City Name","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.city_name","typeLabel":"string"},"department_code":{"description":"DANE department code (2 digits).","examples":["11"],"title":"Department Code","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.department_code","typeLabel":"string"},"department_name":{"examples":["Bogotá"],"maxLength":100,"title":"Department Name","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.department_name","typeLabel":"string"},"line":{"examples":["Cra 7 # 1-10"],"maxLength":300,"title":"Line","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.line","typeLabel":"string"},"country_code":{"default":"CO","description":"ISO 3166-1 alpha-2.","title":"Country Code","type":"string","uniqueKey":"customer.oneOf.0.address.oneOf.0.country_code","typeLabel":"string"},"country_name":{"default":"Colombia","maxLength":100,"title":"Country Name","type":"string","uniqueKey":"customer.oneOf.0.address.oneOf.0.country_name","typeLabel":"string"},"postal_code":{"oneOf":[{"type":"string","title":"Postal Code","maxLength":20,"uniqueKey":"customer.oneOf.0.address.oneOf.0.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Postal Code","uniqueKey":"customer.oneOf.0.address.oneOf.0.postal_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address.oneOf.0.postal_code","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"customer.oneOf.0.address.oneOf.0","typeLabel":"AddressIn · object"},{"type":"null","description":"Buyer address. Omit it when the buyer gives none.","uniqueKey":"customer.oneOf.0.address.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address","typeLabel":"AddressIn · object | null"},"check_digit":{"oneOf":[{"type":"string","title":"Check Digit","description":"DV, NIT only.","maxLength":1,"uniqueKey":"customer.oneOf.0.check_digit.oneOf.0","typeLabel":"string"},{"type":"null","title":"Check Digit","description":"DV, NIT only.","uniqueKey":"customer.oneOf.0.check_digit.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.check_digit","typeLabel":"string | null"},"email":{"oneOf":[{"type":"string","title":"Email","maxLength":254,"uniqueKey":"customer.oneOf.0.email.oneOf.0","typeLabel":"string"},{"type":"null","title":"Email","uniqueKey":"customer.oneOf.0.email.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.email","typeLabel":"string | null"},"fiscal_responsibilities":{"description":"DIAN fiscal responsibilities (TaxLevelCode). Default `[\"R-99-PN\"]`.","examples":[["R-99-PN"]],"items":{"type":"string","uniqueKey":"customer.oneOf.0.fiscal_responsibilities.items.[INDEX]","typeLabel":"string"},"maxItems":10,"minItems":1,"title":"Fiscal Responsibilities","type":"array","uniqueKey":"customer.oneOf.0.fiscal_responsibilities","typeLabel":"string[]"},"kind":{"const":"identified","default":"identified","description":"`identified` (default) or `final_consumer`, see `FinalConsumerIn`.","title":"Kind","type":"string","uniqueKey":"customer.oneOf.0.kind","typeLabel":"string"},"tax_scheme":{"description":"`01` IVA, `04` INC or `ZZ` not applicable. Default `ZZ`.","enum":["01","02","03","04","05","06","07","08","ZZ"],"title":"TaxScheme","type":"string","default":"ZZ","uniqueKey":"customer.oneOf.0.tax_scheme","typeLabel":"enum\u003cstring>"},"trade_name":{"oneOf":[{"type":"string","title":"Trade Name","maxLength":300,"uniqueKey":"customer.oneOf.0.trade_name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Trade Name","uniqueKey":"customer.oneOf.0.trade_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.trade_name","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"customer.oneOf.0","typeLabel":"CustomerIn · object"},{"type":"object","title":"FinalConsumerIn","description":"Consumidor final: an anonymous buyer.\n\nThe server fills the party the Anexo 1.9 prescribes (FAK61-FAK64, FAK26, FAK40): natural\nperson, id type `13`, id `222222222222`, name `consumidor final`, responsibility\n`R-99-PN` and tax scheme `ZZ`. Only an e-mail and the place of the sale may be added.","required":["kind"],"properties":{"kind":{"const":"final_consumer","description":"Selects consumidor final.","title":"Kind","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.1.kind","typeLabel":"string"},"address":{"oneOf":[{"type":"object","title":"AddressIn","description":"Place of the sale, when it must be informed (FAK07).","required":["line","city_code","city_name","department_code","department_name"],"properties":{"city_code":{"description":"DANE municipality code (5 digits).","examples":["11001"],"title":"City Code","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.1.address.oneOf.0.city_code","typeLabel":"string"},"city_name":{"examples":["Bogotá, D.C."],"maxLength":100,"title":"City Name","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.1.address.oneOf.0.city_name","typeLabel":"string"},"department_code":{"description":"DANE department code (2 digits).","examples":["11"],"title":"Department Code","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.1.address.oneOf.0.department_code","typeLabel":"string"},"department_name":{"examples":["Bogotá"],"maxLength":100,"title":"Department Name","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.1.address.oneOf.0.department_name","typeLabel":"string"},"line":{"examples":["Cra 7 # 1-10"],"maxLength":300,"title":"Line","type":"string","isRequired":true,"uniqueKey":"customer.oneOf.1.address.oneOf.0.line","typeLabel":"string"},"country_code":{"default":"CO","description":"ISO 3166-1 alpha-2.","title":"Country Code","type":"string","uniqueKey":"customer.oneOf.1.address.oneOf.0.country_code","typeLabel":"string"},"country_name":{"default":"Colombia","maxLength":100,"title":"Country Name","type":"string","uniqueKey":"customer.oneOf.1.address.oneOf.0.country_name","typeLabel":"string"},"postal_code":{"oneOf":[{"type":"string","title":"Postal Code","maxLength":20,"uniqueKey":"customer.oneOf.1.address.oneOf.0.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Postal Code","uniqueKey":"customer.oneOf.1.address.oneOf.0.postal_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.1.address.oneOf.0.postal_code","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"customer.oneOf.1.address.oneOf.0","typeLabel":"AddressIn · object"},{"type":"null","description":"Place of the sale, when it must be informed (FAK07).","uniqueKey":"customer.oneOf.1.address.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.1.address","typeLabel":"AddressIn · object | null"},"email":{"oneOf":[{"type":"string","title":"Email","maxLength":254,"uniqueKey":"customer.oneOf.1.email.oneOf.0","typeLabel":"string"},{"type":"null","title":"Email","uniqueKey":"customer.oneOf.1.email.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.1.email","typeLabel":"string | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"customer.oneOf.1","typeLabel":"FinalConsumerIn · object"}],"isRequired":true,"uniqueKey":"customer","typeLabel":"CustomerIn · object | FinalConsumerIn · object"},"lines":{"items":{"additionalProperties":false,"properties":{"description":{"maxLength":300,"title":"Description","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].description","typeLabel":"string"},"quantity":{"description":"Non-negative decimal string (an integer is also accepted).","examples":["1250.50"],"pattern":"^\\d{1,15}(\\.\\d{1,6})?$","title":"Quantity","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].quantity","typeLabel":"string"},"unit_price":{"description":"Non-negative decimal string (an integer is also accepted).","examples":["1250.50"],"pattern":"^\\d{1,15}(\\.\\d{1,6})?$","title":"Unit Price","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].unit_price","typeLabel":"string"},"discount_amount":{"oneOf":[{"type":"string","title":"Discount Amount","description":"Non-negative decimal string with up to 2 decimals.","pattern":"^\\d{1,15}(\\.\\d{1,2})?$","example":"5000.00","uniqueKey":"lines.items.[INDEX].discount_amount.oneOf.0","typeLabel":"string"},{"type":"null","title":"Discount Amount","description":"Line discount as an amount, at most `quantity` x `unit_price`. Taxes apply to the discounted value. Give `discount_rate` or `discount_amount`, not both.","example":"5000.00","uniqueKey":"lines.items.[INDEX].discount_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].discount_amount","typeLabel":"string | null"},"discount_rate":{"oneOf":[{"type":"string","title":"Discount Rate","description":"Non-negative decimal string with up to 2 decimals.","pattern":"^\\d{1,15}(\\.\\d{1,2})?$","example":"10.00","uniqueKey":"lines.items.[INDEX].discount_rate.oneOf.0","typeLabel":"string"},{"type":"null","title":"Discount Rate","description":"Line discount in percent of `quantity` x `unit_price`, 0 to 100. Taxes apply to the discounted value. Give `discount_rate` or `discount_amount`, not both.","example":"10.00","uniqueKey":"lines.items.[INDEX].discount_rate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].discount_rate","typeLabel":"string | null"},"item_code":{"oneOf":[{"type":"string","title":"Item Code","maxLength":50,"uniqueKey":"lines.items.[INDEX].item_code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Item Code","uniqueKey":"lines.items.[INDEX].item_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].item_code","typeLabel":"string | null"},"taxes":{"items":{"additionalProperties":false,"description":"A tax of the line, or `{\"is_excluded\": true}` for an item excluded from IVA.\n\nExempt (exento) items are IVA at 0: `{\"scheme\": \"01\", \"percent\": \"0\"}`. Excluded items\ntake no scheme and no percent, and no IVA is informed for them.","properties":{"is_excluded":{"default":false,"description":"The item is excluded from IVA (excluido): send it alone, without `scheme` or `percent`. The line then carries no IVA and adds no taxable base; another tax such as INC may still be listed next to it.","title":"Is Excluded","type":"boolean","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].is_excluded","typeLabel":"boolean"},"percent":{"oneOf":[{"type":"string","title":"Percent","description":"Non-negative decimal string (an integer is also accepted).","pattern":"^\\d{1,15}(\\.\\d{1,6})?$","example":"1250.50","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].percent.oneOf.0","typeLabel":"string"},{"type":"null","title":"Percent","description":"Tax rate in percent, 0 to 100; IVA `0` is exempt (exento). Required unless `is_excluded`.","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].percent.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].percent","typeLabel":"string | null"},"scheme":{"oneOf":[{"type":"string","title":"TaxScheme","description":"Sales tax: `01` IVA, `02` IC, `03` ICA or `04` INC. Required unless `is_excluded`.","enum":["01","02","03","04","05","06","07","08","ZZ"],"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].scheme.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Sales tax: `01` IVA, `02` IC, `03` ICA or `04` INC. Required unless `is_excluded`.","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].scheme.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].scheme","typeLabel":"enum\u003cstring> | null"}},"title":"LineTaxIn","type":"object","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX]","typeLabel":"LineTaxIn · object"},"maxItems":4,"title":"Taxes","type":"array","uniqueKey":"lines.items.[INDEX].taxes","typeLabel":"LineTaxIn · object[]"},"unit_code":{"default":"94","description":"UN/ECE unit; `94` unit.","maxLength":5,"title":"Unit Code","type":"string","uniqueKey":"lines.items.[INDEX].unit_code","typeLabel":"string"}},"required":["description","quantity","unit_price"],"title":"LineIn","type":"object","uniqueKey":"lines.items.[INDEX]","typeLabel":"LineIn · object"},"maxItems":500,"minItems":1,"title":"Lines","type":"array","isRequired":true,"uniqueKey":"lines","typeLabel":"LineIn · object[]"},"issue_datetime":{"oneOf":[{"type":"string","title":"Issue Datetime","description":"Issue instant with a UTC offset. Default: now, in Colombian time.","format":"date-time","uniqueKey":"issue_datetime.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Issue Datetime","description":"Issue instant with a UTC offset. Default: now, in Colombian time.","uniqueKey":"issue_datetime.oneOf.1","typeLabel":"null"}],"uniqueKey":"issue_datetime","typeLabel":"string\u003cdate-time> | null"},"notes":{"description":"Free-text legends printed on the document, such as the return policy, the warranty or \"Gracias por su compra\": one `cbc:Note` each, in order, 1-500 characters each, at most 20. They appear on the PDF and in the JSON record. Default: none.","examples":[["Cambios y devoluciones dentro de los 30 días.","Gracias por su compra"]],"items":{"maxLength":500,"minLength":1,"type":"string","uniqueKey":"notes.items.[INDEX]","typeLabel":"string"},"maxItems":20,"title":"Notes","type":"array","uniqueKey":"notes","typeLabel":"string[]"},"observation":{"oneOf":[{"type":"string","title":"Observation","description":"Factus's name for a single note, 1-500 characters: the same as `notes` with one item. Send `notes` or `observation`, not both.","maxLength":500,"minLength":1,"example":"Gracias por su compra","uniqueKey":"observation.oneOf.0","typeLabel":"string"},{"type":"null","title":"Observation","description":"Factus's name for a single note, 1-500 characters: the same as `notes` with one item. Send `notes` or `observation`, not both.","example":"Gracias por su compra","uniqueKey":"observation.oneOf.1","typeLabel":"null"}],"uniqueKey":"observation","typeLabel":"string | null"},"payment":{"oneOf":[{"type":"object","title":"InvoicePaymentIn","description":"A single means of payment: the same as `payments` with one entry. Send `payment` or `payments`, not both.","required":["form","method_code"],"properties":{"form":{"description":"`1` cash, `2` credit.","enum":["1","2"],"title":"PaymentForm","type":"string","isRequired":true,"uniqueKey":"payment.oneOf.0.form","typeLabel":"enum\u003cstring>"},"method_code":{"description":"`cbc:PaymentMeansCode`: a code of the DIAN list MediosPago-2.1 (Anexo 1.9 table 13.3.4.2, toolbox `MediosPago-2.1.gc`), e.g. `10` Efectivo, `48` Tarjeta Crédito, `49` Tarjeta Débito, `47` Transferencia Débito Bancaria, `1` Instrumento no definido, `ZZZ` Otro (Acuerdo mutuo). Any other value is rejected with 422. Which code fits a sale or a note is the integrator's choice.","enum":["1","2","3","4","5","6","7","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","60","61","62","63","64","65","66","67","70","71","72","74","75","76","77","78","91","92","93","94","95","96","97","ZZZ"],"title":"Method Code","type":"string","isRequired":true,"uniqueKey":"payment.oneOf.0.method_code","typeLabel":"enum\u003cstring>"},"amount":{"oneOf":[{"type":"string","title":"Amount","description":"Non-negative decimal string with up to 2 decimals.","pattern":"^\\d{1,15}(\\.\\d{1,2})?$","example":"150000.00","uniqueKey":"payment.oneOf.0.amount.oneOf.0","typeLabel":"string"},{"type":"null","title":"Amount","description":"How much was paid with this means. Optional: Cufea stores it and returns it, but it is not part of the signed XML (Anexo 1.9 FAN01-FAN04 define no amount in `PaymentMeans`) and it is not checked against the invoice total.","uniqueKey":"payment.oneOf.0.amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.0.amount","typeLabel":"string | null"},"due_date":{"oneOf":[{"type":"string","title":"Due Date","description":"Required when `form` is `2`.","format":"date","uniqueKey":"payment.oneOf.0.due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","title":"Due Date","description":"Required when `form` is `2`.","uniqueKey":"payment.oneOf.0.due_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.oneOf.0.due_date","typeLabel":"string\u003cdate> | null"}},"additionalProperties":false,"uniqueKey":"payment.oneOf.0","typeLabel":"InvoicePaymentIn · object"},{"type":"null","description":"A single means of payment: the same as `payments` with one entry. Send `payment` or `payments`, not both.","uniqueKey":"payment.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment","typeLabel":"InvoicePaymentIn · object | null"},"payments":{"oneOf":[{"type":"array","items":{"additionalProperties":false,"description":"One means of payment used in the sale: one `cac:PaymentMeans` of the invoice.","properties":{"form":{"description":"`1` cash, `2` credit.","enum":["1","2"],"title":"PaymentForm","type":"string","isRequired":true,"uniqueKey":"payments.oneOf.0.items.[INDEX].form","typeLabel":"enum\u003cstring>"},"method_code":{"description":"`cbc:PaymentMeansCode`: a code of the DIAN list MediosPago-2.1 (Anexo 1.9 table 13.3.4.2, toolbox `MediosPago-2.1.gc`), e.g. `10` Efectivo, `48` Tarjeta Crédito, `49` Tarjeta Débito, `47` Transferencia Débito Bancaria, `1` Instrumento no definido, `ZZZ` Otro (Acuerdo mutuo). Any other value is rejected with 422. Which code fits a sale or a note is the integrator's choice.","enum":["1","2","3","4","5","6","7","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","60","61","62","63","64","65","66","67","70","71","72","74","75","76","77","78","91","92","93","94","95","96","97","ZZZ"],"title":"Method Code","type":"string","isRequired":true,"uniqueKey":"payments.oneOf.0.items.[INDEX].method_code","typeLabel":"enum\u003cstring>"},"amount":{"oneOf":[{"type":"string","title":"Amount","description":"Non-negative decimal string with up to 2 decimals.","pattern":"^\\d{1,15}(\\.\\d{1,2})?$","example":"150000.00","uniqueKey":"payments.oneOf.0.items.[INDEX].amount.oneOf.0","typeLabel":"string"},{"type":"null","title":"Amount","description":"How much was paid with this means. Optional: Cufea stores it and returns it, but it is not part of the signed XML (Anexo 1.9 FAN01-FAN04 define no amount in `PaymentMeans`) and it is not checked against the invoice total.","uniqueKey":"payments.oneOf.0.items.[INDEX].amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"payments.oneOf.0.items.[INDEX].amount","typeLabel":"string | null"},"due_date":{"oneOf":[{"type":"string","title":"Due Date","description":"Required when `form` is `2`.","format":"date","uniqueKey":"payments.oneOf.0.items.[INDEX].due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","title":"Due Date","description":"Required when `form` is `2`.","uniqueKey":"payments.oneOf.0.items.[INDEX].due_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"payments.oneOf.0.items.[INDEX].due_date","typeLabel":"string\u003cdate> | null"}},"required":["form","method_code"],"title":"InvoicePaymentIn","type":"object","uniqueKey":"payments.oneOf.0.items.[INDEX]","typeLabel":"InvoicePaymentIn · object"},"title":"Payments","description":"Every means of payment used in the sale, in order: one `cac:PaymentMeans` each (Anexo 1.9 FAN01, 1..N), e.g. cash plus a card. Each credit (`form` `2`) entry needs its `due_date`. At most 20. Send `payment` or `payments`, not both.","maxItems":20,"minItems":1,"example":[{"amount":"150000.00","form":"1","method_code":"10"},{"amount":"88001.19","form":"1","method_code":"48"}],"uniqueKey":"payments.oneOf.0","typeLabel":"InvoicePaymentIn · object[]"},{"type":"null","title":"Payments","description":"Every means of payment used in the sale, in order: one `cac:PaymentMeans` each (Anexo 1.9 FAN01, 1..N), e.g. cash plus a card. Each credit (`form` `2`) entry needs its `due_date`. At most 20. Send `payment` or `payments`, not both.","example":[{"amount":"150000.00","form":"1","method_code":"10"},{"amount":"88001.19","form":"1","method_code":"48"}],"uniqueKey":"payments.oneOf.1","typeLabel":"null"}],"uniqueKey":"payments","typeLabel":"InvoicePaymentIn · object[] | null"},"prefix":{"oneOf":[{"type":"string","title":"Prefix","description":"Series (the prefix of the numbering range) to issue under. Default: the tenant's default range. The chosen range must exist for the tenant's DIAN environment; every series counts its numbers on its own.","maxLength":4,"pattern":"^[A-Za-z0-9]*$","uniqueKey":"prefix.oneOf.0","typeLabel":"string"},{"type":"null","title":"Prefix","description":"Series (the prefix of the numbering range) to issue under. Default: the tenant's default range. The chosen range must exist for the tenant's DIAN environment; every series counts its numbers on its own.","uniqueKey":"prefix.oneOf.1","typeLabel":"null"}],"uniqueKey":"prefix","typeLabel":"string | null"},"reference":{"oneOf":[{"type":"string","title":"Reference","description":"Your own reference of the document (1-100 characters of `A-Z a-z 0-9 . _ : -`), unique per stage and document kind. Find the document by it with `GET /v1/documents?reference=...\u0026kind=...`, e.g. after a create whose answer was lost. A create reusing a reference answers 409 `reference_conflict`, even with the same body, unless it is the replay of the same request through its `Idempotency-Key`; resolve it with that lookup.","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9._:-]{1,100}$","example":"ORDER-2026-000123","uniqueKey":"reference.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reference","description":"Your own reference of the document (1-100 characters of `A-Z a-z 0-9 . _ : -`), unique per stage and document kind. Find the document by it with `GET /v1/documents?reference=...\u0026kind=...`, e.g. after a create whose answer was lost. A create reusing a reference answers 409 `reference_conflict`, even with the same body, unless it is the replay of the same request through its `Idempotency-Key`; resolve it with that lookup.","example":"ORDER-2026-000123","uniqueKey":"reference.oneOf.1","typeLabel":"null"}],"uniqueKey":"reference","typeLabel":"string | null"},"send":{"default":false,"description":"Also queue the invoice for sending to the DIAN right after it is stored, as `POST /v1/invoices/{document_id}/send` does. If queueing fails the invoice is still created and the response says `send: not_queued`.","title":"Send","type":"boolean","uniqueKey":"send","typeLabel":"boolean"},"send_email":{"default":true,"description":"Email the buyer after the DIAN accepts the document (default `true`, like Factus): a ZIP with the signed AttachedDocument and the PDF goes to the buyer's `email`, from `no-reply@cufea.com` under your company's name, answers to your company's email. Only in production: the sandbox and the DIAN test stage never email anyone (`delivery.status` `skipped`). Send `false` to deliver it yourself with `GET .../email-content` or `POST .../send-email`.","title":"Send Email","type":"boolean","uniqueKey":"send_email","typeLabel":"boolean"},"withholdings":{"items":{"additionalProperties":false,"properties":{"percent":{"description":"Non-negative decimal string (an integer is also accepted).","examples":["1250.50"],"pattern":"^\\d{1,15}(\\.\\d{1,6})?$","title":"Percent","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].percent","typeLabel":"string"},"scheme":{"description":"Withholding: `05` ReteIVA, `06` ReteFuente, `07` ReteICA.","enum":["01","02","03","04","05","06","07","08","ZZ"],"title":"TaxScheme","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].scheme","typeLabel":"enum\u003cstring>"},"taxable_amount":{"description":"Non-negative decimal string (an integer is also accepted).","examples":["1250.50"],"pattern":"^\\d{1,15}(\\.\\d{1,6})?$","title":"Taxable Amount","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].taxable_amount","typeLabel":"string"}},"required":["scheme","percent","taxable_amount"],"title":"WithholdingIn","type":"object","uniqueKey":"withholdings.items.[INDEX]","typeLabel":"WithholdingIn · object"},"maxItems":3,"title":"Withholdings","type":"array","uniqueKey":"withholdings","typeLabel":"WithholdingIn · object[]"}},"required":["customer","lines"],"title":"InvoiceCreate","type":"object","uniqueKey":"","typeLabel":"InvoiceCreate · object"},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"54699dfa-4fa8-46e4-bf56-bd0f7f1391b2":{"content":{"application/json":{"example":{"cufe":"0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1","customer":{"id_number":"800197268","id_type":"31","name":"Acme S.A.S."},"delivery":{"attempts":0,"manual":false,"reason":"awaiting_acceptance","recipient":null,"status":"pending","updated_at":null},"dian_errors":[],"dian_status_code":null,"dian_status_description":null,"document_id":"SBX1","issue_datetime":"2026-11-14T20:37:52.369143-05:00","kind":"invoice","lines":[{"description":"Service","discount_amount":"0.00","discount_rate":"0.00","gross_amount":"100000.00","is_excluded":false,"item_code":null,"line_id":1,"net_amount":"100000.00","quantity":"1","taxes":[{"is_excluded":false,"name":"IVA","percent":"19.00","scheme":"01","tax_amount":"19000.00","taxable_amount":"100000.00"}],"unit_code":"94","unit_price":"100000.00"}],"notes":[],"number":1,"payments":[{"amount":"60000.00","due_date":null,"form":"1","method_code":"10"},{"amount":"59000.00","due_date":"2026-12-14","form":"2","method_code":"1"}],"prefix":"SBX","qr":{"content":"https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1","url":null},"reference":"ORDER-1001","send":null,"sent_at":null,"state":"prepared","taxes":[{"is_excluded":false,"name":"IVA","percent":"19.00","scheme":"01","tax_amount":"19000.00","taxable_amount":"100000.00"}],"totals":{"allowance_total":"0.00","charge_total":"0.00","line_extension":"100000.00","payable":"119000.00","rounding":"0.00","tax_exclusive":"100000.00","tax_inclusive":"119000.00"},"withholdings":[],"xml_base64":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4K..."},"schema":{"properties":{"cufe":{"description":"CUFE: 96 hexadecimal characters (SHA-384).","title":"Cufe","type":"string","isRequired":true,"uniqueKey":"cufe","typeLabel":"string"},"customer":{"description":"The buyer. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.","properties":{"id_number":{"description":"`cbc:CompanyID`, without check digit. A consumidor final carries what was signed (`222222222222`).","title":"Id Number","type":"string","isRequired":true,"uniqueKey":"customer.id_number","typeLabel":"string"},"id_type":{"description":"`cbc:CompanyID/@schemeName`, e.g. `31` NIT, `13` cédula.","title":"Id Type","type":"string","isRequired":true,"uniqueKey":"customer.id_type","typeLabel":"string"},"name":{"description":"`cbc:RegistrationName`.","title":"Name","type":"string","isRequired":true,"uniqueKey":"customer.name","typeLabel":"string"}},"required":["id_type","id_number","name"],"title":"CustomerOut","type":"object","isRequired":true,"uniqueKey":"customer","typeLabel":"CustomerOut · object"},"delivery":{"description":"The email of the invoice to its buyer.","properties":{"status":{"description":"`pending` (waiting for the DIAN's acceptance or a retry), `sent`, `failed` or `skipped`.","enum":["pending","sent","failed","skipped"],"title":"Status","type":"string","isRequired":true,"uniqueKey":"delivery.status","typeLabel":"enum\u003cstring>"},"attempts":{"default":0,"description":"Attempts of this delivery so far.","title":"Attempts","type":"integer","uniqueKey":"delivery.attempts","typeLabel":"integer"},"manual":{"default":false,"description":"`true` when it was sent with `POST .../send-email`.","title":"Manual","type":"boolean","uniqueKey":"delivery.manual","typeLabel":"boolean"},"reason":{"oneOf":[{"type":"string","title":"Reason","description":"Why it is not `sent`: `awaiting_acceptance`, `email_unavailable` (a retry is scheduled while `pending`), `send_email_disabled`, `stage_not_production`, `no_recipient`, `document_not_accepted`, `email_rejected`, `email_not_configured`, `attached_document_unavailable` or `package_too_large`.","uniqueKey":"delivery.reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reason","description":"Why it is not `sent`: `awaiting_acceptance`, `email_unavailable` (a retry is scheduled while `pending`), `send_email_disabled`, `stage_not_production`, `no_recipient`, `document_not_accepted`, `email_rejected`, `email_not_configured`, `attached_document_unavailable` or `package_too_large`.","uniqueKey":"delivery.reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery.reason","typeLabel":"string | null"},"recipient":{"oneOf":[{"type":"string","title":"Recipient","description":"The address it went to.","uniqueKey":"delivery.recipient.oneOf.0","typeLabel":"string"},{"type":"null","title":"Recipient","description":"The address it went to.","uniqueKey":"delivery.recipient.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery.recipient","typeLabel":"string | null"},"updated_at":{"oneOf":[{"type":"string","title":"Updated At","description":"When it last changed.","format":"date-time","uniqueKey":"delivery.updated_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Updated At","description":"When it last changed.","uniqueKey":"delivery.updated_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"delivery.updated_at","typeLabel":"string\u003cdate-time> | null"}},"required":["status"],"title":"Delivery","type":"object","isRequired":true,"uniqueKey":"delivery","typeLabel":"Delivery · object"},"document_id":{"description":"Prefix and number, e.g. `SETP990000001`.","title":"Document Id","type":"string","isRequired":true,"uniqueKey":"document_id","typeLabel":"string"},"issue_datetime":{"format":"date-time","title":"Issue Datetime","type":"string","isRequired":true,"uniqueKey":"issue_datetime","typeLabel":"string\u003cdate-time>"},"lines":{"description":"The lines in order. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.","items":{"description":"A line as signed: gross value, discount, net value and taxes.","properties":{"description":{"title":"Description","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].description","typeLabel":"string"},"discount_amount":{"description":"Line discount; `0.00` without one.","title":"Discount Amount","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].discount_amount","typeLabel":"string"},"discount_rate":{"description":"Discount percent of the gross amount; `0.00`.","title":"Discount Rate","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].discount_rate","typeLabel":"string"},"gross_amount":{"description":"Quantity x unit price, before the line discount.","title":"Gross Amount","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].gross_amount","typeLabel":"string"},"is_excluded":{"description":"The line carries no IVA: excluded from IVA, or sent without IVA.","title":"Is Excluded","type":"boolean","isRequired":true,"uniqueKey":"lines.items.[INDEX].is_excluded","typeLabel":"boolean"},"item_code":{"oneOf":[{"type":"string","title":"Item Code","isRequired":true,"uniqueKey":"lines.items.[INDEX].item_code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Item Code","isRequired":true,"uniqueKey":"lines.items.[INDEX].item_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].item_code","typeLabel":"string | null"},"line_id":{"description":"`cbc:ID` of the line, from 1 in request order.","title":"Line Id","type":"integer","isRequired":true,"uniqueKey":"lines.items.[INDEX].line_id","typeLabel":"integer"},"net_amount":{"description":"`LineExtensionAmount`: gross minus the discount, the base of its taxes.","title":"Net Amount","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].net_amount","typeLabel":"string"},"quantity":{"title":"Quantity","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].quantity","typeLabel":"string"},"taxes":{"items":{"description":"A tax at one percent with its base and amount (a `TaxSubtotal` of the XML).","properties":{"name":{"description":"The DIAN name of the tax, e.g. `IVA`.","title":"Name","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].name","typeLabel":"string"},"percent":{"oneOf":[{"type":"string","title":"Percent","description":"Rate in percent, e.g. `19.00`; `0.00` is exempt (exento). Null only on the IVA-excluded entry.","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].percent.oneOf.0","typeLabel":"string"},{"type":"null","title":"Percent","description":"Rate in percent, e.g. `19.00`; `0.00` is exempt (exento). Null only on the IVA-excluded entry.","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].percent.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].percent","typeLabel":"string | null"},"scheme":{"description":"Tax code: `01` IVA, `02` IC, `03` ICA, `04` INC; withholdings `05`-`08`.","enum":["01","02","03","04","05","06","07","08","ZZ"],"title":"TaxScheme","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].scheme","typeLabel":"enum\u003cstring>"},"tax_amount":{"description":"`TaxAmount`.","title":"Tax Amount","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].tax_amount","typeLabel":"string"},"taxable_amount":{"description":"`TaxableAmount`: the base.","title":"Taxable Amount","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].taxable_amount","typeLabel":"string"},"is_excluded":{"default":false,"description":"Only in `taxes`: the entry that sums the lines without IVA (excluded from IVA, or sent without IVA). The XML informs no IVA for them, so it has no percent and a zero amount.","title":"Is Excluded","type":"boolean","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX].is_excluded","typeLabel":"boolean"}},"required":["scheme","name","percent","taxable_amount","tax_amount"],"title":"TaxAmountOut","type":"object","uniqueKey":"lines.items.[INDEX].taxes.items.[INDEX]","typeLabel":"TaxAmountOut · object"},"title":"Taxes","type":"array","isRequired":true,"uniqueKey":"lines.items.[INDEX].taxes","typeLabel":"TaxAmountOut · object[]"},"unit_code":{"title":"Unit Code","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].unit_code","typeLabel":"string"},"unit_price":{"title":"Unit Price","type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].unit_price","typeLabel":"string"}},"required":["line_id","description","item_code","quantity","unit_code","unit_price","gross_amount","discount_rate","discount_amount","net_amount","taxes","is_excluded"],"title":"LineSummaryOut","type":"object","uniqueKey":"lines.items.[INDEX]","typeLabel":"LineSummaryOut · object"},"title":"Lines","type":"array","isRequired":true,"uniqueKey":"lines","typeLabel":"LineSummaryOut · object[]"},"number":{"title":"Number","type":"integer","isRequired":true,"uniqueKey":"number","typeLabel":"integer"},"prefix":{"title":"Prefix","type":"string","isRequired":true,"uniqueKey":"prefix","typeLabel":"string"},"qr":{"properties":{"content":{"description":"`sts:QRCode` exactly as signed: the DIAN document lookup URL with the CUFE or CUDE. Encode it in the QR of the printed document.","title":"Content","type":"string","isRequired":true,"uniqueKey":"qr.content","typeLabel":"string"},"url":{"oneOf":[{"type":"string","title":"Url","description":"The same URL once the DIAN accepted the document (`state` `accepted`); null before, because the DIAN catalog shows nothing yet.","isRequired":true,"uniqueKey":"qr.url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Url","description":"The same URL once the DIAN accepted the document (`state` `accepted`); null before, because the DIAN catalog shows nothing yet.","isRequired":true,"uniqueKey":"qr.url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"qr.url","typeLabel":"string | null"}},"required":["content","url"],"title":"QrOut","type":"object","isRequired":true,"uniqueKey":"qr","typeLabel":"QrOut · object"},"state":{"description":"`prepared` until the document is sent; then the latest DIAN outcome (`accepted`, `rejected`, `not_found`...) or, before any answer, the last event (`sent`, `send_failed`...).","title":"State","type":"string","isRequired":true,"uniqueKey":"state","typeLabel":"string"},"taxes":{"description":"Taxes per code and percent, ordered by code and percent, then the IVA-excluded entry when a line has no IVA. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.","items":{"description":"A tax at one percent with its base and amount (a `TaxSubtotal` of the XML).","properties":{"name":{"description":"The DIAN name of the tax, e.g. `IVA`.","title":"Name","type":"string","isRequired":true,"uniqueKey":"taxes.items.[INDEX].name","typeLabel":"string"},"percent":{"oneOf":[{"type":"string","title":"Percent","description":"Rate in percent, e.g. `19.00`; `0.00` is exempt (exento). Null only on the IVA-excluded entry.","isRequired":true,"uniqueKey":"taxes.items.[INDEX].percent.oneOf.0","typeLabel":"string"},{"type":"null","title":"Percent","description":"Rate in percent, e.g. `19.00`; `0.00` is exempt (exento). Null only on the IVA-excluded entry.","isRequired":true,"uniqueKey":"taxes.items.[INDEX].percent.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"taxes.items.[INDEX].percent","typeLabel":"string | null"},"scheme":{"description":"Tax code: `01` IVA, `02` IC, `03` ICA, `04` INC; withholdings `05`-`08`.","enum":["01","02","03","04","05","06","07","08","ZZ"],"title":"TaxScheme","type":"string","isRequired":true,"uniqueKey":"taxes.items.[INDEX].scheme","typeLabel":"enum\u003cstring>"},"tax_amount":{"description":"`TaxAmount`.","title":"Tax Amount","type":"string","isRequired":true,"uniqueKey":"taxes.items.[INDEX].tax_amount","typeLabel":"string"},"taxable_amount":{"description":"`TaxableAmount`: the base.","title":"Taxable Amount","type":"string","isRequired":true,"uniqueKey":"taxes.items.[INDEX].taxable_amount","typeLabel":"string"},"is_excluded":{"default":false,"description":"Only in `taxes`: the entry that sums the lines without IVA (excluded from IVA, or sent without IVA). The XML informs no IVA for them, so it has no percent and a zero amount.","title":"Is Excluded","type":"boolean","uniqueKey":"taxes.items.[INDEX].is_excluded","typeLabel":"boolean"}},"required":["scheme","name","percent","taxable_amount","tax_amount"],"title":"TaxAmountOut","type":"object","uniqueKey":"taxes.items.[INDEX]","typeLabel":"TaxAmountOut · object"},"title":"Taxes","type":"array","isRequired":true,"uniqueKey":"taxes","typeLabel":"TaxAmountOut · object[]"},"totals":{"description":"Monetary totals. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.","properties":{"allowance_total":{"description":"`AllowanceTotalAmount`: document-level discounts (line discounts are already in each line).","title":"Allowance Total","type":"string","isRequired":true,"uniqueKey":"totals.allowance_total","typeLabel":"string"},"charge_total":{"description":"`ChargeTotalAmount`: document-level charges.","title":"Charge Total","type":"string","isRequired":true,"uniqueKey":"totals.charge_total","typeLabel":"string"},"line_extension":{"description":"`LineExtensionAmount`: sum of the line net amounts, after line discounts.","title":"Line Extension","type":"string","isRequired":true,"uniqueKey":"totals.line_extension","typeLabel":"string"},"payable":{"description":"`PayableAmount`: the amount to pay.","title":"Payable","type":"string","isRequired":true,"uniqueKey":"totals.payable","typeLabel":"string"},"rounding":{"description":"`PayableRoundingAmount`; `0.00` when the document carries none.","title":"Rounding","type":"string","isRequired":true,"uniqueKey":"totals.rounding","typeLabel":"string"},"tax_exclusive":{"description":"`TaxExclusiveAmount`: sum of the net amounts of the lines that carry a tax.","title":"Tax Exclusive","type":"string","isRequired":true,"uniqueKey":"totals.tax_exclusive","typeLabel":"string"},"tax_inclusive":{"description":"`TaxInclusiveAmount`: `line_extension` plus taxes.","title":"Tax Inclusive","type":"string","isRequired":true,"uniqueKey":"totals.tax_inclusive","typeLabel":"string"}},"required":["line_extension","tax_exclusive","tax_inclusive","allowance_total","charge_total","payable","rounding"],"title":"DocumentTotals","type":"object","isRequired":true,"uniqueKey":"totals","typeLabel":"DocumentTotals · object"},"withholdings":{"description":"Withholdings per code and percent; empty on notes. Read from the signed XML, so it is exactly what the DIAN received. Amounts are decimal strings with 2 decimals.","items":{"description":"A tax at one percent with its base and amount (a `TaxSubtotal` of the XML).","properties":{"name":{"description":"The DIAN name of the tax, e.g. `IVA`.","title":"Name","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].name","typeLabel":"string"},"percent":{"oneOf":[{"type":"string","title":"Percent","description":"Rate in percent, e.g. `19.00`; `0.00` is exempt (exento). Null only on the IVA-excluded entry.","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].percent.oneOf.0","typeLabel":"string"},{"type":"null","title":"Percent","description":"Rate in percent, e.g. `19.00`; `0.00` is exempt (exento). Null only on the IVA-excluded entry.","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].percent.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"withholdings.items.[INDEX].percent","typeLabel":"string | null"},"scheme":{"description":"Tax code: `01` IVA, `02` IC, `03` ICA, `04` INC; withholdings `05`-`08`.","enum":["01","02","03","04","05","06","07","08","ZZ"],"title":"TaxScheme","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].scheme","typeLabel":"enum\u003cstring>"},"tax_amount":{"description":"`TaxAmount`.","title":"Tax Amount","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].tax_amount","typeLabel":"string"},"taxable_amount":{"description":"`TaxableAmount`: the base.","title":"Taxable Amount","type":"string","isRequired":true,"uniqueKey":"withholdings.items.[INDEX].taxable_amount","typeLabel":"string"},"is_excluded":{"default":false,"description":"Only in `taxes`: the entry that sums the lines without IVA (excluded from IVA, or sent without IVA). The XML informs no IVA for them, so it has no percent and a zero amount.","title":"Is Excluded","type":"boolean","uniqueKey":"withholdings.items.[INDEX].is_excluded","typeLabel":"boolean"}},"required":["scheme","name","percent","taxable_amount","tax_amount"],"title":"TaxAmountOut","type":"object","uniqueKey":"withholdings.items.[INDEX]","typeLabel":"TaxAmountOut · object"},"title":"Withholdings","type":"array","isRequired":true,"uniqueKey":"withholdings","typeLabel":"TaxAmountOut · object[]"},"xml_base64":{"description":"The signed UBL XML, base64 encoded.","title":"Xml Base64","type":"string","isRequired":true,"uniqueKey":"xml_base64","typeLabel":"string"},"dian_errors":{"description":"Rule messages of the latest DIAN answer.","items":{"description":"A validation rule message of the DIAN answer, relayed as the DIAN wrote it.","properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian_errors.items.[INDEX].rule","typeLabel":"string"},"severity":{"description":"`rejection`, `notification` or `unknown`.","title":"Severity","type":"string","isRequired":true,"uniqueKey":"dian_errors.items.[INDEX].severity","typeLabel":"string"},"text":{"title":"Text","type":"string","isRequired":true,"uniqueKey":"dian_errors.items.[INDEX].text","typeLabel":"string"}},"required":["rule","severity","text"],"title":"DianMessage","type":"object","uniqueKey":"dian_errors.items.[INDEX]","typeLabel":"DianMessage · object"},"title":"Dian Errors","type":"array","uniqueKey":"dian_errors","typeLabel":"DianMessage · object[]"},"dian_status_code":{"oneOf":[{"type":"string","title":"Dian Status Code","description":"StatusCode of the latest DIAN answer, e.g. `00`; none yet.","uniqueKey":"dian_status_code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Dian Status Code","description":"StatusCode of the latest DIAN answer, e.g. `00`; none yet.","uniqueKey":"dian_status_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian_status_code","typeLabel":"string | null"},"dian_status_description":{"oneOf":[{"type":"string","title":"Dian Status Description","description":"StatusDescription of the latest DIAN answer.","uniqueKey":"dian_status_description.oneOf.0","typeLabel":"string"},{"type":"null","title":"Dian Status Description","description":"StatusDescription of the latest DIAN answer.","uniqueKey":"dian_status_description.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian_status_description","typeLabel":"string | null"},"kind":{"const":"invoice","default":"invoice","description":"Always `invoice`.","title":"Kind","type":"string","uniqueKey":"kind","typeLabel":"string"},"notes":{"description":"The document's `cbc:Note` legends as signed, in order (`notes`, or the `observation`, given on create); empty when none.","items":{"type":"string","uniqueKey":"notes.items.[INDEX]","typeLabel":"string"},"title":"Notes","type":"array","uniqueKey":"notes","typeLabel":"string[]"},"payments":{"description":"The means of payment as signed (`cac:PaymentMeans`), in order, with the amounts given on create. A single `payment` on create is one entry.","items":{"description":"A means of payment of the invoice: one `cac:PaymentMeans`, in order.","properties":{"amount":{"oneOf":[{"type":"string","title":"Amount","description":"The amount given on create for this means; null when none was given. Stored by Cufea, not part of the signed XML.","isRequired":true,"uniqueKey":"payments.items.[INDEX].amount.oneOf.0","typeLabel":"string"},{"type":"null","title":"Amount","description":"The amount given on create for this means; null when none was given. Stored by Cufea, not part of the signed XML.","isRequired":true,"uniqueKey":"payments.items.[INDEX].amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payments.items.[INDEX].amount","typeLabel":"string | null"},"due_date":{"oneOf":[{"type":"string","title":"Due Date","description":"`cbc:PaymentDueDate`; null when not informed.","format":"date","isRequired":true,"uniqueKey":"payments.items.[INDEX].due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","title":"Due Date","description":"`cbc:PaymentDueDate`; null when not informed.","isRequired":true,"uniqueKey":"payments.items.[INDEX].due_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"payments.items.[INDEX].due_date","typeLabel":"string\u003cdate> | null"},"form":{"description":"`cbc:ID`: `1` cash, `2` credit.","title":"Form","type":"string","isRequired":true,"uniqueKey":"payments.items.[INDEX].form","typeLabel":"string"},"method_code":{"description":"`cbc:PaymentMeansCode`, e.g. `10` cash.","title":"Method Code","type":"string","isRequired":true,"uniqueKey":"payments.items.[INDEX].method_code","typeLabel":"string"}},"required":["form","method_code","due_date","amount"],"title":"PaymentOut","type":"object","uniqueKey":"payments.items.[INDEX]","typeLabel":"PaymentOut · object"},"title":"Payments","type":"array","uniqueKey":"payments","typeLabel":"PaymentOut · object[]"},"reference":{"oneOf":[{"type":"string","title":"Reference","description":"The reference given on create; null when none was given.","uniqueKey":"reference.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reference","description":"The reference given on create; null when none was given.","uniqueKey":"reference.oneOf.1","typeLabel":"null"}],"uniqueKey":"reference","typeLabel":"string | null"},"send":{"oneOf":[{"type":"string","title":"Send","description":"Only when `send` was requested: `queued`, or `not_queued` if the job queue failed (send it with `POST /v1/invoices/{document_id}/send`).","enum":["queued","pending","sent","not_queued"],"uniqueKey":"send.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Send","description":"Only when `send` was requested: `queued`, or `not_queued` if the job queue failed (send it with `POST /v1/invoices/{document_id}/send`).","uniqueKey":"send.oneOf.1","typeLabel":"null"}],"uniqueKey":"send","typeLabel":"enum\u003cstring> | null"},"sent_at":{"oneOf":[{"type":"string","title":"Sent At","description":"When the DIAN last received the document; none if never.","format":"date-time","uniqueKey":"sent_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Sent At","description":"When the DIAN last received the document; none if never.","uniqueKey":"sent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"sent_at","typeLabel":"string\u003cdate-time> | null"}},"required":["document_id","number","prefix","cufe","issue_datetime","customer","state","totals","taxes","withholdings","lines","qr","delivery","xml_base64"],"title":"InvoiceCreated","type":"object","uniqueKey":"","typeLabel":"InvoiceCreated · object"},"examples":{"Example":{"title":"Example","value":{"cufe":"0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1","customer":{"id_number":"800197268","id_type":"31","name":"Acme S.A.S."},"delivery":{"attempts":0,"manual":false,"reason":"awaiting_acceptance","recipient":null,"status":"pending","updated_at":null},"dian_errors":[],"dian_status_code":null,"dian_status_description":null,"document_id":"SBX1","issue_datetime":"2026-11-14T20:37:52.369143-05:00","kind":"invoice","lines":[{"description":"Service","discount_amount":"0.00","discount_rate":"0.00","gross_amount":"100000.00","is_excluded":false,"item_code":null,"line_id":1,"net_amount":"100000.00","quantity":"1","taxes":[{"is_excluded":false,"name":"IVA","percent":"19.00","scheme":"01","tax_amount":"19000.00","taxable_amount":"100000.00"}],"unit_code":"94","unit_price":"100000.00"}],"notes":[],"number":1,"payments":[{"amount":"60000.00","due_date":null,"form":"1","method_code":"10"},{"amount":"59000.00","due_date":"2026-12-14","form":"2","method_code":"1"}],"prefix":"SBX","qr":{"content":"https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=0b7bb53ee7386e64132dd48217accba25aea627a4008f35f6c036bcb234336a780e4896bee71d8a4cd7b5b4c4e72ded1","url":null},"reference":"ORDER-1001","send":null,"sent_at":null,"state":"prepared","taxes":[{"is_excluded":false,"name":"IVA","percent":"19.00","scheme":"01","tax_amount":"19000.00","taxable_amount":"100000.00"}],"totals":{"allowance_total":"0.00","charge_total":"0.00","line_extension":"100000.00","payable":"119000.00","rounding":"0.00","tax_exclusive":"100000.00","tax_inclusive":"119000.00"},"withholdings":[],"xml_base64":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4K..."}}},"exampleType":"examples"}},"description":"Successful Response","headers":{"Idempotent-Replayed":{"description":"`true` when this is the stored response of an earlier identical request.","schema":{"enum":["true"],"type":"string"}},"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"examples"},"910fc551-a2e0-427d-a7ee-089ee55d80d3":{"content":{"application/problem+json":{"example":{"code":"unauthorized","detail":"Missing or invalid API key.","request_id":"3668a7374b1e4314b2f932a5620da1f1","status":401,"title":"Unauthorized","type":"urn:cufea:problem:unauthorized"},"schema":{"description":"Error body (`application/problem+json`, RFC 9457).","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"}},"required":["type","title","status","code","detail","request_id"],"title":"Problem","type":"object","uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"code":"unauthorized","detail":"Missing or invalid API key.","request_id":"3668a7374b1e4314b2f932a5620da1f1","status":401,"title":"Unauthorized","type":"urn:cufea:problem:unauthorized"}}},"exampleType":"examples"}},"description":"Missing or invalid API key.","exampleType":"examples"},"09b72ad3-f6c7-4dc0-b0bc-14c406385e2b":{"content":{"application/problem+json":{"schema":{"description":"Error body (`application/problem+json`, RFC 9457).","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"}},"required":["type","title","status","code","detail","request_id"],"title":"Problem","type":"object","uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","detail":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","dian":{"rule":"\u003cstring>","text":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The tenant is suspended (`tenant_suspended`).","headers":{"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"generated"},"f0fa3828-9f10-4549-9416-6e184cd6a9c3":{"content":{"application/problem+json":{"schema":{"description":"Error body (`application/problem+json`, RFC 9457).","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"}},"required":["type","title","status","code","detail","request_id"],"title":"Problem","type":"object","uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","detail":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","dian":{"rule":"\u003cstring>","text":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The tenant is not configured (`tenant_not_configured`), its numbering range is used up (`numbering_range_exhausted`) or was replaced meanwhile (`numbering_range_changed`), another invoice of this stage already carries the `reference` (`reference_conflict`, also for the same body sent again without its `Idempotency-Key`: find the invoice with `GET /v1/documents?reference=...\u0026kind=invoice`), or an identical request with the same `Idempotency-Key` is still running (`idempotency_in_progress`).","headers":{"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"generated"},"10d1b6ed-1293-469c-8e2f-ee23eca4cbba":{"content":{"application/problem+json":{"example":{"code":"validation_error","detail":"The request is not valid; see `errors` for the offending fields.","errors":[{"loc":["body","customer"],"msg":"Field required"},{"loc":["body","lines"],"msg":"List should have at least 1 item after validation, not 0"}],"request_id":"88272d6eb903438690d3193e3113270a","status":422,"title":"Request validation failed","type":"urn:cufea:problem:validation_error"},"schema":{"description":"A 422 problem. `errors` is present when `code` is `validation_error`.","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"},"errors":{"oneOf":[{"type":"array","items":{"description":"One offending field of a request that failed validation.","properties":{"loc":{"description":"Where the field is, e.g. `[\"body\", \"lines\"]`.","items":{"type":"string","uniqueKey":"errors.oneOf.0.items.[INDEX].loc.items.[INDEX]","typeLabel":"string"},"title":"Loc","type":"array","isRequired":true,"uniqueKey":"errors.oneOf.0.items.[INDEX].loc","typeLabel":"string[]"},"msg":{"description":"What is wrong with it. The submitted value is never echoed.","title":"Msg","type":"string","isRequired":true,"uniqueKey":"errors.oneOf.0.items.[INDEX].msg","typeLabel":"string"}},"required":["loc","msg"],"title":"FieldError","type":"object","uniqueKey":"errors.oneOf.0.items.[INDEX]","typeLabel":"FieldError · object"},"title":"Errors","description":"The offending fields, for `validation_error` only.","uniqueKey":"errors.oneOf.0","typeLabel":"FieldError · object[]"},{"type":"null","title":"Errors","description":"The offending fields, for `validation_error` only.","uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"FieldError · object[] | null"}},"required":["type","title","status","code","detail","request_id"],"title":"ValidationProblem","type":"object","uniqueKey":"","typeLabel":"ValidationProblem · object"},"examples":{"Example":{"title":"Example","value":{"code":"validation_error","detail":"The request is not valid; see `errors` for the offending fields.","errors":[{"loc":["body","customer"],"msg":"Field required"},{"loc":["body","lines"],"msg":"List should have at least 1 item after validation, not 0"}],"request_id":"88272d6eb903438690d3193e3113270a","status":422,"title":"Request validation failed","type":"urn:cufea:problem:validation_error"}}},"exampleType":"examples"}},"description":"The body is malformed (`validation_error`), breaks an invoice rule (`invoice_invalid`), names a series the stage has no range for (`numbering_prefix_unknown`) or whose range is not in force at the issue date (`numbering_range_not_in_force`), or the `Idempotency-Key` was used for a different request (`idempotency_key_reused`).","headers":{"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"examples"},"4bc967ed-7c57-453c-ba2e-9892cabd8578":{"content":{"application/problem+json":{"example":{"code":"rate_limited","detail":"This API key made more than 120 requests in the current window. Retry after 17 seconds.","request_id":"5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b","status":429,"title":"Too Many Requests","type":"urn:cufea:problem:rate_limited"},"schema":{"description":"Error body (`application/problem+json`, RFC 9457).","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"}},"required":["type","title","status","code","detail","request_id"],"title":"Problem","type":"object","uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"code":"rate_limited","detail":"This API key made more than 120 requests in the current window. Retry after 17 seconds.","request_id":"5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b","status":429,"title":"Too Many Requests","type":"urn:cufea:problem:rate_limited"}}},"exampleType":"examples"}},"description":"This API key is over its quota for the current window (`rate_limited`). Wait `Retry-After` seconds; a create or send retried with its `Idempotency-Key` is safe.","headers":{"Retry-After":{"description":"Whole seconds to wait before the next request (RFC 9110 `delay-seconds`); equals `X-RateLimit-Reset`.","example":17,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"examples"},"09466850-c668-45cb-9864-e15ce933b94d":{"content":{"application/problem+json":{"schema":{"description":"Error body (`application/problem+json`, RFC 9457).","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"}},"required":["type","title","status","code","detail","request_id"],"title":"Problem","type":"object","uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","detail":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","dian":{"rule":"\u003cstring>","text":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The document store failed (`store_error`). If a number had already been reserved it is lost (never reused); the server logs it.","headers":{"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"generated"},"cd51f106-d5b8-478f-9eff-fa0f6f857b7d":{"content":{"application/problem+json":{"schema":{"description":"Error body (`application/problem+json`, RFC 9457).","properties":{"code":{"description":"Stable machine-readable error code.","title":"Code","type":"string","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"description":"Explanation specific to this occurrence.","title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"request_id":{"description":"Value of the `X-Request-ID` response header.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"status":{"description":"HTTP status code.","title":"Status","type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"title":{"description":"Short, human-readable summary of the problem kind.","title":"Title","type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"type":{"description":"Stable URI identifying the problem kind.","title":"Type","type":"string","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"dian":{"oneOf":[{"type":"object","title":"DianDetail","description":"Present only when the DIAN rejected a document.","required":["rule","text"],"properties":{"rule":{"description":"DIAN validation rule code, for example `FAD06`.","title":"Rule","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.rule","typeLabel":"string"},"text":{"description":"Rule description as returned by the DIAN.","title":"Text","type":"string","isRequired":true,"uniqueKey":"dian.oneOf.0.text","typeLabel":"string"}},"uniqueKey":"dian.oneOf.0","typeLabel":"DianDetail · object"},{"type":"null","description":"Present only when the DIAN rejected a document.","uniqueKey":"dian.oneOf.1","typeLabel":"null"}],"uniqueKey":"dian","typeLabel":"DianDetail · object | null"}},"required":["type","title","status","code","detail","request_id"],"title":"Problem","type":"object","uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"code":"\u003cstring>","detail":"\u003cstring>","request_id":"\u003cstring>","status":123,"title":"\u003cstring>","type":"\u003cstring>","dian":{"rule":"\u003cstring>","text":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"The server has no invoice services (or idempotency keys, or the job queue for `send`) configured.","headers":{"X-RateLimit-Limit":{"description":"Requests this API key may make in the current window (120 per minute by default).","example":120,"schema":{"minimum":1,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests this API key has left in the current window.","example":119,"schema":{"minimum":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Whole seconds until the window restarts and the quota is full again.","example":17,"schema":{"minimum":1,"type":"integer"}}},"exampleType":"generated"}},"security":{"7e942291-2ddb-43e4-91b6-65f3cd88bbea":{"ApiKeyAuth":{"bearerFormat":"API key","description":"Send your Cufea API key as `Authorization: Bearer \u003ckey>`.","scheme":"bearer","type":"http","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"ae8063d8-96db-456d-8a36-870da52300bb":{"description":"Cufea API","url":"https://api.cufea.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"API key","description":"Send your Cufea API key as `Authorization: Bearer \u003ckey>`.","scheme":"bearer","type":"http","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Send your Cufea API key as `Authorization: Bearer \u003ckey>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"cufea","siteName":"Cufea","title":"Create a signed invoice - Cufea","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"es":{"href":"/api-reference/invoices/create-a-signed-invoice","matchLevel":1},"en":{"href":"/en/api-reference/invoices/create-a-signed-invoice","matchLevel":0}}},"lastModified":"2026-12-02T00:21:12.253Z","originalFileLocation":"en/api-reference/invoices/create-a-signed-invoice.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Reserves the next number of the tenant\u0026#x27;s range, builds the sales invoice, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/invoices/{document_id}/send does) or when you call that route. Returns the signed XML (base64). Send an Idempotency-Key to retry safely: a retry with the same key and body returns this response again without taking a second number.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cufea\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a signed invoice - Cufea\">\u003cmeta data-mint-head property=\"og:description\" content=\"Reserves the next number of the tenant\u0026#x27;s range, builds the sales invoice, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/invoices/{document_id}/send does) or when you call that route. Returns the signed XML (base64). Send an Idempotency-Key to retry safely: a retry with the same key and body returns this response again without taking a second number.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cufea\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cufea.mintlify.site/_mintlify/api/og/v2?division=invoices\u0026amp;title=Create+a+signed+invoice\u0026amp;description=Reserves+the+next+number+of+the+tenant%27s+range%2C+builds+the+sales+invoice%2C+signs+it+and+stores+it.+Its+state+is+%60prepared%60%3B+it+is+sent+to+the+DIAN+only+when+%60sen\u0026amp;theme=749a62f2b8a3fccfdbd11508\u0026amp;signature=22bdc1ef767dbc2b97664667dd527fa927a83421d2c1a5c568d045aed2078d02\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a signed invoice - Cufea\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Reserves the next number of the tenant\u0026#x27;s range, builds the sales invoice, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/invoices/{document_id}/send does) or when you call that route. Returns the signed XML (base64). Send an Idempotency-Key to retry safely: a retry with the same key and body returns this response again without taking a second number.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cufea.mintlify.site/_mintlify/api/og/v2?division=invoices\u0026amp;title=Create+a+signed+invoice\u0026amp;description=Reserves+the+next+number+of+the+tenant%27s+range%2C+builds+the+sales+invoice%2C+signs+it+and+stores+it.+Its+state+is+%60prepared%60%3B+it+is+sent+to+the+DIAN+only+when+%60sen\u0026amp;theme=749a62f2b8a3fccfdbd11508\u0026amp;signature=22bdc1ef767dbc2b97664667dd527fa927a83421d2c1a5c568d045aed2078d02\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cufea/lyC3DbbRdAr51oOK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cufea\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#121211\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/invoices/create-a-signed-invoice.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.cufea.com/api-reference/invoices/create-a-signed-invoice\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.cufea.com/api-reference/invoices/create-a-signed-invoice\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cufea.com/#organization\",\"name\":\"Cufea\",\"url\":\"https://docs.cufea.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cufea/TQMXUpl4W5MDYEjW/logo/light.svg?fit=max\u0026auto=format\u0026n=TQMXUpl4W5MDYEjW\u0026q=85\u0026s=3fb3cb984171272f2790de13971ec643\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cufea.com#website\",\"name\":\"Cufea\",\"url\":\"https://docs.cufea.com\",\"publisher\":{\"@id\":\"https://docs.cufea.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice#webpage\",\"url\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice\",\"name\":\"Create a signed invoice\",\"description\":\"Reserves the next number of the tenant's range, builds the sales invoice, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/invoices/{document_id}/send does) or when you call that route. Returns the signed XML (base64). Send an Idempotency-Key to retry safely: a retry with the same key and body returns this response again without taking a second number.\",\"dateModified\":\"2026-12-02T00:21:12.253Z\",\"isPartOf\":{\"@id\":\"https://docs.cufea.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.cufea.com/en/api-reference/documents/find-a-document-by-your-reference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a signed invoice\",\"item\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice#apireference\",\"headline\":\"Create a signed invoice\",\"name\":\"Create a signed invoice\",\"description\":\"Reserves the next number of the tenant's range, builds the sales invoice, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/invoices/{document_id}/send does) or when you call that route. Returns the signed XML (base64). Send an Idempotency-Key to retry safely: a retry with the same key and body returns this response again without taking a second number.\",\"url\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cufea.com/en/api-reference/invoices/create-a-signed-invoice#webpage\"},\"dateModified\":\"2026-12-02T00:21:12.253Z\",\"publisher\":{\"@id\":\"https://docs.cufea.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cufea.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cufea\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cufea\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/api-reference/invoices/create-a-signed-invoice.md","siteName":"Cufea","nav":{"global":{"anchors":[{"anchor":"app.cufea.com","icon":"key-round","href":"https://app.cufea.com/signup"}]},"languages":[{"language":"es","navbar":{"links":[{"href":"https://cufea.com","label":"cufea.com"}],"primary":{"type":"button","label":"Obtener clave de sandbox","href":"https://app.cufea.com/signup"}},"pages":[{"title":"es","href":"/api-reference/invoices/create-a-signed-invoice"}]},{"language":"en","navbar":{"links":[{"href":"https://cufea.com","label":"cufea.com"}],"primary":{"type":"button","label":"Get a sandbox key","href":"https://app.cufea.com/signup"}},"tabs":[{"tab":"API docs","groups":[{"group":"Documentation","pages":[{"title":"Introduction","href":"/en"},{"title":"Quickstart","href":"/en/quickstart"},{"title":"Authentication","href":"/en/authentication"},{"title":"Errors","href":"/en/errors"},{"title":"Pagination","href":"/en/pagination"},{"title":"Idempotency","href":"/en/idempotency"},{"title":"Rate limits","href":"/en/rate-limits"},{"title":"Webhooks","href":"/en/webhooks"}]},{"group":"Guides","pages":[{"title":"Customers","href":"/en/guides/customers"},{"title":"Numbering","href":"/en/guides/numbering"},{"title":"Payments","href":"/en/guides/payments"},{"title":"Totals and rounding","href":"/en/guides/totals"},{"title":"Discounts","href":"/en/guides/discounts"},{"title":"Legends and observations","href":"/en/guides/legends"},{"title":"Credit and debit notes","href":"/en/guides/notes"},{"title":"Delivery to the buyer","href":"/en/guides/delivery"},{"title":"Closed documents","href":"/en/guides/closed-documents"}]},{"group":"From test to production","pages":[{"title":"From test to production","href":"/en/production"}]},{"group":"Partners","pages":[{"title":"Partners","href":"/en/partners"}]},{"group":"SDK and MCP","pages":[{"title":"TypeScript SDK","href":"/en/sdk"},{"title":"MCP server","href":"/en/mcp"}]},{"group":"API reference","pages":[{"title":"API reference","href":"/en/api-reference/introduction"}]},{"group":"Endpoints","pages":[{"group":"documents","pages":[{"title":"Find a document by your reference","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/documents","href":"/en/api-reference/documents/find-a-document-by-your-reference"},{"title":"List invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices","href":"/en/api-reference/documents/list-invoices"},{"title":"List credit and debit notes","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes","href":"/en/api-reference/documents/list-credit-and-debit-notes"}]},{"group":"system","pages":[{"title":"Liveness check","description":"Answers `{\"status\": \"ok\"}` while the process serves requests. Needs no API key and touches no database.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/health","href":"/en/api-reference/system/liveness-check"}]},{"group":"invoices","pages":[{"title":"Create a signed invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices","href":"/en/api-reference/invoices/create-a-signed-invoice"},{"title":"Get a stored invoice","description":"The stored record of an invoice of this tenant, without its XML.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{document_id}","href":"/en/api-reference/invoices/get-a-stored-invoice"},{"title":"Get the AttachedDocument of an accepted invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{document_id}/attached-document","href":"/en/api-reference/invoices/get-the-attacheddocument-of-an-accepted-invoice"},{"title":"Get the buyer email of an accepted invoice, to send it yourself","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{document_id}/email-content","href":"/en/api-reference/invoices/get-the-buyer-email-of-an-accepted-invoice-to-send-it-yourself"},{"title":"Get the PDF (representación gráfica) of an accepted invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{document_id}/pdf","href":"/en/api-reference/invoices/get-the-pdf-representación-gráfica-of-an-accepted-invoice"},{"title":"Ask the DIAN for the current status of an invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{document_id}/refresh","href":"/en/api-reference/invoices/ask-the-dian-for-the-current-status-of-an-invoice"},{"title":"Send an invoice to the DIAN","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{document_id}/send","href":"/en/api-reference/invoices/send-an-invoice-to-the-dian"},{"title":"Send (or resend) the buyer email of an accepted invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{document_id}/send-email","href":"/en/api-reference/invoices/send-or-resend-the-buyer-email-of-an-accepted-invoice"},{"title":"Get the signed XML of an invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{document_id}/xml","href":"/en/api-reference/invoices/get-the-signed-xml-of-an-invoice"}]},{"group":"events","pages":[{"title":"Get the RADIAN event chain of an invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{invoice_id}/events","href":"/en/api-reference/events/get-the-radian-event-chain-of-an-invoice"},{"title":"Schedule a RADIAN event on an accepted invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{invoice_id}/events","href":"/en/api-reference/events/schedule-a-radian-event-on-an-accepted-invoice"},{"title":"Ask the DIAN which events of an invoice are registered","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{invoice_id}/events/refresh","href":"/en/api-reference/events/ask-the-dian-which-events-of-an-invoice-are-registered"},{"title":"Get one saved RADIAN event","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{invoice_id}/events/{event_id}","href":"/en/api-reference/events/get-one-saved-radian-event"},{"title":"Queue the sending of a saved RADIAN event","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{invoice_id}/events/{event_id}/send","href":"/en/api-reference/events/queue-the-sending-of-a-saved-radian-event"}]},{"group":"notes","pages":[{"title":"Create a signed credit or debit note","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/notes","href":"/en/api-reference/notes/create-a-signed-credit-or-debit-note"},{"title":"Get a stored credit or debit note","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes/{kind}/{document_id}","href":"/en/api-reference/notes/get-a-stored-credit-or-debit-note"},{"title":"Get the buyer email of an accepted note, to send it yourself","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes/{kind}/{document_id}/email-content","href":"/en/api-reference/notes/get-the-buyer-email-of-an-accepted-note-to-send-it-yourself"},{"title":"Get the PDF (representación gráfica) of an accepted note","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes/{kind}/{document_id}/pdf","href":"/en/api-reference/notes/get-the-pdf-representación-gráfica-of-an-accepted-note"},{"title":"Send a credit or debit note to the DIAN","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/notes/{kind}/{document_id}/send","href":"/en/api-reference/notes/send-a-credit-or-debit-note-to-the-dian"},{"title":"Send (or resend) the buyer email of an accepted note","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/notes/{kind}/{document_id}/send-email","href":"/en/api-reference/notes/send-or-resend-the-buyer-email-of-an-accepted-note"},{"title":"Get the signed XML of a credit or debit note","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes/{kind}/{document_id}/xml","href":"/en/api-reference/notes/get-the-signed-xml-of-a-credit-or-debit-note"}]},{"group":"partner","pages":[{"title":"List the partner's tenants","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/partner/tenants","href":"/en/api-reference/partner/list-the-partners-tenants"},{"title":"Provision a client company as a tenant","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/partner/tenants","href":"/en/api-reference/partner/provision-a-client-company-as-a-tenant"},{"title":"Get one of the partner's tenants","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/partner/tenants/{tenant_id}","href":"/en/api-reference/partner/get-one-of-the-partners-tenants"},{"title":"List the tenant's API keys","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/partner/tenants/{tenant_id}/api-keys","href":"/en/api-reference/partner/list-the-tenants-api-keys"},{"title":"Issue an API key of the tenant","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/partner/tenants/{tenant_id}/api-keys","href":"/en/api-reference/partner/issue-an-api-key-of-the-tenant"},{"title":"Revoke an API key of the tenant","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/partner/tenants/{tenant_id}/api-keys/{key_id}","href":"/en/api-reference/partner/revoke-an-api-key-of-the-tenant"}]},{"group":"tenant","pages":[{"title":"Identify the authenticated tenant","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant","href":"/en/api-reference/tenant/identify-the-authenticated-tenant"},{"title":"List the tenant's API keys","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/api-keys","href":"/en/api-reference/tenant/list-the-tenants-api-keys"},{"title":"Issue an API key","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/tenant/api-keys","href":"/en/api-reference/tenant/issue-an-api-key"},{"title":"Revoke an API key","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/tenant/api-keys/{key_id}","href":"/en/api-reference/tenant/revoke-an-api-key"},{"title":"Get the stored signing certificate","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/certificate/{stage}","href":"/en/api-reference/tenant/get-the-stored-signing-certificate"},{"title":"Upload the signing certificate (.p12)","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/tenant/certificate/{stage}","href":"/en/api-reference/tenant/upload-the-signing-certificate-p12"},{"title":"Report what the tenant has configured","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/configuration","href":"/en/api-reference/tenant/report-what-the-tenant-has-configured"},{"title":"Get the issuer","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/issuer","href":"/en/api-reference/tenant/get-the-issuer"},{"title":"Set the issuer","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/tenant/issuer","href":"/en/api-reference/tenant/set-the-issuer"},{"title":"Get the default numbering range","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/numbering-range","href":"/en/api-reference/tenant/get-the-default-numbering-range"},{"title":"Add or update one numbering range","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/tenant/numbering-range","href":"/en/api-reference/tenant/add-or-update-one-numbering-range"},{"title":"List the numbering ranges","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/numbering-ranges","href":"/en/api-reference/tenant/list-the-numbering-ranges"},{"title":"Promote the tenant to the DIAN production stage","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/tenant/promote","href":"/en/api-reference/tenant/promote-the-tenant-to-the-dian-production-stage"},{"title":"Check what the promotion still needs","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/promotion","href":"/en/api-reference/tenant/check-what-the-promotion-still-needs"},{"title":"Store a secret (write-only)","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/tenant/secrets/{kind}","href":"/en/api-reference/tenant/store-a-secret-write-only"},{"title":"Report the DIAN test set status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/test-set","href":"/en/api-reference/tenant/report-the-dian-test-set-status"}]},{"group":"webhooks","pages":[{"title":"List the tenant's webhook endpoints","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/tenant/webhooks","href":"/en/api-reference/webhooks/list-the-tenants-webhook-endpoints"},{"title":"Add a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/tenant/webhooks","href":"/en/api-reference/webhooks/add-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/tenant/webhooks/{endpoint_id}","href":"/en/api-reference/webhooks/delete-a-webhook-endpoint"},{"title":"`eventregistered` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook event.registered","href":"/en/api-reference/webhooks/`eventregistered`-delivered-to-your-endpoint"},{"title":"`invoiceaccepted` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook invoice.accepted","href":"/en/api-reference/webhooks/`invoiceaccepted`-delivered-to-your-endpoint"},{"title":"`invoicedelivered` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook invoice.delivered","href":"/en/api-reference/webhooks/`invoicedelivered`-delivered-to-your-endpoint"},{"title":"`invoicedelivery failed` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook invoice.delivery_failed","href":"/en/api-reference/webhooks/`invoicedelivery_failed`-delivered-to-your-endpoint"},{"title":"`invoicerejected` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook invoice.rejected","href":"/en/api-reference/webhooks/`invoicerejected`-delivered-to-your-endpoint"},{"title":"`noteaccepted` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook note.accepted","href":"/en/api-reference/webhooks/`noteaccepted`-delivered-to-your-endpoint"},{"title":"`notedelivered` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook note.delivered","href":"/en/api-reference/webhooks/`notedelivered`-delivered-to-your-endpoint"},{"title":"`notedelivery failed` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook note.delivery_failed","href":"/en/api-reference/webhooks/`notedelivery_failed`-delivered-to-your-endpoint"},{"title":"`noterejected` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook note.rejected","href":"/en/api-reference/webhooks/`noterejected`-delivered-to-your-endpoint"}]}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/en/changelog"}]}]}]},"basePath":"","title":"Create a signed invoice - Cufea","deploymentId":"dpl_CwahHhD5zhwmkLtcenbR5oYrGaSo","buildId":"dpl_CwahHhD5zhwmkLtcenbR5oYrGaSo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CsklGkqj.js","snippetPresets-DySYPWTE.js","utils-DlqXbn2Z.js","style-to-object-BY3JEAdk.js","utils-CNZi2ki2.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CZ4nNDyI.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Czy01zwI.js","_Uint8Array-BXxbZ64b.js","isObject-FP1Yky1u.js","ApiExamples-BKVybNxa.js","usePlaygroundInputsStore-Ca-_uBJe.js","shallow-BJoAzU99.js","isEqual-BWHPCynb.js","CodeSnippets-BCcP6y7P.js","CodeSnippet-oNwNNwzI.js","use-playground-group-access-B0PemaTS.js","Page-BLuebTMZ.js","api-description-markdown-1EUAreBL.js","DynamicMarkdown-ytLtrNim.js","SectionHeading-D29rJtSs.js","MethodPill-DhX987gr.js","getPastedJson-CWb7Z3a6.js","Check2Icon-DZFNp5XM.js","axios-CsQoIw0U.js","Markdown-vknXxXYq.js","AssistantPageLink-5_lhGmuY.js","dist-fHTI-EIG.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}