Ir al contenido
Documentación

Facturación

Validar una factura sin emitirla

POST
/v1/invoices/preview
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" }'
Media typeapplication/json
object
buyer
obligatorio
object
legalName
obligatorio
string
>= 1 characters <= 150 characters /^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/
taxId
obligatorio
string
/^[0-9]{9}([0-9]{2})?$/
address
null
deliveryPhone
null
email
null
currency
obligatorio
string
Valores permitidos: DOP BRL CAD CHF CHY XDR DKK EUR GBP JPY NOK SCP SEK USD VEF HTG MXN COP
invoiceReference
obligatorio

El único campo para enviar la referencia del sistema de origen, con un máximo de 128 caracteres.

string
>= 1 characters <= 128 characters /^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/
items
obligatorio
Array<object>
>= 1 items <= 1000 items
object
description
obligatorio
string
>= 1 characters <= 80 characters /^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/
kind
obligatorio

Indica si una línea Source describe un bien o un servicio.

string
Valores permitidos: good service
quantity
obligatorio
string
/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/
tax
obligatorio
discriminator: kind
object
included
obligatorio
boolean
kind
obligatorio
string
Valores permitidos: itbis_18
unit
obligatorio

Una unidad de medida del e-CF de la DGII: un nombre legible en minúsculas en la API de Source y de Invoice, y el código numérico oficial del catálogo en los documentos fiscales.

string
Valores permitidos: barrel bag jar bundle bottle box cigarette_pack centimetre cylinder set container day dozen bale gallon degree gram bulk hour crate kilogram kilowatt_hour pound litre lot metre square_metre cubic_metre million_btu minute package pair foot piece roll envelope second tank ton tube yard square_yard unit element thousand sack tin display drum ration quintal gross_register_tonnage square_foot passenger inch boat_berth_stay tray hectare millilitre milligram ounce troy_ounce
unitPrice
obligatorio
string
/^[0-9]{1,16}(\.[0-9]{1,4})?$/
additionalDescription
null
adjustments
null
id
null
itemCodes
null
legalTip
boolean | null
paymentTerms
obligatorio
discriminator: type
object
type
obligatorio
string
Valores permitidos: immediate
allocations
null
paymentAccount
object
accountNumber
null
bankName
null
type
obligatorio
string
Valores permitidos: E31
Campos opcionales
additionalInformation
null
exchangeRate
null
expectedTotals
null
incomeType
null
numbering
null
pdfLayout
null
referenceInformation
null
source
null

Respuesta predeterminada

Media typeapplication/json
Campos y códigos de la respuesta
discriminator: status
object
status
obligatorio
string
Valores permitidos: valid
totals
obligatorio
object
foreign
obligatorio
null
net
obligatorio
string
nonBillable
obligatorio
string
tax
obligatorio
string
total
obligatorio
string
request-id
obligatorio
string

Identifica esta solicitud. Indícalo cuando contactes a soporte.