{"openapi":"3.1.0","info":{"title":"BillingSoft API","version":"1.0.0","description":"Issue and follow Dominican e-CF documents on behalf of one Organization. Authenticate with `Authorization: Bearer <API key>` (create keys in the dashboard, under Integraciones). Amounts are decimal strings, never numbers. Additive changes keep `/v1`; breaking ones go to `/v2`. A key acts for its whole Organization."},"servers":[{"url":"https://api.billingsoft.net/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Documents"},{"name":"Sequences"},{"name":"Account"}],"paths":{"/invoices":{"post":{"tags":["Documents"],"summary":"Issue an invoice","description":"A credit-fiscal invoice (31) or a consumer invoice (32). A consumer invoice under DOP 250,000 reaches DGII as its summary (RFCE).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value per document you mean to create (a UUID). Repeating it with the same request returns the original response instead of issuing again; with a different request it is refused (409).","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["31","32"]},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"rnc":{"type":"string","pattern":"^(\\d{9}|\\d{11})$"},"foreignId":{"type":"string","minLength":1,"maxLength":20},"email":{"type":"string","maxLength":80,"pattern":"^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"},"address":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]},"reference":{"type":"object","properties":{"ncf":{"type":"string","minLength":1},"issuedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"modification":{"type":"string","enum":["void","correctsText","correctsAmounts","replacesContingency","consumerInvoice"]},"reason":{"type":"string","minLength":1,"maxLength":90}},"required":["ncf","issuedOn","modification"]},"incomeType":{"type":"string","enum":["01","02","03","04","05","06"]},"payment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cash"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"credit"},"dueOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["type","dueOn"]},{"type":"object","properties":{"type":{"type":"string","const":"free"}},"required":["type"]}]},"lines":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["good","service"]},"quantity":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"unitPrice":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,4})?$"},"tax":{"type":"string","enum":["itbis18","itbis16","itbis0","exempt"]},"withholding":{"type":"object","properties":{"itbis":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"isr":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"}}}},"required":["name","kind","quantity","unitPrice","tax"]}}},"required":["type","payment","lines"]},"example":{"type":"31","buyer":{"name":"Hotel Ejemplo, S.A.","rnc":"101000002","email":"cuentas@hotel.example"},"incomeType":"01","payment":{"type":"credit","dueOn":"2026-11-30"},"lines":[{"name":"Suscripción mensual BillingSoft","kind":"service","quantity":"1","unitPrice":"2500.00","tax":"itbis18"}]}}}},"responses":{"201":{"description":"The document is issued, signed and sent to DGII. `status` follows DGII (`in_process`, then a verdict); if DGII could not be reached it stays `signed`, `dgiiError` says why, and BillingSoft sends it again. A repeated Idempotency-Key answers 200 with the original body.","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"encf":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]},"trackId":{"type":"string"},"dgiiError":{"type":"string"}},"required":["documentId","encf","type","status"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/credit-notes":{"post":{"tags":["Documents"],"summary":"Issue a credit note","description":"Type 34. `reference` names the document it modifies; a credit note cannot credit more than that document, when it is one issued through BillingSoft.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value per document you mean to create (a UUID). Repeating it with the same request returns the original response instead of issuing again; with a different request it is refused (409).","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"default":"34","type":"string","enum":["34"]},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"rnc":{"type":"string","pattern":"^(\\d{9}|\\d{11})$"},"foreignId":{"type":"string","minLength":1,"maxLength":20},"email":{"type":"string","maxLength":80,"pattern":"^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"},"address":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]},"reference":{"type":"object","properties":{"ncf":{"type":"string","minLength":1},"issuedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"modification":{"type":"string","enum":["void","correctsText","correctsAmounts","replacesContingency","consumerInvoice"]},"reason":{"type":"string","minLength":1,"maxLength":90}},"required":["ncf","issuedOn","modification"]},"incomeType":{"type":"string","enum":["01","02","03","04","05","06"]},"payment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cash"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"credit"},"dueOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["type","dueOn"]},{"type":"object","properties":{"type":{"type":"string","const":"free"}},"required":["type"]}]},"lines":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["good","service"]},"quantity":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"unitPrice":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,4})?$"},"tax":{"type":"string","enum":["itbis18","itbis16","itbis0","exempt"]},"withholding":{"type":"object","properties":{"itbis":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"isr":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"}}}},"required":["name","kind","quantity","unitPrice","tax"]}}},"required":["payment","lines"]},"example":{"buyer":{"name":"Hotel Ejemplo, S.A.","rnc":"101000002"},"incomeType":"01","payment":{"type":"cash"},"lines":[{"name":"Suscripción mensual BillingSoft","kind":"service","quantity":"1","unitPrice":"1000.00","tax":"itbis18"}],"reference":{"ncf":"E310000000001","issuedOn":"2026-10-22","modification":"correctsAmounts","reason":"Descuento acordado"}}}}},"responses":{"201":{"description":"The document is issued, signed and sent to DGII. `status` follows DGII (`in_process`, then a verdict); if DGII could not be reached it stays `signed`, `dgiiError` says why, and BillingSoft sends it again. A repeated Idempotency-Key answers 200 with the original body.","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"encf":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]},"trackId":{"type":"string"},"dgiiError":{"type":"string"}},"required":["documentId","encf","type","status"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/debit-notes":{"post":{"tags":["Documents"],"summary":"Issue a debit note","description":"Type 33, with `reference` as a credit note.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value per document you mean to create (a UUID). Repeating it with the same request returns the original response instead of issuing again; with a different request it is refused (409).","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"default":"33","type":"string","enum":["33"]},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"rnc":{"type":"string","pattern":"^(\\d{9}|\\d{11})$"},"foreignId":{"type":"string","minLength":1,"maxLength":20},"email":{"type":"string","maxLength":80,"pattern":"^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"},"address":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]},"reference":{"type":"object","properties":{"ncf":{"type":"string","minLength":1},"issuedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"modification":{"type":"string","enum":["void","correctsText","correctsAmounts","replacesContingency","consumerInvoice"]},"reason":{"type":"string","minLength":1,"maxLength":90}},"required":["ncf","issuedOn","modification"]},"incomeType":{"type":"string","enum":["01","02","03","04","05","06"]},"payment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cash"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"credit"},"dueOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["type","dueOn"]},{"type":"object","properties":{"type":{"type":"string","const":"free"}},"required":["type"]}]},"lines":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["good","service"]},"quantity":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"unitPrice":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,4})?$"},"tax":{"type":"string","enum":["itbis18","itbis16","itbis0","exempt"]},"withholding":{"type":"object","properties":{"itbis":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"isr":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"}}}},"required":["name","kind","quantity","unitPrice","tax"]}}},"required":["payment","lines"]},"example":{"buyer":{"name":"Hotel Ejemplo, S.A.","rnc":"101000002"},"incomeType":"01","payment":{"type":"cash"},"lines":[{"name":"Intereses por mora","kind":"service","quantity":"1","unitPrice":"150.00","tax":"exempt"}],"reference":{"ncf":"E310000000001","issuedOn":"2026-10-22","modification":"correctsAmounts"}}}}},"responses":{"201":{"description":"The document is issued, signed and sent to DGII. `status` follows DGII (`in_process`, then a verdict); if DGII could not be reached it stays `signed`, `dgiiError` says why, and BillingSoft sends it again. A repeated Idempotency-Key answers 200 with the original body.","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"encf":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]},"trackId":{"type":"string"},"dgiiError":{"type":"string"}},"required":["documentId","encf","type","status"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/other":{"post":{"tags":["Documents"],"summary":"Issue a purchase, minor-expense, special-regime, government, export or payment-abroad document","description":"Types 41, 43, 44, 45, 46 and 47: `type` is required, and each admits the fields its rules say (buyer, withholding, taxes, income type).","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A unique value per document you mean to create (a UUID). Repeating it with the same request returns the original response instead of issuing again; with a different request it is refused (409).","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["41","43","44","45","46","47"]},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":150},"rnc":{"type":"string","pattern":"^(\\d{9}|\\d{11})$"},"foreignId":{"type":"string","minLength":1,"maxLength":20},"email":{"type":"string","maxLength":80,"pattern":"^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"},"address":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]},"reference":{"type":"object","properties":{"ncf":{"type":"string","minLength":1},"issuedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"modification":{"type":"string","enum":["void","correctsText","correctsAmounts","replacesContingency","consumerInvoice"]},"reason":{"type":"string","minLength":1,"maxLength":90}},"required":["ncf","issuedOn","modification"]},"incomeType":{"type":"string","enum":["01","02","03","04","05","06"]},"payment":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"cash"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"credit"},"dueOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["type","dueOn"]},{"type":"object","properties":{"type":{"type":"string","const":"free"}},"required":["type"]}]},"lines":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["good","service"]},"quantity":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"unitPrice":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,4})?$"},"tax":{"type":"string","enum":["itbis18","itbis16","itbis0","exempt"]},"withholding":{"type":"object","properties":{"itbis":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"},"isr":{"type":"string","pattern":"^\\d{1,16}(\\.\\d{1,2})?$"}}}},"required":["name","kind","quantity","unitPrice","tax"]}}},"required":["type","payment","lines"]},"example":{"type":"43","payment":{"type":"cash"},"lines":[{"name":"Peaje","kind":"service","quantity":"2","unitPrice":"100.00","tax":"exempt"}]}}}},"responses":{"201":{"description":"The document is issued, signed and sent to DGII. `status` follows DGII (`in_process`, then a verdict); if DGII could not be reached it stays `signed`, `dgiiError` says why, and BillingSoft sends it again. A repeated Idempotency-Key answers 200 with the original body.","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"encf":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]},"trackId":{"type":"string"},"dgiiError":{"type":"string"}},"required":["documentId","encf","type","status"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/documents/{id}":{"get":{"tags":["Documents"],"summary":"Get a document","description":"Its status, e-NCF, security code, lines, DGII submissions and answers, and the notes issued on it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"encf":{"type":"string"},"issuedOn":{"type":"string"},"buyerName":{"type":"string"},"buyerRnc":{"type":"string"},"buyerForeignId":{"type":"string"},"referencedNcf":{"type":"string"},"total":{"type":"string"},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"contingency":{"type":"boolean"},"securityCode":{"type":"string"},"fileName":{"type":"string"},"submissions":{"type":"array","items":{"type":"object","properties":{"route":{"type":"string","enum":["ecf","rfce"]},"trackId":{"type":"string"},"status":{"type":"string","enum":["in_process","accepted","conditionally_accepted","rejected","unresolved"]},"messages":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"submittedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["route","status","messages","submittedAt"],"additionalProperties":false}},"buyerApproval":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string"},"decidedAt":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["decision","decidedAt","receivedAt"],"additionalProperties":false},"incomeType":{"type":"string","enum":["01","02","03","04","05","06"]},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["good","service"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"tax":{"type":"string","enum":["itbis18","itbis16","itbis0","exempt"]},"withholding":{"type":"object","properties":{"itbis":{"type":"string"},"isr":{"type":"string"}},"additionalProperties":false}},"required":["name","kind","quantity","unitPrice","tax"],"additionalProperties":false}},"referencedDocumentId":{"type":"string"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"encf":{"type":"string"},"issuedOn":{"type":"string"},"total":{"type":"string"},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]}},"required":["id","type","encf","issuedOn","total","status"],"additionalProperties":false}},"creditable":{"type":"string"}},"required":["id","type","encf","issuedOn","total","status","createdAt","securityCode","fileName","submissions","lines","notes","creditable"],"additionalProperties":false}},"required":["document"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/documents/{id}/xml":{"get":{"tags":["Documents"],"summary":"Download the signed XML","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The e-CF as issued.","content":{"application/xml":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/documents/{id}/pdf":{"get":{"tags":["Documents"],"summary":"Download the printed representation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The PDF with its QR.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/documents/{id}/refresh-status":{"post":{"tags":["Documents"],"summary":"Ask DGII for the verdict now","description":"BillingSoft polls DGII itself and tells your webhook; use this to look sooner. 502 `DGII_ERROR` if DGII could not be asked.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"encf":{"type":"string"},"issuedOn":{"type":"string"},"buyerName":{"type":"string"},"buyerRnc":{"type":"string"},"buyerForeignId":{"type":"string"},"referencedNcf":{"type":"string"},"total":{"type":"string"},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"contingency":{"type":"boolean"},"securityCode":{"type":"string"},"fileName":{"type":"string"},"submissions":{"type":"array","items":{"type":"object","properties":{"route":{"type":"string","enum":["ecf","rfce"]},"trackId":{"type":"string"},"status":{"type":"string","enum":["in_process","accepted","conditionally_accepted","rejected","unresolved"]},"messages":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"submittedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"resolvedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["route","status","messages","submittedAt"],"additionalProperties":false}},"buyerApproval":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string"},"decidedAt":{"type":"string"},"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["decision","decidedAt","receivedAt"],"additionalProperties":false},"incomeType":{"type":"string","enum":["01","02","03","04","05","06"]},"lines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["good","service"]},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"tax":{"type":"string","enum":["itbis18","itbis16","itbis0","exempt"]},"withholding":{"type":"object","properties":{"itbis":{"type":"string"},"isr":{"type":"string"}},"additionalProperties":false}},"required":["name","kind","quantity","unitPrice","tax"],"additionalProperties":false}},"referencedDocumentId":{"type":"string"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"encf":{"type":"string"},"issuedOn":{"type":"string"},"total":{"type":"string"},"status":{"type":"string","enum":["signed","in_process","accepted","conditionally_accepted","rejected","unresolved","annulled"]}},"required":["id","type","encf","issuedOn","total","status"],"additionalProperties":false}},"creditable":{"type":"string"}},"required":["id","type","encf","issuedOn","total","status","createdAt","securityCode","fileName","submissions","lines","notes","creditable"],"additionalProperties":false}},"required":["document"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sequences/annul":{"post":{"tags":["Sequences"],"summary":"Cancel unused e-NCFs","description":"Cancels numbers never used, and documents signed but never sent. A document that was sent is voided with a credit note instead.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ranges":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]},"from":{"type":"integer","minimum":1,"maximum":9007199254740991},"to":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["documentType","from","to"]}}},"required":["ranges"]},"example":{"ranges":[{"documentType":"31","from":90,"to":100}]}}}},"responses":{"200":{"description":"DGII received it.","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"outcome":{"type":"string"},"fileName":{"type":"string"}},"required":["count","outcome","fileName"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/config/test":{"get":{"tags":["Account"],"summary":"Check the API key","description":"Which Organization the key acts for, its DGII environment and whether it can sign and number documents.","parameters":[],"responses":{"200":{"description":"The key works.","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"rnc":{"type":"string"},"razonSocial":{"type":"string"}},"required":["rnc","razonSocial"],"additionalProperties":false},"environment":{"type":"string"},"certificate":{"type":"string","enum":["valid","expiring","expired","not_yet_valid","none"]},"usableTypes":{"type":"array","items":{"type":"string","enum":["31","32","33","34","41","43","44","45","46","47"]}}},"required":["organization","environment","certificate","usableTypes"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/directory":{"get":{"tags":["Account"],"summary":"Look up an electronic issuer in DGII’s directory","parameters":[{"name":"rnc","in":"query","required":true,"description":"The issuer’s RNC (9 digits) or cédula (11).","schema":{"type":"string"}}],"responses":{"200":{"description":"The entry; 404 if not listed.","content":{"application/json":{"schema":{"type":"object","properties":{"rnc":{"type":"string"},"name":{"type":"string"},"receptionUrl":{"type":"string"},"approvalUrl":{"type":"string"},"authenticationUrl":{"type":"string"}},"required":["rnc","name"],"additionalProperties":false}}}},"400":{"description":"The request does not meet the rules; `error.fields` names each field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found (also for another Organization’s resource).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Conflict: no e-NCF range, no certificate, or an Idempotency-Key clash.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests for this key (300 per minute).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","TOTP_REQUIRED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","DGII_ERROR","INTERNAL_ERROR"]},"message":{"type":"string"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"webhooks":{"document.accepted":{"post":{"summary":"The document.accepted event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"document.accepted","createdAt":"2026-10-22T14:06:00.000Z","data":{"documentId":"…","encf":"E310000000001","status":"accepted"}}}}},"responses":{"200":{"description":"Received."}}}},"document.rejected":{"post":{"summary":"The document.rejected event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"document.rejected","createdAt":"2026-10-22T14:06:00.000Z","data":{"documentId":"…","encf":"E310000000001","status":"rejected"}}}}},"responses":{"200":{"description":"Received."}}}},"document.conditionally_accepted":{"post":{"summary":"The document.conditionally_accepted event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"document.conditionally_accepted","createdAt":"2026-10-22T14:06:00.000Z","data":{"documentId":"…","encf":"E310000000001","status":"conditionally_accepted"}}}}},"responses":{"200":{"description":"Received."}}}},"document.received":{"post":{"summary":"The document.received event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"document.received","createdAt":"2026-10-22T14:06:00.000Z","data":{"documentId":"…","encf":"E310000000001","status":"received"}}}}},"responses":{"200":{"description":"Received."}}}},"contingency.entered":{"post":{"summary":"The contingency.entered event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"contingency.entered","createdAt":"2026-10-22T14:06:00.000Z","data":{}}}}},"responses":{"200":{"description":"Received."}}}},"contingency.regularized":{"post":{"summary":"The contingency.regularized event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"contingency.regularized","createdAt":"2026-10-22T14:06:00.000Z","data":{}}}}},"responses":{"200":{"description":"Received."}}}},"sequence.low":{"post":{"summary":"The sequence.low event","description":"Sent to your webhook URL. Headers: `BillingSoft-Signature: t=<unix seconds>,v1=<hex>` where v1 is HMAC-SHA256, with your webhook secret, of `<t>.<raw body>` (reject old `t`); `BillingSoft-Event-Id` and `BillingSoft-Event-Type`. Answer 2xx to acknowledge. Failures are retried with growing delays for about 8 hours, with the same event id: deduplicate on it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["document.accepted","document.rejected","document.conditionally_accepted","document.received","contingency.entered","contingency.regularized","sequence.low"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","createdAt","data"],"additionalProperties":false},"example":{"id":"6f1c…","type":"sequence.low","createdAt":"2026-10-22T14:06:00.000Z","data":{}}}}},"responses":{"200":{"description":"Received."}}}}}}