{
"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 note’s own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/notes/{kind}/{document_id}/send does) or when you call that route. Returns the signed XML (base64) and the note’s CUDE.
Notes have no authorized range: prefix (0-4 alphanumerics) and the number are the caller’s series. The stored note is read back at /v1/notes/credit/{document_id} (credit-note series, DIAN 91) or /v1/notes/debit/{document_id} (debit-note series, DIAN 92). 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>.
Encabezados
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
Cuerpo
application/json
A credit (91) or debit (92) note on an invoice the DIAN accepted.
DiscrepancyResponse/ResponseCode of a credit note. Toolbox ConceptoNotaCredito-2.1.gc.
Opciones disponibles:
1,
2,
3,
4,
5
concept_description
string
requerido
DiscrepancyResponse/Description of the correction.
customer
CustomerIn · object
requerido
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
invoice_id
string
requerido
Prefix and number of the referenced invoice, e.g. SETP990000000.
Required string length: 1 - 20
kind
enum<string>
requerido
91 credit note, 92 debit note.
Opciones disponibles:
91,
92
lines
LineIn · object[]
requerido
Required array length: 1 - 500 elements
Show child attributes
payment
PaymentIn · object
requerido
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, 5-5000 characters each, at most 20. They appear on the PDF and in the JSON record. Default: none.
Maximum array length: 20
Required string length: 5 - 5000
Ejemplo:
[ "Cambios y devoluciones dentro de los 30 días.", "Gracias por su compra" ]
observation
string | null
Factus's name for a single note, 5-5000 characters: the same as notes with one item. Send notes or observation, not both.
Required string length: 5 - 5000
Ejemplo:
"Gracias por su compra"
prefix
string | null
Note prefix, 0-4 alphanumerics. Notes have no authorized range. Default: NC for a credit note and ND for a debit note, so the two series never share a document id (and therefore never the same CUDE). Send "" for unprefixed numbers.
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}$
Ejemplo:
"ORDER-2026-000123"
reference_id
string | null
Optional DiscrepancyResponse/ReferenceID of the corrected invoice section.
send
boolean
predeterminado:false
Also queue the note for sending to the DIAN right after it is stored. If queueing fails the note is still created and the response says send: not_queued.
send_email
boolean
predeterminado: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.
Respuesta
Successful Response
cude
string
requerido
CUDE: 96 hexadecimal characters (SHA-384).
customer
CustomerOut · object
requerido
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
requerido
The email of the note to its buyer.
Show child attributes
document_id
string
requerido
Prefix and number, e.g. NC1.
issue_datetime
string<date-time>
requerido
kind
enum<string>
requerido
credit_note (DIAN 91) or debit_note (DIAN 92).
Opciones disponibles:
credit_note,
debit_note
lines
LineSummaryOut · object[]
requerido
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
requerido
prefix
string
requerido
qr
QrOut · object
requerido
Show child attributes
state
string
requerido
prepared until the document is sent; then the latest DIAN outcome (accepted, rejected, closed...).
taxes
TaxAmountOut · object[]
requerido
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
requerido
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[]
requerido
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
requerido
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.
notes
string[]
The note's cbc:Note legends as signed, in order (notes, or the observation, given on create); empty when none.
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/notes/{kind}/{document_id}/send).
Opciones disponibles:
queued,
pending,
sent,
not_queued
sent_at
string<date-time> | null
When the DIAN last received the note; 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":[],"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":"default","tag":"Getting Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"api-reference/notes/create-a-signed-credit-or-debit-note","slug":"/api-reference/notes/create-a-signed-credit-or-debit-note","pageMetadata":{"title":"Create a signed credit or debit note","description":"Reserves the next number of the note's own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is `prepared`; it is sent to the DIAN only when `send` is true (queued, as `POST /v1/notes/{kind}/{document_id}/send` does) or when you call that route. Returns the signed XML (base64) and the note's CUDE.\n\nNotes have no authorized range: `prefix` (0-4 alphanumerics) and the number are the caller's series. The stored note is read back at `/v1/notes/credit/{document_id}` (credit-note series, DIAN 91) or `/v1/notes/debit/{document_id}` (debit-note series, DIAN 92). Send 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/notes","href":"/api-reference/notes/create-a-signed-credit-or-debit-note","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 note’s own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, 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/notes/{kind}/{document_id}/send\"\n }), \" does) or when you call that route. Returns the signed XML (base64) and the note’s CUDE.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Notes have no authorized range: \", _jsx(_components.code, {\n children: \"prefix\"\n }), \" (0-4 alphanumerics) and the number are the caller’s series. The stored note is read back at \", _jsx(_components.code, {\n children: \"/v1/notes/credit/{document_id}\"\n }), \" (credit-note series, DIAN 91) or \", _jsx(_components.code, {\n children: \"/v1/notes/debit/{document_id}\"\n }), \" (debit-note series, DIAN 92). 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 credit or debit note","description":"Reserves the next number of the note's own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is `prepared`; it is sent to the DIAN only when `send` is true (queued, as `POST /v1/notes/{kind}/{document_id}/send` does) or when you call that route. Returns the signed XML (base64) and the note's CUDE.\n\nNotes have no authorized range: `prefix` (0-4 alphanumerics) and the number are the caller's series. The stored note is read back at `/v1/notes/credit/{document_id}` (credit-note series, DIAN 91) or `/v1/notes/debit/{document_id}` (debit-note series, DIAN 92). Send 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/notes","href":"/api-reference/notes/create-a-signed-credit-or-debit-note","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Reserves the next number of the note's own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is `prepared`; it is sent to the DIAN only when `send` is true (queued, as `POST /v1/notes/{kind}/{document_id}/send` does) or when you call that route. Returns the signed XML (base64) and the note's CUDE.\n\nNotes have no authorized range: `prefix` (0-4 alphanumerics) and the number are the caller's series. The stored note is read back at `/v1/notes/credit/{document_id}` (credit-note series, DIAN 91) or `/v1/notes/debit/{document_id}` (debit-note series, DIAN 92). Send 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_note_v1_notes_post","parameters":["7f731fb5-85a6-47c3-8f7c-8da66be505c6"],"requestBody":"6f9bce60-0684-49df-98f9-fc387fcec0a4","responses":{"201":"c180daa3-3049-444e-b4a1-4ac249d27e5b","401":"20fd2f97-019d-402b-b735-a47b1fa75590","403":"64adf4f0-81d9-4e7e-b7bd-851f9a9e3a25","404":"b4eb6c1f-48ab-4389-b736-4786a2c4adf7","409":"8f5f3601-f471-4042-a79c-8bc2f2dbb655","422":"405787e2-4e75-48da-817a-27de1de8e9e3","429":"27fda426-3376-4143-b129-e202a16627a8","500":"55d2628d-f228-4ba7-8bba-933050d43d3d","503":"45f56591-1672-486f-9ac1-eb1cccc460a7"},"security":["fb50a7e1-41c2-4705-ba15-051ef7ba1f82"],"summary":"Create a signed credit or debit note","tags":["notes"],"method":"post","type":"path","servers":["ae8063d8-96db-456d-8a36-870da52300bb"],"path":"/v1/notes","baseUrlOptions":["https://api.cufea.com"],"title":"Create a signed credit or debit note","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"7f731fb5-85a6-47c3-8f7c-8da66be505c6":{"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":{"schema":{"additionalProperties":false,"description":"A credit (91) or debit (92) note on an invoice the DIAN accepted.","properties":{"concept":{"oneOf":[{"type":"string","title":"CreditNoteConcept","description":"DiscrepancyResponse/ResponseCode of a credit note. Toolbox ConceptoNotaCredito-2.1.gc.","enum":["1","2","3","4","5"],"isRequired":true,"uniqueKey":"concept.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","title":"DebitNoteConcept","description":"DiscrepancyResponse/ResponseCode of a debit note. Toolbox ConceptoNotaDebito-2.1.gc.","enum":["1","2","3","4"],"isRequired":true,"uniqueKey":"concept.oneOf.1","typeLabel":"enum\u003cstring>"}],"isRequired":true,"uniqueKey":"concept","typeLabel":"enum\u003cstring>"},"concept_description":{"description":"DiscrepancyResponse/Description of the correction.","title":"Concept Description","type":"string","isRequired":true,"uniqueKey":"concept_description","typeLabel":"string"},"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"},"invoice_id":{"description":"Prefix and number of the referenced invoice, e.g. `SETP990000000`.","maxLength":20,"minLength":1,"title":"Invoice Id","type":"string","isRequired":true,"uniqueKey":"invoice_id","typeLabel":"string"},"kind":{"description":"`91` credit note, `92` debit note.","enum":["91","92"],"title":"NoteKind","type":"string","isRequired":true,"uniqueKey":"kind","typeLabel":"enum\u003cstring>"},"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[]"},"payment":{"additionalProperties":false,"properties":{"form":{"description":"`1` cash, `2` credit.","enum":["1","2"],"title":"PaymentForm","type":"string","isRequired":true,"uniqueKey":"payment.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.method_code","typeLabel":"enum\u003cstring>"},"due_date":{"oneOf":[{"type":"string","title":"Due Date","description":"Required when `form` is `2`.","format":"date","uniqueKey":"payment.due_date.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","title":"Due Date","description":"Required when `form` is `2`.","uniqueKey":"payment.due_date.oneOf.1","typeLabel":"null"}],"uniqueKey":"payment.due_date","typeLabel":"string\u003cdate> | null"}},"required":["form","method_code"],"title":"PaymentIn","type":"object","isRequired":true,"uniqueKey":"payment","typeLabel":"PaymentIn · 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, 5-5000 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":5000,"minLength":5,"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, 5-5000 characters: the same as `notes` with one item. Send `notes` or `observation`, not both.","maxLength":5000,"minLength":5,"example":"Gracias por su compra","uniqueKey":"observation.oneOf.0","typeLabel":"string"},{"type":"null","title":"Observation","description":"Factus's name for a single note, 5-5000 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"},"prefix":{"oneOf":[{"type":"string","title":"Prefix","description":"Note prefix, 0-4 alphanumerics. Notes have no authorized range. Default: `NC` for a credit note and `ND` for a debit note, so the two series never share a document id (and therefore never the same CUDE). Send `\"\"` for unprefixed numbers.","maxLength":4,"pattern":"^[A-Za-z0-9]*$","uniqueKey":"prefix.oneOf.0","typeLabel":"string"},{"type":"null","title":"Prefix","description":"Note prefix, 0-4 alphanumerics. Notes have no authorized range. Default: `NC` for a credit note and `ND` for a debit note, so the two series never share a document id (and therefore never the same CUDE). Send `\"\"` for unprefixed numbers.","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"},"reference_id":{"oneOf":[{"type":"string","title":"Reference Id","description":"Optional DiscrepancyResponse/ReferenceID of the corrected invoice section.","uniqueKey":"reference_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reference Id","description":"Optional DiscrepancyResponse/ReferenceID of the corrected invoice section.","uniqueKey":"reference_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"reference_id","typeLabel":"string | null"},"send":{"default":false,"description":"Also queue the note for sending to the DIAN right after it is stored. If queueing fails the note 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"}},"required":["kind","invoice_id","concept","concept_description","customer","lines","payment"],"title":"NoteCreate","type":"object","uniqueKey":"","typeLabel":"NoteCreate · object"},"examples":{"Example":{"title":"Example","value":{"concept_description":"\u003cstring>","customer":{"id_number":"\u003cstring>","registration_name":"\u003cstring>","address":{"city_code":"11001","city_name":"Bogotá, D.C.","department_code":"11","department_name":"Bogotá","line":"Cra 7 # 1-10","country_code":"CO","country_name":"Colombia","postal_code":"\u003cstring>"},"check_digit":"\u003cstring>","email":"\u003cstring>","fiscal_responsibilities":["R-99-PN"],"kind":"identified","tax_scheme":"ZZ","trade_name":"\u003cstring>"},"invoice_id":"\u003cstring>","lines":[{"description":"\u003cstring>","quantity":"1250.50","unit_price":"1250.50","discount_amount":"5000.00","discount_rate":"10.00","item_code":"\u003cstring>","taxes":[{"is_excluded":false,"percent":"1250.50"}],"unit_code":"94"}],"payment":{"due_date":"2023-12-25"},"issue_datetime":"2023-11-07T05:31:56Z","notes":["Cambios y devoluciones dentro de los 30 días.","Gracias por su compra"],"observation":"Gracias por su compra","prefix":"\u003cstring>","reference":"ORDER-2026-000123","reference_id":"\u003cstring>","send":false,"send_email":true}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"c180daa3-3049-444e-b4a1-4ac249d27e5b":{"content":{"application/json":{"schema":{"properties":{"cude":{"description":"CUDE: 96 hexadecimal characters (SHA-384).","title":"Cude","type":"string","isRequired":true,"uniqueKey":"cude","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 note 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. `NC1`.","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>"},"kind":{"description":"`credit_note` (DIAN 91) or `debit_note` (DIAN 92).","enum":["credit_note","debit_note"],"title":"Kind","type":"string","isRequired":true,"uniqueKey":"kind","typeLabel":"enum\u003cstring>"},"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`, `closed`...).","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"},"notes":{"description":"The note'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[]"},"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/notes/{kind}/{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/notes/{kind}/{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 note; 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 note; none if never.","uniqueKey":"sent_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"sent_at","typeLabel":"string\u003cdate-time> | null"}},"required":["kind","document_id","number","prefix","cude","issue_datetime","customer","state","totals","taxes","withholdings","lines","qr","delivery","xml_base64"],"title":"NoteCreated","type":"object","uniqueKey":"","typeLabel":"NoteCreated · object"},"examples":{"Example":{"title":"Example","value":{"cude":"\u003cstring>","customer":{"id_number":"\u003cstring>","id_type":"\u003cstring>","name":"\u003cstring>"},"delivery":{"status":"pending","attempts":0,"manual":false,"reason":"\u003cstring>","recipient":"\u003cstring>","updated_at":"2023-11-07T05:31:56Z"},"document_id":"\u003cstring>","issue_datetime":"2023-11-07T05:31:56Z","kind":"credit_note","lines":[{"description":"\u003cstring>","discount_amount":"\u003cstring>","discount_rate":"\u003cstring>","gross_amount":"\u003cstring>","is_excluded":true,"item_code":"\u003cstring>","line_id":123,"net_amount":"\u003cstring>","quantity":"\u003cstring>","taxes":[{"name":"\u003cstring>","percent":"\u003cstring>","scheme":"01","tax_amount":"\u003cstring>","taxable_amount":"\u003cstring>","is_excluded":false}],"unit_code":"\u003cstring>","unit_price":"\u003cstring>"}],"number":123,"prefix":"\u003cstring>","qr":{"content":"\u003cstring>","url":"\u003cstring>"},"state":"\u003cstring>","taxes":[{"name":"\u003cstring>","percent":"\u003cstring>","scheme":"01","tax_amount":"\u003cstring>","taxable_amount":"\u003cstring>","is_excluded":false}],"totals":{"allowance_total":"\u003cstring>","charge_total":"\u003cstring>","line_extension":"\u003cstring>","payable":"\u003cstring>","rounding":"\u003cstring>","tax_exclusive":"\u003cstring>","tax_inclusive":"\u003cstring>"},"withholdings":[{"name":"\u003cstring>","percent":"\u003cstring>","scheme":"01","tax_amount":"\u003cstring>","taxable_amount":"\u003cstring>","is_excluded":false}],"xml_base64":"\u003cstring>","dian_errors":[{"rule":"\u003cstring>","severity":"\u003cstring>","text":"\u003cstring>"}],"dian_status_code":"\u003cstring>","dian_status_description":"\u003cstring>","notes":["\u003cstring>"],"reference":"\u003cstring>","send":"queued","sent_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"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":"generated"},"20fd2f97-019d-402b-b735-a47b1fa75590":{"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"},"64adf4f0-81d9-4e7e-b7bd-851f9a9e3a25":{"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"},"b4eb6c1f-48ab-4389-b736-4786a2c4adf7":{"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 referenced invoice is not stored for this tenant (`document_not_found`).","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"},"8f5f3601-f471-4042-a79c-8bc2f2dbb655":{"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`), the referenced invoice is not accepted (`invoice_not_accepted`) or an accepted 033/034 event closed it to notes (`invoice_closed_for_notes`), its stored XML is unreadable (`invoice_unreadable`), another note of this kind and stage already carries the `reference` (`reference_conflict`, also for the same body sent again without its `Idempotency-Key`: find the note with `GET /v1/documents?reference=...\u0026kind=...`), 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"},"405787e2-4e75-48da-817a-27de1de8e9e3":{"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 a note rule (`note_invalid`) 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"},"27fda426-3376-4143-b129-e202a16627a8":{"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"},"55d2628d-f228-4ba7-8bba-933050d43d3d":{"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"},"45f56591-1672-486f-9ac1-eb1cccc460a7":{"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 note 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":{"fb50a7e1-41c2-4705-ba15-051ef7ba1f82":{"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 credit or debit note - Cufea","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"es":{"href":"/api-reference/notes/create-a-signed-credit-or-debit-note","matchLevel":0},"en":{"href":"/en/api-reference/notes/create-a-signed-credit-or-debit-note","matchLevel":1}}},"lastModified":"2026-12-02T00:21:11.583Z","originalFileLocation":"api-reference/notes/create-a-signed-credit-or-debit-note.mdx","locale":"es"},"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 note\u0026#x27;s own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/notes/{kind}/{document_id}/send does) or when you call that route. Returns the signed XML (base64) and the note\u0026#x27;s CUDE. Notes have no authorized range: prefix (0-4 alphanumerics) and the number are the caller\u0026#x27;s series. The stored note is read back at /v1/notes/credit/{document_id} (credit-note series, DIAN 91) or /v1/notes/debit/{document_id} (debit-note series, DIAN 92). 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 credit or debit note - Cufea\">\u003cmeta data-mint-head property=\"og:description\" content=\"Reserves the next number of the note\u0026#x27;s own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/notes/{kind}/{document_id}/send does) or when you call that route. Returns the signed XML (base64) and the note\u0026#x27;s CUDE. Notes have no authorized range: prefix (0-4 alphanumerics) and the number are the caller\u0026#x27;s series. The stored note is read back at /v1/notes/credit/{document_id} (credit-note series, DIAN 91) or /v1/notes/debit/{document_id} (debit-note series, DIAN 92). 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/api-reference/notes/create-a-signed-credit-or-debit-note\">\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=notes\u0026amp;title=Create+a+signed+credit+or+debit+note\u0026amp;description=Reserves+the+next+number+of+the+note%27s+own+series%2C+builds+the+credit+%2891%29+or+debit+%2892%29+note+on+an+invoice+the+DIAN+accepted%2C+signs+it+and+stores+it.+Its+state+\u0026amp;theme=749a62f2b8a3fccfdbd11508\u0026amp;signature=1e8f3e4230ecf9e80cb8e34c2cb8f0dad199dac63ef2c070070cb72039dc6419\">\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 credit or debit note - Cufea\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Reserves the next number of the note\u0026#x27;s own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/notes/{kind}/{document_id}/send does) or when you call that route. Returns the signed XML (base64) and the note\u0026#x27;s CUDE. Notes have no authorized range: prefix (0-4 alphanumerics) and the number are the caller\u0026#x27;s series. The stored note is read back at /v1/notes/credit/{document_id} (credit-note series, DIAN 91) or /v1/notes/debit/{document_id} (debit-note series, DIAN 92). 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=notes\u0026amp;title=Create+a+signed+credit+or+debit+note\u0026amp;description=Reserves+the+next+number+of+the+note%27s+own+series%2C+builds+the+credit+%2891%29+or+debit+%2892%29+note+on+an+invoice+the+DIAN+accepted%2C+signs+it+and+stores+it.+Its+state+\u0026amp;theme=749a62f2b8a3fccfdbd11508\u0026amp;signature=1e8f3e4230ecf9e80cb8e34c2cb8f0dad199dac63ef2c070070cb72039dc6419\">\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/api-reference/notes/create-a-signed-credit-or-debit-note\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/notes/create-a-signed-credit-or-debit-note.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.cufea.com/en/api-reference/notes/create-a-signed-credit-or-debit-note\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note\">\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/api-reference/notes/create-a-signed-credit-or-debit-note#webpage\",\"url\":\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note\",\"name\":\"Create a signed credit or debit note\",\"description\":\"Reserves the next number of the note's own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/notes/{kind}/{document_id}/send does) or when you call that route. Returns the signed XML (base64) and the note's CUDE. Notes have no authorized range: prefix (0-4 alphanumerics) and the number are the caller's series. The stored note is read back at /v1/notes/credit/{document_id} (credit-note series, DIAN 91) or /v1/notes/debit/{document_id} (debit-note series, DIAN 92). 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:11.583Z\",\"isPartOf\":{\"@id\":\"https://docs.cufea.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.cufea.com/api-reference/documents/find-a-document-by-your-reference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a signed credit or debit note\",\"item\":\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note#apireference\",\"headline\":\"Create a signed credit or debit note\",\"name\":\"Create a signed credit or debit note\",\"description\":\"Reserves the next number of the note's own series, builds the credit (91) or debit (92) note on an invoice the DIAN accepted, signs it and stores it. Its state is prepared; it is sent to the DIAN only when send is true (queued, as POST /v1/notes/{kind}/{document_id}/send does) or when you call that route. Returns the signed XML (base64) and the note's CUDE. Notes have no authorized range: prefix (0-4 alphanumerics) and the number are the caller's series. The stored note is read back at /v1/notes/credit/{document_id} (credit-note series, DIAN 91) or /v1/notes/debit/{document_id} (debit-note series, DIAN 92). 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/api-reference/notes/create-a-signed-credit-or-debit-note\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cufea.com/api-reference/notes/create-a-signed-credit-or-debit-note#webpage\"},\"dateModified\":\"2026-12-02T00:21:11.583Z\",\"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":"/api-reference/notes/create-a-signed-credit-or-debit-note.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"}},"tabs":[{"tab":"Docs API","groups":[{"group":"Documentación","pages":[{"title":"Introducción","href":""},{"title":"Inicio rápido","href":"/quickstart"},{"title":"Autenticación","href":"/authentication"},{"title":"Errores","href":"/errors"},{"title":"Paginación","href":"/pagination"},{"title":"Idempotencia","href":"/idempotency"},{"title":"Rate limits","href":"/rate-limits"},{"title":"Webhooks","href":"/webhooks"}]},{"group":"Guías","pages":[{"title":"Clientes y adquirientes","href":"/guides/customers"},{"title":"Numeración","href":"/guides/numbering"},{"title":"Medios de pago","href":"/guides/payments"},{"title":"Totales y redondeo","href":"/guides/totals"},{"title":"Descuentos","href":"/guides/discounts"},{"title":"Leyendas y observaciones","href":"/guides/legends"},{"title":"Notas crédito y débito","href":"/guides/notes"},{"title":"Entrega al comprador","href":"/guides/delivery"},{"title":"Documentos closed","href":"/guides/closed-documents"}]},{"group":"De prueba a producción","pages":[{"title":"De prueba a producción","href":"/production"}]},{"group":"Partners","pages":[{"title":"Partners","href":"/partners"}]},{"group":"SDK y MCP","pages":[{"title":"SDK de TypeScript","href":"/sdk"},{"title":"Servidor MCP","href":"/mcp"}]},{"group":"Referencia API","pages":[{"title":"Referencia de API","href":"/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":"/api-reference/documents/find-a-document-by-your-reference"},{"title":"List invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices","href":"/api-reference/documents/list-invoices"},{"title":"List credit and debit notes","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes","href":"/api-reference/documents/list-credit-and-debit-notes"}]},{"group":"system","pages":[{"title":"Liveness check","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/health","href":"/api-reference/system/liveness-check"}]},{"group":"invoices","pages":[{"title":"Create a signed invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices","href":"/api-reference/invoices/create-a-signed-invoice"},{"title":"Get a stored invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/{document_id}","href":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/api-reference/events/get-one-saved-radian-event"},{"title":"Queue the sending of a saved RADIAN event","description":"Queues the sending of an event that was saved but not queued (a queue failure or a crash) at its projected `not_before`, and answers `202`. Safe to repeat: at most one send is queued per event. An event with a recorded answer is not sent again and answers `send: sent`.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/invoices/{invoice_id}/events/{event_id}/send","href":"/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":"/api-reference/notes/create-a-signed-credit-or-debit-note"},{"title":"Get a stored credit or debit note","description":"The stored record of a note of this tenant, without its XML. `{kind}` is `credit` for the credit-note series (`credit_note`, DIAN 91) or `debit` for the debit-note series (`debit_note`, DIAN 92); each series has its own counter.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/notes/{kind}/{document_id}","href":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/api-reference/tenant/get-the-issuer"},{"title":"Set the issuer","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/tenant/issuer","href":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/api-reference/webhooks/delete-a-webhook-endpoint"},{"title":"`eventregistered` delivered to your endpoint","version":null,"deprecated":null,"openapi":"/openapi.json webhook event.registered","href":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/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":"/api-reference/webhooks/`noterejected`-delivered-to-your-endpoint"}]}]}]},{"tab":"Novedades","pages":[{"title":"Novedades","href":"/changelog"}]}]},{"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"}},"pages":[{"title":"en","href":"/en/api-reference/notes/create-a-signed-credit-or-debit-note"}]}]},"basePath":"","title":"Create a signed credit or debit note - 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"]}