Skip to main content
Rentals represent the rental transactions in Lightyshare. You can retrieve rental details for rentals where you are either the tenant (renter) or the owner (lender).

Access Control

Rental information is protected by access control:
  • Tenants: Can view their own rental details
  • Owners: Can view rentals of their products
  • Others: Cannot access rental information

Retrieving a Rental

Basic Rental Retrieval

Response Format

Rental Details

Core Information

User Information

Rental Items

Each rental item includes:

Error Responses

Unauthorized (401)

Forbidden (403)

Not Found (404)

Use Cases

For Tenants

  • Track rental history: View all your past and current rentals
  • Verify rental details: Confirm dates, items, and costs
  • Contact owners: Get owner information for communication

For Owners

  • Monitor rentals: Track which of your products are currently rented
  • Revenue tracking: View rental income and history
  • Customer management: Access tenant information for support

Best Practices

1. Error Handling

Always implement proper error handling for rental requests:

2. Data Validation

Validate rental data before processing:
  • Check rental status before taking actions
  • Verify dates are in the expected format
  • Confirm amounts match your expectations

3. Security Considerations

  • Never expose rental IDs in public URLs
  • Validate access permissions before displaying rental data
  • Sanitize user input when searching for rentals

Rental Statuses

Active

The rental is currently in progress. Items are being used by the tenant.

Completed

The rental period has ended and items have been returned. The rental is finalized.

Cancelled

The rental was cancelled before or during the rental period.

Integration Examples

Dashboard Integration

Rental Details Page