Renta Docs

Pricing API

Calculate rental pricing breakdowns with discounts, seasonal rules, add-ons, and coupons.

The Pricing API calculates a complete pricing breakdown for a rental without creating a booking. Use it to preview costs at checkout.

Calculate Pricing

POST /v1/pricing/calculate

Body Parameters:

ParameterTypeRequiredDescription
fleet_item_idstring✅Fleet item to price
pickup_datestring✅Pickup date (ISO 8601)
return_datestring✅Return date (ISO 8601)
half_dayboolean—Half-day rental (default auto-detected)
pickup_location_idstring (uuid)—Pickup location. Tax uses that location's own rate when it has one (0 means no tax); otherwise the business rate. Omit for the business rate.
addonsarray—Array of {addon_id, quantity}
coupon_codestring—Coupon code to apply
const pricing = await renta.pricing.calculate({
  fleet_item_id: 'fi_abc123',
  pickup_date: '2026-07-01T09:00:00Z',
  return_date: '2026-07-03T17:00:00Z',
  addons: [
    { addon_id: 'addon_helmet', quantity: 1 },
    { addon_id: 'addon_insurance', quantity: 1 },
  ],
  coupon_code: 'SUMMER20',
});

console.log(`Base price: $${(pricing.base_price / 100).toFixed(2)}`);
console.log(`Seasonal adjustment: $${(pricing.seasonal_adjustment / 100).toFixed(2)}`);
console.log(`Add-ons: $${(pricing.addon_total / 100).toFixed(2)}`);
console.log(`Coupon discount: -$${(pricing.coupon_discount / 100).toFixed(2)}`);
console.log(`Subtotal: $${(pricing.subtotal / 100).toFixed(2)}`);
console.log(`Tax: $${(pricing.tax / 100).toFixed(2)}`);
console.log(`Total: $${(pricing.total / 100).toFixed(2)}`);
console.log(`Deposit hold: $${(pricing.deposit_hold_amount / 100).toFixed(2)}`);
curl -X POST https://api.getrenta.io/v1/pricing/calculate \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "fleet_item_id": "fi_abc123",
    "pickup_date": "2026-07-01T09:00:00Z",
    "return_date": "2026-07-03T17:00:00Z",
    "addons": [
      {"addon_id": "addon_helmet", "quantity": 1},
      {"addon_id": "addon_insurance", "quantity": 1}
    ],
    "coupon_code": "SUMMER20"
  }'

Response:

{
  "base_price": 10000,
  "discount_amount": 0,
  "seasonal_adjustment": -500,
  "addon_total": 3500,
  "package_savings": 0,
  "coupon_discount": 2600,
  "subtotal": 10400,
  "tax": 832,
  "total": 11232,
  "deposit_hold_amount": 15000,
  "renta_fee_amount": 281,
  "breakdown": {
    "days": 2,
    "half_day": false,
    "rate_per_day": 5000,
    "multi_day_discount": 0,
    "seasonal_rules_applied": [
      {
        "rule_id": "pr_summer",
        "type": "seasonal",
        "adjustment_type": "percent",
        "adjustment_value": -5
      }
    ],
    "coupon": {
      "code": "SUMMER20",
      "discount_type": "percent",
      "discount_value": 20
    },
    "addons": [
      {"addon_id": "addon_helmet", "name": "Helmet", "quantity": 1, "unit_price": 500, "total": 500},
      {"addon_id": "addon_insurance", "name": "Damage Protection", "quantity": 1, "unit_price": 1500, "total": 3000}
    ]
  }
}

Pricing Pipeline

The pricing engine applies calculations in this order:

  1. Base rate — price_half_day, price_full_day, or price_multi_day × days
  2. Multi-day discount — Automatic discount for longer rentals (if configured)
  3. Seasonal adjustment — Pricing rules with date ranges (dollar or percentage)
  4. Add-on pricing — Per-item or per-day add-on costs
  5. Package discount — Package bundle savings (if applicable)
  6. Coupon validation — Percentage or fixed discount from coupon code
  7. Tax calculation — Based on tenant's tax configuration
  8. Renta fee — Platform transaction fee (based on subscription tier)

