Renta Docs

Storefront API

Public-facing endpoints for browsing inventory, checking availability, and creating bookings.

The Storefront API provides public-facing endpoints designed for customer-facing applications. These endpoints work with publishable keys (renta_pk_...) and are safe to call from browsers and mobile apps.

All storefront endpoints use the storefront:read scope. They return only public data — no admin info, internal notes, or other tenants' data.

Get Shop Profile

GET /v1/storefront/shop

Returns the public profile of the tenant's rental shop.

import { RentaStorefront } from '@renta/sdk/storefront';

const storefront = new RentaStorefront({
  apiKey: 'renta_pk_live_...',
});

const shop = await storefront.shop();
console.log(shop.name);
console.log(shop.pickup_locations);
curl https://api.getrenta.io/v1/storefront/shop \
  -H "Authorization: Bearer renta_pk_live_..."

Response:

{
  "id": "tenant_abc",
  "slug": "mountain-adventures",
  "name": "Mountain Adventures",
  "brand_settings": {
    "primary_color": "#C4572A",
    "logo_url": "https://storage.getrenta.io/..."
  },
  "pickup_locations": [
    {
      "id": "loc_main",
      "name": "Main Shop",
      "address": "123 Mountain Road, Moab, UT 84532",
      "phone": "+1-435-555-0123",
      "hours": {
        "mon": "8:00-18:00",
        "tue": "8:00-18:00",
        "wed": "8:00-18:00",
        "thu": "8:00-18:00",
        "fri": "8:00-18:00",
        "sat": "7:00-19:00",
        "sun": "9:00-17:00"
      }
    }
  ]
}

Browse Inventory

GET /v1/storefront/inventory

Returns available fleet items with calculated pricing for a date range. Combines availability checking and pricing in one call.

Query Parameters:

ParameterTypeRequiredDescription
pickup_datestringPickup date (ISO 8601)
return_datestringReturn date (ISO 8601)
half_daybooleanForce half-day pricing
const inventory = await storefront.inventory({
  pickup_date: '2026-07-01T09:00:00Z',
  return_date: '2026-07-03T17:00:00Z',
});

for (const item of inventory.data) {
  console.log(`${item.name} — $${(item.calculated_price / 100).toFixed(2)}`);
  console.log(`  Available: ${item.available}`);
}
curl "https://api.getrenta.io/v1/storefront/inventory?pickup_date=2026-07-01T09:00:00Z&return_date=2026-07-03T17:00:00Z" \
  -H "Authorization: Bearer renta_pk_live_..."

Response:

{
  "data": [
    {
      "id": "fi_abc123",
      "name": "Trail Blazer 500",
      "slug": "trail-blazer-500",
      "description": "High-performance electric mountain bike",
      "category": {
        "id": "cat_xyz",
        "name": "E-Bikes",
        "slug": "e-bikes"
      },
      "photos": [{"url": "https://storage.getrenta.io/..."}],
      "skill_level": "intermediate",
      "available": true,
      "calculated_price": 10000,
      "deposit_amount": 15000,
      "price_breakdown": {
        "days": 2,
        "rate_per_day": 5000,
        "base_price": 10000,
        "seasonal_adjustment": 0
      }
    }
  ],
  "categories": [
    {"id": "cat_xyz", "name": "E-Bikes", "slug": "e-bikes", "item_count": 5}
  ]
}

Create Storefront Booking

POST /v1/storefront/book

Create a booking from the customer-facing storefront flow. Requires a Stripe payment intent.

Body Parameters:

ParameterTypeRequiredDescription
payment_intent_idstringStripe PaymentIntent ID
pickup_datestringPickup date (ISO 8601)
return_datestringReturn date (ISO 8601)
line_itemsarrayArray of {fleet_item_id, quantity?}
addonsarrayArray of {addon_id, quantity}
pickup_location_idstringPickup location ID
half_daybooleanHalf-day rental
coupon_codestringCoupon code
customer_idstringExisting customer ID (creates guest if omitted)
const result = await storefront.book({
  payment_intent_id: 'pi_stripe_123',
  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 }],
  pickup_location_id: 'loc_main',
});

console.log(`Booking ID: ${result.id}`);
curl -X POST https://api.getrenta.io/v1/storefront/book \
  -H "Authorization: Bearer renta_pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "payment_intent_id": "pi_stripe_123",
    "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}],
    "pickup_location_id": "loc_main"
  }'

The storefront booking endpoint creates a guest customer if customer_id is omitted. Guest customers are created with minimal information from the Stripe payment intent.

Storefront Auth

The storefront includes optional customer authentication for returning customers.

Request Auth Code

POST /api/storefront/auth/request

Sends a one-time code to the customer's email.

Verify Auth Code

POST /api/storefront/auth/verify

Verifies the code and returns a session token.

Check Add-ons

GET /api/storefront/addons-check

Returns available add-ons for the selected fleet items.

Get Waiver Template

GET /api/storefront/waiver-template

Returns the waiver template for the customer to sign during booking.