Ir al contenido

Reporte de ingresos y cobranza por cliente

GET
/teams/{teamId}/reports/revenue
curl --request GET \
--url https://api.dev.lade.com.mx/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reports/revenue \
--header 'Authorization: Bearer <token>'

Agregación server-side de facturación/cobranza para la pantalla Reportes: total facturado (suma de revenue de viajes en el rango), total cobrado (suma de pagos), saldo pendiente, cobros agrupados por mes, y el top 8 de clientes con mayor saldo pendiente. Pagina internamente todos los viajes del equipo (a diferencia de GET /teams/{teamId}/trips, que tope 100 por página).

teamId
required
string format: uuid

ID del equipo (UUID)

clientId
string format: uuid
from
string format: date

Fecha inicial (ISO 8601), filtra por fecha efectiva del viaje (actualEndDate/endDate/startDate)

to
string format: date

Reporte de ingresos

Media typeapplication/json
object
totalFacturado
number
totalCobrado
number
saldoPendiente
number
cobrosPorMes
Array<object>
object
month
string
total
number
topClientesPendientes
Array<object>
<= 8 items
object
clientId
string format: uuid
name
string
balance
number
payments
Array<object>

Abono/pago registrado contra el saldo de un viaje (no confundir con el CFDI de Invoice)

object
id
string format: uuid
paymentId
string format: uuid
teamId
string format: uuid
tripId
string format: uuid
clientId
string
nullable
clientName
string
amount
number
> 0
paidAt
string format: date-time
method

Forma en que se cobró el pago

string
Allowed values: EFECTIVO TRANSFERENCIA CHEQUE TARJETA OTRO
reference
string
notes
string
registeredBy
string format: uuid
nullable
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{
"totalFacturado": 150000,
"totalCobrado": 120000,
"saldoPendiente": 30000,
"cobrosPorMes": [
{
"month": "2026-07",
"total": 45000
}
],
"topClientesPendientes": [
{
"clientId": "cc0e8400-e29b-41d4-a716-446655440007",
"name": "Cliente ABC",
"balance": 12000
}
],
"payments": []
}

Solicitud inválida

Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{
"error": "Validation failed",
"field": "email",
"message": "Invalid email format"
}

Sin permisos

Media typeapplication/json
object
error
required
string
message
string
field
string
Example
{
"error": "Forbidden",
"message": "You don't have permission to access this resource"
}