Boleta Gravada

POST /api/documents

Headers

Key

Value

Content-Type

application/json

Authorization

Bearer {{token}}

Body

{
  "serie_documento": "B001",
  "numero_documento": "#",
  "fecha_de_emision": "2026-07-02",
  "hora_de_emision": "10:11:11",
  "codigo_tipo_operacion": "0101",
  "codigo_tipo_documento": "03",
  "codigo_tipo_moneda": "PEN",
  "fecha_de_vencimiento": "2026-07-04",
  "numero_orden_de_compra": "0045467898",
  "datos_del_cliente_o_receptor": {
    "codigo_tipo_documento_identidad": "1",
    "numero_documento": "15947552",
    "apellidos_y_nombres_o_razon_social": "Fancisco Bartolome Duran Lopez",
    "codigo_pais": "PE",
    "ubigeo": "",
    "direccion": "",
    "correo_electronico": "",
    "telefono": "999999999"
  },
  "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
    }
  ]
}

Ejemplos

Ejemplo Boleta

Response 200 OK

{
  "success": true,
  "data": {
    "number": "B001-310",
    "filename": "20100070970-03-B001-310",
    "external_id": "f2068ca2-64dd-4dc4-ac1f-97610c8b9b2b",
    "state_type_id": "05",
    "state_type_description": "Aceptado",
    "number_to_letter": "Ciento dieciocho  con 00/100 ",
    "hash": "k/Kn+xa3RRC4e1YG2WQT0nMhHro=",
    "id": 4781
  },
  "links": {
    "xml": "https://demo1.pro.facturalibre.org/downloads/document/xml/f2068ca2-64dd-4dc4-ac1f-97610c8b9b2b",
    "pdf": "https://demo1.pro.facturalibre.org/downloads/document/pdf/f2068ca2-64dd-4dc4-ac1f-97610c8b9b2b",
    "cdr": "https://demo1.pro.facturalibre.org/downloads/document/cdr/f2068ca2-64dd-4dc4-ac1f-97610c8b9b2b"
  },
  "response": {
    "code": "0",
    "description": "La Boleta numero B001-310, ha sido aceptada",
    "notes": []
  }
}

Boleta Gravada - con nro especĂ­fico

Response 200 OK

{
  "success": true,
  "data": {
    "number": "B001-346",
    "filename": "20100070970-03-B001-346",
    "external_id": "4c2924a5-1547-41e8-8457-aefbc227fe22",
    "state_type_id": "01",
    "state_type_description": "Registrado",
    "number_to_letter": "Ciento dieciocho  con 00/100 ",
    "hash": "7suOM5RAG1UVpw//8C/eGpBf6+Y=",
    "id": 4834
  },
  "links": {
    "xml": "https://demo1.pro.facturalibre.org/downloads/document/xml/4c2924a5-1547-41e8-8457-aefbc227fe22",
    "pdf": "https://demo1.pro.facturalibre.org/downloads/document/pdf/4c2924a5-1547-41e8-8457-aefbc227fe22",
    "cdr": ""
  },
  "response": []
}