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/customersQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
query | string | Search by name, email, or phone |
cursor | string | Pagination cursor |
limit | integer | Results 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/:idconst 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/customersBody Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Full name |
email | string | ✅ | Email address |
phone | string | — | Phone number |
tags | string[] | — | Customer tags (e.g., ["vip"]) |
notes | string | — | Internal 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/:idAccepts 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"]}'