Business
Issue the test invoice
const url = 'https://api.timbro.do/v1/business/issue-test-invoice';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"documentType":"31"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.timbro.do/v1/business/issue-test-invoice \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "documentType": "31" }'Sends a new TesteCF document when none is processing or accepted and answers 202; otherwise answers 200 with the business unchanged. The server also sends it on its own once the certificate is active.
Authentication
Section titled “Authentication”Request bodyrequired
Section titled “Request bodyrequired”Responses
Section titled “Responses”The business the credential selects, its capabilities, and the requirements that remain.
Response fields and codes
The business the credential selects, its capabilities, and the requirements that remain.
object
Invoices live.status is active only when the live signing certificate is active and at least one e-CF type in invoicing.live.documentTypes is ready. An empty or unreadable list is never active; requirements with mode: "live" name what is missing.
object
object
object
The places that contain the selected one, outermost first.
Payer-facing support, address, and delivery terms. The legal name and RNC are the business’s.
object
The selling merchant’s permanent business address.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The range Timbro assigns the next fiscal number of this type from.
object
Every condition that blocks this type: issuer, then certificate, then numbering.
The range Timbro assigns the next fiscal number of this type from.
object
object
object
object
object
object
object
object
object
object
object
object
The range Timbro assigns the next fiscal number of this type from.
object
Every condition that blocks this type: issuer, then certificate, then numbering.
The range Timbro assigns the next fiscal number of this type from.
An e-NCF sequence the business recorded from DGII’s Oficina Virtual, as recorded. DGII’s answers confirm it; documentTypes[].numbering.confirmation and sequence_rejected_by_dgii report that.
object
The first number DGII granted.
The last number DGII granted.
One thing that must happen before a capability is active, and who acts on it. While a capability is active, a requirement it would otherwise block blocks nothing and is a warning. Live invoicing lists at most one requirement per reason class (legal_issuer_profile_required, signing_certificate_required, sequence_required, sequence_confirmation_pending), each with the e-CF documentTypes it affects. When Timbro refused the live Legal issuer profile, the first entry is fiscal_details_rejected instead, with field /fiscalDetails. The merchant owns all but sequence_confirmation_pending, which waits on dgii. default_income_type_required is deprecated and no longer returned: an invoicing business without a stored income type reads 01.
object
The e-CF types this requirement keeps from being issued, in type order. Absent when it applies to the whole environment.
JSON Pointer into this representation the requirement names.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
Default Response
Response fields and codes
The business the credential selects, its capabilities, and the requirements that remain.
object
Invoices live.status is active only when the live signing certificate is active and at least one e-CF type in invoicing.live.documentTypes is ready. An empty or unreadable list is never active; requirements with mode: "live" name what is missing.
object
object
object
The places that contain the selected one, outermost first.
Payer-facing support, address, and delivery terms. The legal name and RNC are the business’s.
object
The selling merchant’s permanent business address.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The range Timbro assigns the next fiscal number of this type from.
object
Every condition that blocks this type: issuer, then certificate, then numbering.
The range Timbro assigns the next fiscal number of this type from.
object
object
object
object
object
object
object
object
object
object
object
object
The range Timbro assigns the next fiscal number of this type from.
object
Every condition that blocks this type: issuer, then certificate, then numbering.
The range Timbro assigns the next fiscal number of this type from.
An e-NCF sequence the business recorded from DGII’s Oficina Virtual, as recorded. DGII’s answers confirm it; documentTypes[].numbering.confirmation and sequence_rejected_by_dgii report that.
object
The first number DGII granted.
The last number DGII granted.
One thing that must happen before a capability is active, and who acts on it. While a capability is active, a requirement it would otherwise block blocks nothing and is a warning. Live invoicing lists at most one requirement per reason class (legal_issuer_profile_required, signing_certificate_required, sequence_required, sequence_confirmation_pending), each with the e-CF documentTypes it affects. When Timbro refused the live Legal issuer profile, the first entry is fiscal_details_rejected instead, with field /fiscalDetails. The merchant owns all but sequence_confirmation_pending, which waits on dgii. default_income_type_required is deprecated and no longer returned: an invoicing business without a stored income type reads 01.
object
The e-CF types this requirement keeps from being issued, in type order. Absent when it applies to the whole environment.
JSON Pointer into this representation the requirement names.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
Seconds to wait before repeating this request or reading the resource again.
The request could not be understood.
Example
{ "type": "about:blank", "title": "The request could not be understood.", "status": 400, "code": "parameter_missing", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
The credential is missing, malformed, or no longer valid.
Example
{ "type": "about:blank", "title": "The credential is missing, malformed, or no longer valid.", "status": 401, "code": "person_session_missing", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
The credential is valid but not permitted to perform this operation.
Example
{ "type": "about:blank", "title": "The credential is valid but not permitted to perform this operation.", "status": 403, "code": "operation_not_permitted", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
No endpoint serves this method and path, or no resource with this identifier exists within the caller’s scope.
Example
{ "type": "about:blank", "title": "No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.", "status": 404, "code": "business_not_found", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.
Example
{ "type": "about:blank", "title": "The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.", "status": 409, "code": "business_fiscal_setup_incomplete", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
The request body is larger than this endpoint accepts.
Example
{ "type": "about:blank", "title": "The request body is larger than this endpoint accepts.", "status": 413, "code": "request_body_too_large", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
The request body carries a content type this endpoint does not accept.
Example
{ "type": "about:blank", "title": "The request body carries a content type this endpoint does not accept.", "status": 415, "code": "unsupported_media_type", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
The request could not complete. Recover by the retained resource reference or retry with the same command identity.
Example
{ "type": "about:blank", "title": "The request could not complete. Recover by the retained resource reference or retry with the same command identity.", "status": 500, "code": "internal_error", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
A required service is temporarily unavailable. Retry with the same reference or command identity.
Example
{ "type": "about:blank", "title": "A required service is temporarily unavailable. Retry with the same reference or command identity.", "status": 503, "code": "business_fiscal_setup_unavailable", "requestId": "request_000000000000000000000001"}Response fields and codes
RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows code to the subset it can emit.
object
Stable machine-readable code. Branch on this, never on title.
Optional fields
Present only when the rejected request produced a Fiscal operation.
Present only when the authoritative issuance rules refused to issue.
Present only when the rejection points at a value the request carried.
One stable public document problem retained for a rejected admission.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.