Renta Docs

Quickstart

Make your first Renta API call in 5 minutes.

Get up and running with the Renta API in 5 minutes. By the end of this guide, you'll list fleet items and create a booking.

Prerequisites

  • A Renta account with API access (Pro tier, or request access at getrenta.io)
  • Node.js 18+ (for the SDK)
  • A secret API key (renta_sk_...)

Get your API keys

Navigate to Dashboard → Settings → API Keys to generate a secret key.

You'll get two types:

  • Secret key (renta_sk_...) — full API access, server-side only
  • Publishable key (renta_pk_...) — storefront-only access, safe for client-side

Never expose your secret key in client-side code, public repositories, or browser requests.

Install the SDK

npm install @renta/sdk
pnpm add @renta/sdk
yarn add @renta/sdk
bun add @renta/sdk

List your fleet items

list-fleet.ts
import { Renta } from '@renta/sdk';

const renta = new Renta({
  apiKey: process.env.RENTA_API_KEY!,
});

const items = await renta.fleet.items.list();

for (const item of items.data) {
  console.log(`${item.name} — $${(item.price_full_day / 100).toFixed(2)}/day`);
}
curl https://api.getrenta.io/v1/fleet/items \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "data": [
    {
      "id": "fi_abc123",
      "name": "Trail Blazer 500",
      "slug": "trail-blazer-500",
      "category_id": "cat_xyz",
      "status": "available",
      "price_half_day": 3500,
      "price_full_day": 5000,
      "price_multi_day": 4000,
      "price_weekly": 25000,
      "deposit_amount": 15000,
      "photos": [{"url": "https://..."}]
    }
  ],
  "has_more": true,
  "next_cursor": "eyJpZCI6ImZpXzk5OSJ9"
}

Create a booking

create-booking.ts
import { Renta } from '@renta/sdk';

const renta = new Renta({
  apiKey: process.env.RENTA_API_KEY!,
});

const booking = await renta.bookings.create({
  customer_id: 'cust_abc',
  pickup_date: '2026-07-01T09:00:00Z',
  return_date: '2026-07-03T17:00:00Z',
  line_items: [
    { fleet_item_id: 'fi_abc123' },
  ],
  addons: [
    { addon_id: 'addon_helmet', quantity: 1 },
  ],
});

console.log(`Booking created: ${booking.id}`);
console.log(`Total: $${(booking.total / 100).toFixed(2)}`);
curl -X POST https://api.getrenta.io/v1/bookings \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cust_abc",
    "pickup_date": "2026-07-01T09:00:00Z",
    "return_date": "2026-07-03T17:00:00Z",
    "line_items": [
      { "fleet_item_id": "fi_abc123" }
    ],
    "addons": [
      { "addon_id": "addon_helmet", "quantity": 1 }
    ]
  }'

Response:

{
  "id": "bk_def456",
  "status": "pending",
  "customer_id": "cust_abc",
  "pickup_date": "2026-07-01T09:00:00Z",
  "return_date": "2026-07-03T17:00:00Z",
  "subtotal": 10000,
  "tax_amount": 800,
  "discount_amount": 0,
  "total": 10800,
  "line_items": [
    {
      "id": "li_001",
      "fleet_item_id": "fi_abc123",
      "quantity": 1,
      "unit_price": 5000,
      "line_total": 10000
    }
  ],
  "addons": [
    {
      "id": "ba_001",
      "addon_id": "addon_helmet",
      "quantity": 1,
      "unit_price": 500,
      "line_total": 500
    }
  ],
  "created_at": "2026-03-31T12:00:00Z"
}

Next Steps