Skip to main content
GET
/
api
/
v1
/
invoices
/
{id}
Get Invoice
curl --request GET \
  --url https://api.example.com/api/v1/invoices/{id}
{
  "id": 123,
  "company_id": 123,
  "branch_id": 123,
  "client_id": 123,
  "tipo_documento": "<string>",
  "serie": "<string>",
  "correlativo": "<string>",
  "numero_completo": "<string>",
  "fecha_emision": "<string>",
  "fecha_vencimiento": "<string>",
  "moneda": "<string>",
  "tipo_operacion": "<string>",
  "mto_oper_gravadas": 123,
  "mto_igv": 123,
  "mto_imp_venta": 123,
  "estado_sunat": "<string>",
  "detalles": [
    {}
  ],
  "client": {
    "id": 123,
    "tipo_documento": "<string>",
    "numero_documento": "<string>",
    "nombre_comercial": "<string>",
    "direccion": "<string>"
  },
  "company": {},
  "branch": {}
}
Retrieve detailed information for a specific invoice including all line items, tax calculations, and SUNAT status.

Authentication

Requires a valid Bearer token with invoice viewing permissions.
Authorization: Bearer YOUR_TOKEN_HERE

Path Parameters

id
integer
required
The unique identifier of the invoice to retrieve

Response

id
integer
Invoice unique identifier
company_id
integer
Company that issued the invoice
branch_id
integer
Branch that issued the invoice
client_id
integer
Client receiving the invoice
tipo_documento
string
Document type code (“01” for factura)
serie
string
Document series (e.g., “F001”)
correlativo
string
Sequential number
numero_completo
string
Full document number (serie-correlativo)
fecha_emision
date
Issue date (YYYY-MM-DD)
fecha_vencimiento
date
Due date for payment
moneda
string
Currency code (PEN, USD)
tipo_operacion
string
Operation type code (0101=Venta interna, 0200=Exportación, etc.)
mto_oper_gravadas
number
Taxable operations amount
mto_igv
number
IGV (tax) amount
mto_imp_venta
number
Total sale amount including taxes
estado_sunat
string
SUNAT status: pendiente, aceptado, rechazado
detalles
array
Array of invoice line items with quantities, prices, and taxes
client
object
Complete client information
company
object
Complete company information
branch
object
Complete branch information

Code Examples

curl -X GET https://your-domain.com/api/v1/invoices/123 \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Accept: application/json"

Response Example

{
  "id": 123,
  "company_id": 1,
  "branch_id": 1,
  "client_id": 45,
  "tipo_documento": "01",
  "serie": "F001",
  "correlativo": "00000123",
  "numero_completo": "F001-00000123",
  "fecha_emision": "2025-03-05",
  "fecha_vencimiento": "2025-03-20",
  "moneda": "PEN",
  "tipo_operacion": "0101",
  "mto_oper_gravadas": 1000.00,
  "mto_igv": 180.00,
  "mto_imp_venta": 1180.00,
  "estado_sunat": "aceptado",
  "sunat_respuesta": "La Factura numero F001-00000123, ha sido aceptada",
  "sunat_codigo_respuesta": "0",
  "detalles": [
    {
      "codigo": "PROD001",
      "descripcion": "Producto de ejemplo",
      "cantidad": 10,
      "unidad": "NIU",
      "mto_valor_unitario": 100.00,
      "mto_valor_venta": 1000.00,
      "mto_base_igv": 1000.00,
      "porcentaje_igv": 18,
      "mto_igv": 180.00,
      "tipo_afectacion_igv": "10",
      "total_impuestos": 180.00,
      "mto_precio_unitario": 118.00
    }
  ],
  "client": {
    "id": 45,
    "tipo_documento": "6",
    "numero_documento": "20123456789",
    "nombre_comercial": "Cliente Ejemplo SAC",
    "direccion": "Av. Principal 123, Lima"
  },
  "company": {
    "id": 1,
    "ruc": "20987654321",
    "nombre_comercial": "Mi Empresa SAC"
  },
  "xml_path": "storage/sunat/20987654321/F001-00000123.xml",
  "cdr_path": "storage/sunat/20987654321/R-F001-00000123.zip",
  "pdf_path": "storage/pdf/F001-00000123.pdf",
  "created_at": "2025-03-05T10:30:00.000000Z",
  "updated_at": "2025-03-05T10:35:00.000000Z"
}

Error Responses

404 Not Found

{
  "message": "Invoice not found"
}

403 Forbidden

{
  "message": "You do not have permission to view this invoice"
}

Build docs developers (and LLMs) love