Renta Docs

Customers API

Manage customer profiles, lifetime stats, and search.

The Customers API manages customer profiles with lifetime rental statistics, tags, and contact information.

List Customers

GET /v1/customers

Query Parameters:

ParameterTypeDescription
querystringSearch by name, email, or phone
cursorstringPagination cursor
limitintegerResults per page (1–100, default 20)
const customers = await renta.customers.list({ query: 'john' });

for await (const customer of renta.customers.list()) {
  console.log(`${customer.name} — ${customer.total_bookings} bookings`);
}
curl "https://api.getrenta.io/v1/customers?query=john" \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "data": [
    {
      "id": "cust_abc123",
      "name": "John Doe",
      "email": "john@example.com",
      "phone": "+1234567890",
      "total_bookings": 5,
      "total_spent": 52500,
      "avg_order_value": 10500,
      "first_visit": "2025-06-15T10:00:00Z",
      "last_visit": "2026-03-20T14:30:00Z",
      "tags": ["vip", "repeat"],
      "flags": [],
      "notes": "Prefers full-day rentals",
      "created_at": "2025-06-15T10:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Get Customer

GET /v1/customers/:id
const customer = await renta.customers.get('cust_abc123');
console.log(`Lifetime spend: $${(customer.total_spent / 100).toFixed(2)}`);
curl https://api.getrenta.io/v1/customers/cust_abc123 \
  -H "Authorization: Bearer renta_sk_live_..."

Create Customer

POST /v1/customers

Body Parameters:

ParameterTypeRequiredDescription
namestringFull name
emailstringEmail address
phonestringPhone number
tagsstring[]Customer tags (e.g., ["vip"])
notesstringInternal notes
const customer = await renta.customers.create({
  name: 'John Doe',
  email: 'john@example.com',
  phone: '+1234567890',
});
curl -X POST https://api.getrenta.io/v1/customers \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890"
  }'

Update Customer

PATCH /v1/customers/:id

Accepts any subset of the create parameters.

await renta.customers.update('cust_abc123', {
  name: 'John Smith',
  tags: ['vip', 'repeat'],
});
curl -X PATCH https://api.getrenta.io/v1/customers/cust_abc123 \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "John Smith", "tags": ["vip", "repeat"]}'