Boletas
Emite una boleta
post/sales/receipts
Request
- Base URL: https://api.datil.com (the document declares no server; this is the origin it was published from)
- URL: https://api.datil.com/sales/receipts
- Auth: none declared
Request body
Example request
{
"issue_date": "1791394186",
"series": "B001",
"sequence": "1",
"currency": "PEN",
"customer_legal_name": "Jose Mario",
"customer_tax_id": "20601595665",
"customer_tax_id_type": "pe-ruc",
"customer_email": "prueba@prueba.com",
"customer_address": {
"line_1": "Calle A",
"locality": "Lima",
"administrative_district_level_1": "Miraflores",
"administrative_district_level_2": "Lima",
"city": "Lima",
"province": "Lima",
"tax_code": "0000",
"country": "PE"
},
"customer_code": "1234",
"vendor_address": {
"line_1": "Calle A",
"locality": "Lima",
"administrative_district_level_1": "Miraflores",
"administrative_district_level_2": "Lima",
"tax_code": "0000",
"country": "PE"
},
"waybill_number": "1234",
"waybill_code": "1234",
"sales_order_number": "1234",
"purchase_order_number": "1234",
"line_items": [
{
"sku": "A001",
"item_classification_code": "1234",
"tariff_heading": "1234",
"description": "Servicio ABC",
"price_type_code": "01",
"unit_of_measurement": "KG",
"unit_code": "1",
"tax_included_unit_price": "118.00",
"unit_price": "100.00",
"quantity": "1",
"discount": "0.00",
"subtotal_without_discount": "100.00",
"subtotal": "100.00",
"tax": "18.00",
"total": "118.00",
"tax_lines": [
{
"tax_rate": "pe-igv",
"amount": "18.00",
"taxable_amount": "100.00",
"exemption_reason_code": "10"
}
],
"custom_fields": [
{
"name": "Cedula del Pasajero",
"value": "1234556",
"code": "3001"
}
]
}
],
"tax_lines": [
{
"tax_rate": "pe-igv",
"amount": "18.00",
"taxable_amount": "100.00",
"exemption_reason_code": "10"
}
],
"subtotal": "100.00",
"subtotal_discount": "0.00",
"subtotal_discount_code": "00",
"tax": "18.00",
"gratuity": "5.00",
"total": "118.00",
"note": "Gracias por tu compra.",
"custom_fields": [
{
"name": "Cedula del Pasajero",
"value": "1234556",
"code": "3001"
}
],
"notes": [
{
"text": "Documento tributario",
"code": "2008"
}
],
"advance_payments": [
{
"document_number": "E001-196",
"document_type_code": "ANTICIPO",
"document_status_code": "1",
"currency": "PEN",
"total": "118.00",
"subtotal": "100.00"
}
],
"advance_payments_discount_code": "05",
"auto_advance": true
}Response
OK
Example response
{
"id": "81wxc0qk5cgz4a7z3550a3art3",
"number": "F001-1",
"currency": {
"code": "PEN",
"name": "Soles Peruanos",
"symbol": "S/."
},
"country": {
"code": "PE",
"name": "Perú"
},
"type": "pe/sales-invoice",
"tax_clearance": {
"void_requests": [
{
"id": "81wxc0qk5cgz4a7z3550a3art3",
"type": "pe/void-request",
"series": "RA-20210315",
"sequence": 1,
"number": "RA-20210315-3",
"tax_clearance": {
"status": "cleared",
"status_description": "ACEPTADO",
"status_code": "0",
"ticket": "1234567890",
"date": "1791394186",
"message": "El documento ha sido aceptado.",
"ack_xml": "<xml></xml>",
"qr_data": "20602224886|6|F002|F002-29|1800.00|11800.00|02/10/2020|6|20877294591|",
"xml": "https://api.datil.com/documents/1234/xml",
"pdf": "https://api.datil.com/p/1234",
"warnings": [
{
"status_code": "0000",
"message": "Documento de pruebas"
}
]
}
}
],
"status": "cleared",
"status_description": "ACEPTADO",
"status_code": "0",
"ticket": "1234567890",
"date": "1791394186",
"message": "El documento ha sido aceptado.",
"ack_xml": "<xml></xml>",
"qr_data": "20602224886|6|F002|F002-29|1800.00|11800.00|02/10/2020|6|20877294591|",
"xml": "https://api.datil.com/documents/1234/xml",
"pdf": "https://api.datil.com/p/1234",
"warnings": [
{
"status_code": "0000",
"message": "Documento de pruebas"
}
]
},
"due_date": "1791394186",
"series": "B001",
"sequence": 1,
"customer_legal_name": "Jose Mario",
"customer_tax_id": "20601595665",
"customer_tax_id_type": {
"type": "pe-ruc",
"code": "6",
"name": "RUC"
},
"customer_email": "prueba@prueba.com",
"customer_address": {
"line_1": "Calle A",
"locality": "Lima",
"administrative_district_level_1": "Miraflores",
"administrative_district_level_2": "Lima",
"city": "Lima",
"province": "Lima",
"tax_code": "0000",
"country": {
"code": "PE",
"name": "Perú"
}
},
"vendor_legal_name": "Jose Mario",
"vendor_commercial_name": "Jose Mario",
"vendor_tax_id": "20601595665",
"vendor_tax_id_type": {
"type": "pe-ruc",
"code": "6",
"name": "RUC"
},
"vendor_address": {
"line_1": "Calle A",
"locality": "Lima",
"administrative_district_level_1": "Miraflores",
"administrative_district_level_2": "Lima",
"city": "Lima",
"province": "Lima",
"tax_code": "0000",
"country": {
"code": "PE",
"name": "Perú"
}
},
"line_items": [
{
"tax": 18,
"tax_included_unit_price": 118,
"unit_price": 100,
"quantity": 1,
"subtotal": 100,
"subtotal_without_discount": 100,
"tax_lines": [
{
"exemption_reason_code": "10",
"taxable_amount": 18,
"amount": 18,
"tax_rate": {
"type": "pe-igv",
"name": "IGV",
"category-code": "VAT",
"code": "1000",
"percentage": 18
}
}
],
"sku": "A001",
"item_classification_code": "1234",
"tariff_heading": "1234",
"description": "Servicio ABC",
"price_type_code": "01",
"unit_of_measurement": "KG",
"unit_code": "1",
"custom_fields": [
{
"name": "Cedula del Pasajero",
"value": "1234556",
"code": "3001"
}
]
}
],
"tax_lines": [
{
"exemption_reason_code": "10",
"taxable_amount": 18,
"amount": 18,
"tax_rate": {
"type": "pe-igv",
"name": "IGV",
"category-code": "VAT",
"code": "1000",
"percentage": 18
}
}
],
"subtotal": 100,
"subtotal_discount_code": "00",
"gratuity": 5,
"tax": 18,
"total": 118,
"total_in_words": "Ciento dieciocho soles.",
"note": "Gracias por tu compra.",
"advance_payments_total": 100,
"advance_payments_subtotal": 84.75,
"advance_payments_discount_code": "05",
"advance_payments": [
{
"document_number": "E001-196",
"document_type_code": "ANTICIPO",
"document_status_code": "1",
"currency": {
"code": "PEN",
"name": "Soles Peruanos",
"symbol": "S/."
},
"total": 118,
"subtotal": 100
}
],
"credit_notes": [
{
"total": 10,
"id": "123456",
"number": "NC001-1",
"issue_date": "1791394186",
"tax_clearance_status": "cleared"
}
],
"void_requests": [
{
"id": "81wxc0qk5cgz4a7z3550a3art3",
"issue_date": "2026-10-07T17:29:46Z",
"series": "F001",
"number": "F001-1",
"currency": {
"code": "PEN",
"name": "Soles Peruanos",
"symbol": "S/."
},
"country": {
"code": "PE",
"name": "Perú"
},
"type": "pe/sales-invoice",
"customer_legal_name": "Jose Mario",
"customer_tax_id": "20601595665",
"customer_tax_id_type": {
"type": "pe-ruc",
"code": "6",
"name": "RUC"
},
"customer_email": "prueba@prueba.com",
"customer_address": {
"line_1": "Calle A",
"locality": "Lima",
"administrative_district_level_1": "Miraflores",
"administrative_district_level_2": "Lima",
"city": "Lima",
"province": "Lima",
"tax_code": "0000",
"country": {
"code": "PE",
"name": "Perú"
}
},
"vendor_legal_name": "Jose Mario",
"vendor_commercial_name": "Jose Mario",
"vendor_tax_id": "20601595665",
"vendor_tax_id_type": {
"type": "pe-ruc",
"code": "6",
"name": "RUC"
},
"vendor_address": {
"line_1": "Calle A",
"locality": "Lima",
"administrative_district_level_1": "Miraflores",
"administrative_district_level_2": "Lima",
"city": "Lima",
"province": "Lima",
"tax_code": "0000",
"country": {
"code": "PE",
"name": "Perú"
}
},
"tax_clearance": {
"void_requests": [
{
"id": "81wxc0qk5cgz4a7z3550a3art3",
"type": "pe/void-request",
"series": "RA-20210315",
"sequence": 1,
"number": "RA-20210315-3",
"tax_clearance": {
"status": "cleared",
"status_description": "ACEPTADO",
"status_code": "0",
"ticket": "1234567890",
"date": "1791394186",
"message": "El documento ha sido aceptado.",
"ack_xml": "<xml></xml>",
"qr_data": "20602224886|6|F002|F002-29|1800.00|11800.00|02/10/2020|6|20877294591|",
"xml": "https://api.datil.com/documents/1234/xml",
"pdf": "https://api.datil.com/p/1234",
"warnings": [
{
"status_code": "0000",
"message": "Documento de pruebas"
}
]
}
}
],
"status": "cleared",
"status_description": "ACEPTADO",
"status_code": "0",
"ticket": "1234567890",
"date": "1791394186",
"message": "El documento ha sido aceptado.",
"ack_xml": "<xml></xml>",
"qr_data": "20602224886|6|F002|F002-29|1800.00|11800.00|02/10/2020|6|20877294591|",
"xml": "https://api.datil.com/documents/1234/xml",
"pdf": "https://api.datil.com/p/1234",
"warnings": [
{
"status_code": "0000",
"message": "Documento de pruebas"
}
]
},
"void_reason": "Error al emitir el documento."
}
],
"custom_fields": [
{
"name": "Cedula del Pasajero",
"value": "1234556",
"code": "3001"
}
],
"notes": [
{
"text": "Documento tributario",
"code": "2008"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.