Skip to main content
GET
/
venta
curl https://api.example.com/venta
[
  {
    "id": 1,
    "serie": "ABC",
    "numero": "000001",
    "descripcion": "Venta de productos",
    "clienteId": 123,
    "cliente": {
      "id": 123,
      "dni": "12345678",
      "nombre": "Juan",
      "apellido": "Pérez"
    },
    "formapagoId": 1,
    "formaPago": {
      "id": 1,
      "nombre": "Efectivo"
    },
    "fechaVenta": "2026-03-06T10:30:00",
    "baseImponible": 250.0,
    "igv": 45.0,
    "total": 295.0,
    "detalle": [...]
  }
]

List All Sales

curl https://api.example.com/venta
[
  {
    "id": 1,
    "serie": "ABC",
    "numero": "000001",
    "descripcion": "Venta de productos",
    "clienteId": 123,
    "cliente": {
      "id": 123,
      "dni": "12345678",
      "nombre": "Juan",
      "apellido": "Pérez"
    },
    "formapagoId": 1,
    "formaPago": {
      "id": 1,
      "nombre": "Efectivo"
    },
    "fechaVenta": "2026-03-06T10:30:00",
    "baseImponible": 250.0,
    "igv": 45.0,
    "total": 295.0,
    "detalle": [...]
  }
]

Get Sale by ID

id
integer
required
Sale ID
curl https://api.example.com/venta/1
{
  "id": 1,
  "serie": "ABC",
  "numero": "000001",
  "descripcion": "Venta de productos",
  "clienteId": 123,
  "fechaVenta": "2026-03-06T10:30:00",
  "baseImponible": 250.0,
  "igv": 45.0,
  "total": 295.0,
  "detalle": [...]
}

Search by Date Range

inicio
string
required
Start date and time in ISO-8601 format (e.g., 2026-03-01T00:00:00)
fin
string
required
End date and time in ISO-8601 format (e.g., 2026-03-31T23:59:59)
curl "https://api.example.com/venta/buscar-por-fechas?inicio=2026-03-01T00:00:00&fin=2026-03-31T23:59:59"
[
  {
    "id": 1,
    "serie": "ABC",
    "numero": "000001",
    "fechaVenta": "2026-03-06T10:30:00",
    "total": 295.0,
    "detalle": [...]
  },
  {
    "id": 2,
    "serie": "ABC",
    "numero": "000002",
    "fechaVenta": "2026-03-15T14:20:00",
    "total": 450.0,
    "detalle": [...]
  }
]

Search by Series

serie
string
required
Invoice series code (e.g., “ABC”)
curl "https://api.example.com/venta/buscar/serie?serie=ABC"
[
  {
    "id": 1,
    "serie": "ABC",
    "numero": "000001",
    "total": 295.0,
    "detalle": [...]
  },
  {
    "id": 2,
    "serie": "ABC",
    "numero": "000002",
    "total": 450.0,
    "detalle": [...]
  }
]

Search by Number

numero
string
required
Invoice number (e.g., “000001”)
curl "https://api.example.com/venta/buscar/numero?numero=000001"
[
  {
    "id": 1,
    "serie": "ABC",
    "numero": "000001",
    "total": 295.0,
    "detalle": [...]
  }
]

Search by Series and Number

Find a specific sale by its unique series and number combination.
serie
string
required
Invoice series code
numero
string
required
Invoice number
curl "https://api.example.com/venta/buscar/serie-numero?serie=ABC&numero=000001"
{
  "id": 1,
  "serie": "ABC",
  "numero": "000001",
  "descripcion": "Venta de productos",
  "clienteId": 123,
  "fechaVenta": "2026-03-06T10:30:00",
  "baseImponible": 250.0,
  "igv": 45.0,
  "total": 295.0,
  "detalle": [...]
}

Response Fields

All search endpoints return sale objects with the following structure:
id
integer
Sale ID
serie
string
Invoice series code (3 letters)
numero
string
Invoice number (6 digits)
descripcion
string
Sale description
clienteId
long
Client ID
cliente
object
Client information (name, DNI, etc.)
formapagoId
long
Payment method ID
formaPago
object
Payment method details
fechaVenta
string
Sale date and time
baseImponible
double
Taxable amount (before IGV)
igv
double
Tax amount (18%)
total
double
Total sale amount including tax
detalle
array
Array of line items with product details, quantities, and prices

Notes

  • Date parameters must be in ISO-8601 format
  • Series codes are 3-letter uppercase strings
  • Invoice numbers are 6-digit zero-padded strings
  • The combination of serie + numero is unique for each sale

Build docs developers (and LLMs) love