Add-ons API
Manage rental add-ons like helmets, insurance, and accessories.
Add-ons are extra items or services that can be added to bookings — helmets, insurance, GPS units, child seats, etc.
List Add-ons
GET /v1/addonsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | integer | Results per page (1–100, default 20) |
const addons = await renta.addons.list();
for (const addon of addons.data) {
console.log(`${addon.name}: $${(addon.price / 100).toFixed(2)} (${addon.price_type})`);
}curl https://api.getrenta.io/v1/addons \
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"data": [
{
"id": "addon_helmet",
"name": "Helmet",
"description": "DOT-certified full-face helmet",
"price": 500,
"price_type": "per_item",
"image_url": "https://storage.getrenta.io/...",
"sort_order": 1
},
{
"id": "addon_insurance",
"name": "Damage Protection",
"description": "Covers up to $500 in accidental damage",
"price": 1500,
"price_type": "per_day",
"image_url": null,
"sort_order": 2
}
],
"has_more": false,
"next_cursor": null
}Price Types
| Type | Description |
|---|---|
per_item | Flat fee per add-on (regardless of rental duration) |
per_day | Price multiplied by number of rental days |
Get Add-on
GET /v1/addons/:idconst addon = await renta.addons.get('addon_helmet');curl https://api.getrenta.io/v1/addons/addon_helmet \
-H "Authorization: Bearer renta_sk_live_..."Create Add-on
POST /v1/addonsBody Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Add-on display name |
description | string | — | Description |
price | integer | ✅ | Price in cents |
price_type | string | ✅ | per_item or per_day |
image_url | string | — | Image URL |
sort_order | integer | — | Display order |
const addon = await renta.addons.create({
name: 'Helmet',
price: 500,
price_type: 'per_item',
description: 'DOT-certified full-face helmet',
});curl -X POST https://api.getrenta.io/v1/addons \
-H "Authorization: Bearer renta_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Helmet",
"price": 500,
"price_type": "per_item",
"description": "DOT-certified full-face helmet"
}'Update Add-on
PATCH /v1/addons/:idawait renta.addons.update('addon_helmet', { price: 600 });curl -X PATCH https://api.getrenta.io/v1/addons/addon_helmet \
-H "Authorization: Bearer renta_sk_live_..." \
-H "Content-Type: application/json" \
-d '{"price": 600}'Delete Add-on
DELETE /v1/addons/:idawait renta.addons.del('addon_helmet');curl -X DELETE https://api.getrenta.io/v1/addons/addon_helmet \
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"deleted": true,
"id": "addon_helmet"
}