Maintenance API
Track maintenance history for fleet items — log repairs, inspections, and service records.
The Maintenance API lets you create and retrieve maintenance log entries for your fleet items. Use it to track repairs, inspections, meter readings, and service costs.
All maintenance endpoints require a secret key (renta_sk_). Publishable keys will receive a 403 Forbidden error.
List Maintenance Logs
GET /v1/maintenance/logsReturns maintenance logs with cursor-based pagination, ordered by most recent first. Optionally filter by fleet item.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
fleet_item_id | string | Filter logs for a specific fleet item |
cursor | string | Pagination cursor |
limit | integer | Results per page (1–100, default 20) |
// List all maintenance logs
const logs = await renta.maintenance.logs.list();
console.log(logs.data);
// Filter by fleet item
const itemLogs = await renta.maintenance.logs.list({
fleet_item_id: 'fi_abc123',
});
// Auto-paginate through all logs
for await (const log of renta.maintenance.logs.list()) {
console.log(`${log.description} — $${(log.cost / 100).toFixed(2)}`);
}curl "https://api.getrenta.io/v1/maintenance/logs?fleet_item_id=fi_abc123&limit=10" \
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"data": [
{
"id": "ml_abc123",
"schedule_id": null,
"fleet_item_id": "fi_abc123",
"description": "Brake pad replacement",
"notes": "Replaced front and rear pads",
"cost": 4500,
"performed_by": "Mike",
"performed_at": "2026-04-01T10:00:00Z",
"meter_reading": 1250,
"rental_count_at": 47,
"created_at": "2026-04-01T10:30:00Z"
}
],
"has_more": false,
"next_cursor": null
}Create Maintenance Log
POST /v1/maintenance/logsCreate a new maintenance log entry for a fleet item.
Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
fleet_item_id | string | ✅ | Fleet item this log belongs to |
description | string | ✅ | Description of the maintenance performed |
cost | integer | ✅ | Cost in cents |
performed_at | string | ✅ | ISO 8601 datetime when the maintenance was performed |
notes | string | — | Additional notes |
performed_by | string | — | Name of the person who performed the maintenance |
meter_reading | number | — | Odometer / hour meter reading at time of service |
rental_count_at | number | — | Total rental count at time of service |
schedule_id | string | — | Associated maintenance schedule ID |
const log = await renta.maintenance.logs.create({
fleet_item_id: 'fi_abc123',
description: 'Brake pad replacement',
cost: 4500,
performed_at: '2026-04-01T10:00:00Z',
performed_by: 'Mike',
notes: 'Replaced front and rear pads',
meter_reading: 1250,
});
console.log(log.id);curl -X POST https://api.getrenta.io/v1/maintenance/logs \
-H "Authorization: Bearer renta_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"fleet_item_id": "fi_abc123",
"description": "Brake pad replacement",
"cost": 4500,
"performed_at": "2026-04-01T10:00:00Z",
"performed_by": "Mike",
"notes": "Replaced front and rear pads",
"meter_reading": 1250
}'Response (201):
{
"id": "ml_def456",
"schedule_id": null,
"fleet_item_id": "fi_abc123",
"description": "Brake pad replacement",
"notes": "Replaced front and rear pads",
"cost": 4500,
"performed_by": "Mike",
"performed_at": "2026-04-01T10:00:00Z",
"meter_reading": 1250,
"rental_count_at": null,
"created_at": "2026-04-07T21:00:00Z"
}