Invoices
Preview an Invoice without issuing it
const url = 'https://api.timbro.do/v1/invoices/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"additionalInformation":{"referenceNumber":"example","shipment":{"containerNumber":"example","deliveryNoteNumber":"example","driver":"example","grossWeight":"example","grossWeightUnit":"example","netWeight":"example","netWeightUnit":"example","packageCount":"example","packageUnit":"example","packageVolume":"example","route":"example","shipmentDate":"example","shipmentNumber":"example","transportDocumentNumber":"example","transportZone":"example","vehicleFiche":"example","vehiclePlate":"example","volumeUnit":"example"}},"buyer":{"address":"example","deliveryPhone":"example","email":"example","legalName":"example","taxId":"example"},"currency":"DOP","exchangeRate":{"rate":"example"},"expectedTotals":{"fiscal":{"net":"example","tax":"example","total":"example"},"net":"example","nonBillable":"example","tax":"example","total":"example"},"incomeType":"01","invoiceReference":"example","items":[{"additionalDescription":"example","adjustments":{"discounts":[{"amount":"example","kind":"fixed_amount"}],"surcharges":[{"amount":"example","kind":"fixed_amount"}]},"description":"example","id":"example","itemCodes":[{"code":"example","typeCode":"example"}],"kind":"good","legalTip":true,"quantity":"example","tax":{"included":true,"kind":"itbis_18"},"unit":"barrel","unitPrice":"example"}],"numbering":{"eNcf":"example","sequenceExpiresOn":"example"},"paymentTerms":{"allocations":[{"amount":"example","method":"cash"}],"paymentAccount":{"accountNumber":"example","bankName":"example"},"type":"immediate"},"pdfLayout":"a4","referenceInformation":{"attribution":{"fiscalOperationId":"example","kind":"internal_operation"},"fiscalNumber":"example","issuedOn":"2026-04-15","modificationCode":"4"},"source":{"id":"example","version":"example"},"type":"E31"}'};
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/invoices/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "additionalInformation": { "referenceNumber": "example", "shipment": { "containerNumber": "example", "deliveryNoteNumber": "example", "driver": "example", "grossWeight": "example", "grossWeightUnit": "example", "netWeight": "example", "netWeightUnit": "example", "packageCount": "example", "packageUnit": "example", "packageVolume": "example", "route": "example", "shipmentDate": "example", "shipmentNumber": "example", "transportDocumentNumber": "example", "transportZone": "example", "vehicleFiche": "example", "vehiclePlate": "example", "volumeUnit": "example" } }, "buyer": { "address": "example", "deliveryPhone": "example", "email": "example", "legalName": "example", "taxId": "example" }, "currency": "DOP", "exchangeRate": { "rate": "example" }, "expectedTotals": { "fiscal": { "net": "example", "tax": "example", "total": "example" }, "net": "example", "nonBillable": "example", "tax": "example", "total": "example" }, "incomeType": "01", "invoiceReference": "example", "items": [ { "additionalDescription": "example", "adjustments": { "discounts": [ { "amount": "example", "kind": "fixed_amount" } ], "surcharges": [ { "amount": "example", "kind": "fixed_amount" } ] }, "description": "example", "id": "example", "itemCodes": [ { "code": "example", "typeCode": "example" } ], "kind": "good", "legalTip": true, "quantity": "example", "tax": { "included": true, "kind": "itbis_18" }, "unit": "barrel", "unitPrice": "example" } ], "numbering": { "eNcf": "example", "sequenceExpiresOn": "example" }, "paymentTerms": { "allocations": [ { "amount": "example", "method": "cash" } ], "paymentAccount": { "accountNumber": "example", "bankName": "example" }, "type": "immediate" }, "pdfLayout": "a4", "referenceInformation": { "attribution": { "fiscalOperationId": "example", "kind": "internal_operation" }, "fiscalNumber": "example", "issuedOn": "2026-04-15", "modificationCode": "4" }, "source": { "id": "example", "version": "example" }, "type": "E31" }'Authentication
Section titled “Authentication”Request bodyrequired
Section titled “Request bodyrequired”object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
object
Optional fields
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
object
The only field a source-system reference travels in, bounded at 128 characters.
One Type 47 item. Its incomeTaxWithheld is in DOP whatever the Invoice’s currency.
object
Whether a Source line describes a good or a service.
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
object
object
Optional fields
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
object
object
DGII execution environment selected before lifecycle admission.
A calendar date in the public API’s ISO 8601 date form.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
The Invoice Timbro issued that this note modifies. The note takes its buyer from that Invoice.
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
The only field a source-system reference travels in, bounded at 128 characters.
object
A document issued outside Timbro that a legal note modifies.
fiscalNumber is the original e-NCF (E, the two type digits, and ten digits) or paper NCF
(B and ten digits, or A or P and eighteen digits). issuerTaxId is DGII’s RNC Otro
Contribuyente and applies only when the original was issued under a different RNC than the
note, for example after a merger or split. buyer is the original’s buyer and may be omitted
for an anonymous consumer document. total is the original’s total and is required when the
original is an e-CF type 32, because DGII requires the buyer’s identity on a note against a
type 32 of DOP 250,000.00 or more.
object
A calendar date in the public API’s ISO 8601 date form.
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
One payment method and its amount, in DOP whatever the Invoice’s currency. The allocations
sum to the DOP total.
object
Named payment methods whose official codes are owned by fiscal-document.
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
The only field a source-system reference travels in, bounded at 128 characters.
object
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
The Invoice Timbro issued that this note modifies. The note takes its buyer from that Invoice.
object
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
The only field a source-system reference travels in, bounded at 128 characters.
object
A document issued outside Timbro that a legal note modifies.
fiscalNumber is the original e-NCF (E, the two type digits, and ten digits) or paper NCF
(B and ten digits, or A or P and eighteen digits). issuerTaxId is DGII’s RNC Otro
Contribuyente and applies only when the original was issued under a different RNC than the
note, for example after a merger or split. buyer is the original’s buyer and may be omitted
for an anonymous consumer document. total is the original’s total and is required when the
original is an e-CF type 32, because DGII requires the buyer’s identity on a note against a
type 32 of DOP 250,000.00 or more.
object
A calendar date in the public API’s ISO 8601 date form.
The only field a source-system reference travels in, bounded at 128 characters.
object
Whether a Source line describes a good or a service.
object
object
object
object
object
A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire, the official numeric catalog code in fiscal documents.
Line-level discounts and surcharges, kept separate from document-level adjustments.
object
object
object
A calendar date in the public API’s ISO 8601 date form.
object
Optional fields
object
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
DOP accounting assertions against the e-CF’s MontoTotal and its parts.
object
object
object
The only field a source-system reference travels in, bounded at 128 characters.
Responses
Section titled “Responses”Default Response
Response fields and codes
object
object
An Invoice’s totals in the currency it is priced in. total equals the price total.
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
object
One stable public document problem retained for a rejected admission.
object
object
An Invoice’s totals in the currency it is priced in. total equals the price total.
object
The exchange rate of record: DOP per one unit of the Invoice’s currency.
object
Headers
Section titled “Headers”Identifies this request. Quote it when you contact support.
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": "api_key_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.
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": "webhook_endpoint_deleted", "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": "integration_authorization_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.
Seconds to wait before repeating this request or reading the resource again.