The pricing endpoint is read-only — it doesn't create or modify any records. Use it for checkout previews and price comparison UIs.

Rate Selection

DurationRate Used
< 1 dayprice_half_day
1 dayprice_full_day
2–6 daysprice_multi_day × days (falls back to price_full_day if not set)
7+ daysprice_weekly ÷ 7 × days (falls back to price_multi_day or price_full_day)

Half-day detection is automatic if the pickup-to-return window is ≤ 5 hours, or can be forced with half_day: true.


Pricing Rules

Manage seasonal and multi-day pricing rules that the pricing engine applies during calculation.

List Pricing Rules

GET /v1/pricing/rules

Query Parameters:

ParameterTypeDescription
fleet_item_idstringFilter rules for a specific item
activestringFilter by active state (true or false)
cursorstringPagination cursor
limitintegerResults per page (1–100, default 20)
const rules = await renta.pricing.rules.list({
  fleet_item_id: 'fi_abc123',
  active: 'true',
});
curl "https://api.getrenta.io/v1/pricing/rules?fleet_item_id=fi_abc123&active=true" \\
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "data": [
    {
      "id": "pr_abc123",
      "fleet_item_id": "fi_abc123",
      "type": "seasonal",
      "start_date": "2026-06-01",
      "end_date": "2026-08-31",
      "days_threshold": null,
      "adjustment_type": "percent",
      "adjustment_value": 15,
      "priority": 10,
      "active": true,
      "created_at": "2026-03-01T10:00:00Z",
      "updated_at": "2026-03-01T10:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Get Pricing Rule

GET /v1/pricing/rules/:id
const rule = await renta.pricing.rules.get('pr_abc123');
curl https://api.getrenta.io/v1/pricing/rules/pr_abc123 \\
  -H "Authorization: Bearer renta_sk_live_..."

Create Pricing Rule

POST /v1/pricing/rules

Body Parameters:

ParameterTypeRequiredDescription
fleet_item_idstring—Fleet item ID (null for global rules)
typestring✅Rule type: seasonal or multi_day
start_datestring—Start date for seasonal rules (ISO date)
end_datestring—End date for seasonal rules (ISO date)
days_thresholdinteger—Minimum days for multi-day rules
adjustment_typestring—dollar or percent (default percent)
adjustment_valueinteger—Adjustment amount (cents for dollar, whole number for percent)
apply_perstring—Seasonal rules with adjustment_type: dollar: booking (default, charged once per unit) or day (charged once per rental day). Ignored for percent rules
priorityinteger—Higher priority rules apply first (default 0)
activeboolean—Whether the rule is active (default true)
const rule = await renta.pricing.rules.create({
  fleet_item_id: 'fi_abc123',
  type: 'seasonal',
  start_date: '2026-06-01',
  end_date: '2026-08-31',
  adjustment_type: 'percent',
  adjustment_value: 15,
  priority: 10,
});
curl -X POST https://api.getrenta.io/v1/pricing/rules \\
  -H "Authorization: Bearer renta_sk_live_..." \\
  -H "Content-Type: application/json" \\
  -d '{
    "fleet_item_id": "fi_abc123",
    "type": "seasonal",
    "start_date": "2026-06-01",
    "end_date": "2026-08-31",
    "adjustment_type": "percent",
    "adjustment_value": 15,
    "priority": 10
  }'

Update Pricing Rule

PATCH /v1/pricing/rules/:id

Accepts any subset of the create parameters.

await renta.pricing.rules.update('pr_abc123', {
  active: false,
});
curl -X PATCH https://api.getrenta.io/v1/pricing/rules/pr_abc123 \\
  -H "Authorization: Bearer renta_sk_live_..." \\
  -H "Content-Type: application/json" \\
  -d '{"active": false}'

Delete Pricing Rule

DELETE /v1/pricing/rules/:id
await renta.pricing.rules.del('pr_abc123');
curl -X DELETE https://api.getrenta.io/v1/pricing/rules/pr_abc123 \\
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "deleted": true,
  "id": "pr_abc123"
}
Pricing API | Renta Docs