Business
Run a certification workbook
const url = 'https://api.timbro.do/v1/business/certification/test-runs';const options = { method: 'POST', headers: { 'idempotency-key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"kind":"ecf","testSetId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","confirmation":{"statementVersion":"2026-10-21","language":"es"}}'};
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/certification/test-runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: example' \ --data '{ "kind": "ecf", "testSetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "confirmation": { "statementVersion": "2026-10-21", "language": "es" } }'Signs each case of the retained workbook (kind ecf for DGII step 2, acecf for step 3) with the business’s signing certificate in Timbro’s custody and sends it to DGII, in workbook order, stopping at the first rejection. Call it only while the business certification lists the run_test_set action; otherwise it answers business_certification_unavailable. It needs the representative’s confirmation of the statement, recorded with the actor, time, and statement hash before Timbro is asked; only a person or an admin key can confirm, not an agent. A retained workbook of that kind must exist, or it answers business_certification_test_set_required. A retry with the same Idempotency-Key and body returns the same run; a new run needs a new confirmation and key. A run is evidence for the business and the team, not a DGII decision: it never changes a step’s status. Read the outcome with retrieveBusinessCertificationTestRun.
Authentication
Section titled “Authentication”Parameters
Section titled “Parameters”Header parameters
Section titled “Header parameters”Request bodyrequired
Section titled “Request bodyrequired”object
The id of the retained workbook the representative saw. If a newer workbook of that kind has replaced it, the operation answers business_certification_test_set_changed and runs nothing.
The statement the representative read and accepted for this workbook. {business} is the business’s legal name. Send a new Idempotency-Key for each confirmation. 2026-10-21, es: “Autorizo a Timbro a firmar con el certificado digital de {business} y a enviar a la DGII los casos de prueba de este archivo.” 2026-10-21, en: “I authorize Timbro to sign with {business}’s digital certificate and send the test cases in this file to DGII.”
Responses
Section titled “Responses”One run of a retained DGII test workbook. Timbro signs each case with the business’s custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. refused means the workbook could not be built into documents and nothing was sent; refusal names the sheet, row, and column, never the cell text. consumerInvoices lists the signed consumer invoices (E32) to upload in DGII’s portal box for step 2, and is empty for acecf. A run is evidence, not a DGII decision: it never changes a step’s status.
Response fields and codes
One run of a retained DGII test workbook. Timbro signs each case with the business’s custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. refused means the workbook could not be built into documents and nothing was sent; refusal names the sheet, row, and column, never the cell text. consumerInvoices lists the signed consumer invoices (E32) to upload in DGII’s portal box for step 2, and is empty for acecf. A run is evidence, not a DGII decision: it never changes a step’s status.
object
object
An e-CF type from 31 to 47, RFCE, or ACECF.
object
The workbook row the case came from.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
true when this response replays the stored result of an earlier request with the same Idempotency-Key.
One run of a retained DGII test workbook. Timbro signs each case with the business’s custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. refused means the workbook could not be built into documents and nothing was sent; refusal names the sheet, row, and column, never the cell text. consumerInvoices lists the signed consumer invoices (E32) to upload in DGII’s portal box for step 2, and is empty for acecf. A run is evidence, not a DGII decision: it never changes a step’s status.
Response fields and codes
One run of a retained DGII test workbook. Timbro signs each case with the business’s custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. refused means the workbook could not be built into documents and nothing was sent; refusal names the sheet, row, and column, never the cell text. consumerInvoices lists the signed consumer invoices (E32) to upload in DGII’s portal box for step 2, and is empty for acecf. A run is evidence, not a DGII decision: it never changes a step’s status.
object
object
An e-CF type from 31 to 47, RFCE, or ACECF.
object
The workbook row the case came from.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
true when this response replays the stored result of an earlier request with the same Idempotency-Key.
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_certification_requirements_unmet", "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_certification_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.