Factura Gravada
POST /api/documents
Headers
Key | Value |
|---|---|
| application/json |
| Bearer |
| 20493966945 |
Body
{
"serie_documento": "F001",
"numero_documento": "#",
"fecha_de_emision": "2026-07-08",
"hora_de_emision": "10:11:11",
"codigo_tipo_operacion": "0101",
"codigo_tipo_documento": "01",
"codigo_tipo_moneda": "PEN",
"fecha_de_vencimiento": "2026-07-08",
"numero_orden_de_compra": "0045467898",
"datos_del_cliente_o_receptor": {
"codigo_tipo_documento_identidad": "6",
"numero_documento": "20602753744",
"apellidos_y_nombres_o_razon_social": "LUCYTEX LUCIA S.A.C.",
"codigo_pais": "PE",
"ubigeo": "150101",
"direccion": "Av. 2 de Mayo",
"correo_electronico": "demo@gmail.com",
"telefono": "427-1148"
},
"totales": {
"total_exportacion": 0.0,
"total_operaciones_gravadas": 100.0,
"total_operaciones_inafectas": 0.0,
"total_operaciones_exoneradas": 0.0,
"total_operaciones_gratuitas": 0.0,
"total_igv": 18.0,
"total_impuestos": 18.0,
"total_valor": 100,
"total_venta": 118
},
"items": [
{
"codigo_interno": "P0121",
"descripcion": "Inca Kola 250 ml",
"codigo_producto_sunat": "51121703",
"unidad_de_medida": "NIU",
"cantidad": 2,
"valor_unitario": 50,
"codigo_tipo_precio": "01",
"precio_unitario": 59,
"codigo_tipo_afectacion_igv": "10",
"total_base_igv": 100.0,
"porcentaje_igv": 18,
"total_igv": 18,
"total_impuestos": 18,
"total_valor_item": 100,
"total_item": 118
}
],
"informacion_adicional": "Forma de pago:Efectivo|Caja: 1"
}Ejemplos
Factura Correcto - Aceptado
Response 200 OK
{
"success": true,
"data": {
"number": "F001-1",
"filename": "20493966945-01-F001-1",
"external_id": "4b7b08ec-d878-4dc1-a7ab-24fd17168565",
"state_type_id": "05",
"state_type_description": "Aceptado",
"number_to_letter": "Ciento dieciocho con 00/100 ",
"hash": "piTVHBALfF5wHWcj+Q8LnDPQZ6Y=",
"id": 4
},
"links": {
"xml": "https://rnae.proapi.facturalibre.org/downloads/document/xml/4b7b08ec-d878-4dc1-a7ab-24fd17168565",
"pdf": "https://rnae.proapi.facturalibre.org/downloads/document/pdf/4b7b08ec-d878-4dc1-a7ab-24fd17168565",
"cdr": "https://rnae.proapi.facturalibre.org/downloads/document/cdr/4b7b08ec-d878-4dc1-a7ab-24fd17168565"
},
"response": {
"code": "0",
"description": "La Factura numero F001-1, ha sido aceptada",
"notes": []
}
}Factura Gravada - Rechazado
Response 200 OK
{
"success": true,
"data": {
"number": "F001-3",
"filename": "20493966945-01-F001-3",
"external_id": "06d78440-86e6-44fa-a20a-2d2d35ded10e",
"state_type_id": "09",
"state_type_description": "Rechazado",
"number_to_letter": "Ciento dieciocho con 00/100 ",
"hash": "vCLpsnQnTQNwnKZHxf4EwIRNIeU=",
"id": 6
},
"links": {
"xml": "https://rnae.proapi.facturalibre.org/downloads/document/xml/06d78440-86e6-44fa-a20a-2d2d35ded10e",
"pdf": "https://rnae.proapi.facturalibre.org/downloads/document/pdf/06d78440-86e6-44fa-a20a-2d2d35ded10e",
"cdr": "https://rnae.proapi.facturalibre.org/downloads/document/cdr/06d78440-86e6-44fa-a20a-2d2d35ded10e"
},
"response": {
"code": "3272",
"description": "La base imponible a nivel de línea difiere de la información consignada en el comprobante - Detalle: xxx.xxx.xxx value='ticket: 1783578251767 error: Error en la linea: 1: 3272 (nodo: \"cac:TaxSubtotal/cbc:TaxableAmount\" valor: \"100.00\")'"
}
}Ejemplo de error
Response 500 Internal Server Error
{
"success": false,
"message": "La fecha de emisión no puede ser menor a 2 día(s)."
}