Business
Sign a DGII certification portal document
const url = 'https://api.timbro.do/v1/business/certification/portal-documents/sign';const options = { method: 'POST', headers: { 'idempotency-key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"kind":"postulation","xmlBase64":"example","confirmation":{"statementVersion":"2026-10-13","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/portal-documents/sign \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: example' \ --data '{ "kind": "postulation", "xmlBase64": "example", "confirmation": { "statementVersion": "2026-10-13", "language": "es" } }'Signs the postulation (DGII step 1) or the Declaración Jurada (step 13) that DGII’s certification portal generated, with the business’s signing certificate in Timbro’s custody, and returns the signed file for upload in DGII’s portal. Timbro never submits it. Call it only while the business certification lists the sign_portal_document action; otherwise it answers business_certification_unavailable. Each signature needs the representative’s confirmation of the statement for that one document, recorded with the actor, time, document and signed hashes, and certificate. Only those two documents are signed: a Declaración Jurada must carry a text DGII published, compared after Unicode NFC normalization with whitespace runs collapsed, and a postulation must name the business’s RNC. Anything else is refused before the confirmation is recorded. The signed file keeps every element, attribute, and character of text of the submitted one; DGII verifies without the whitespace between tags, so it is removed. Timbro cannot check that the certificate belongs to the representative DGII has registered; DGII checks that when the file is uploaded. A retry with the same Idempotency-Key and body returns the same signed bytes with Idempotent-Replayed: true; a new confirmation needs a new key.
Authentication
Section titled “Authentication”Parameters
Section titled “Parameters”Header parameters
Section titled “Header parameters”Request bodyrequired
Section titled “Request bodyrequired”object
The XML file DGII’s certification portal generated, base64-encoded byte for byte. At most 32 KiB before encoding.
The statement the representative read and accepted for this one document. {business} is the business’s legal name. Send a new Idempotency-Key for each confirmation. 2026-10-13, postulation, es: “Firmo esta postulación como representante de {business} ante la DGII.” 2026-10-13, postulation, en: “I sign this application as the representative of {business} on record with DGII.” 2026-10-13, sworn_declaration, es: “Firmo esta declaración jurada como representante de {business} ante la DGII.” 2026-10-13, sworn_declaration, en: “I sign this sworn declaration as the representative of {business} on record with DGII.”
Responses
Section titled “Responses”A DGII certification portal document signed with the business’s custodied certificate, with the confirmation recorded for it. Timbro does not submit it to DGII.
Response fields and codes
A DGII certification portal document signed with the business’s custodied certificate, with the confirmation recorded for it. Timbro does not submit it to DGII.
object
The signed document, base64-encoded, for upload in DGII’s portal.
SHA-256 of the DER certificate that signed.
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 is well-formed but cannot be carried out.
Example
{ "type": "about:blank", "title": "The request is well-formed but cannot be carried out.", "status": 422, "code": "business_certification_portal_document_unsupported", "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.