Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.lightyshare.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide will help you make your first API call to Lightyshare in just a few minutes.

Prerequisites

Before you begin, you’ll need:
  1. A Lightyshare account - Sign up at lightyshare.com
  2. An API token - Generate one from your dashboard
  3. A REST client - Use cURL, Postman, or any HTTP client

Step 1: Get Your API Token

  1. Log in to your Lightyshare dashboard
  2. Navigate to Settings → API Tokens
  3. Click “Create New Token”
  4. Give your token a descriptive name
  5. Copy the token - you won’t be able to see it again!
Keep your API token secure and never share it publicly.

Step 2: Make Your First API Call

Let’s retrieve information about one of your products:
curl -X GET https://lightyshare.com/api/token-secured/product/123 \
  -H "Authorization: Bearer YOUR_API_TOKEN"
You should receive a response like:
{
  "product": {
    "id": 123,
    "title": "4K Pro Camera",
    "rent": 250.0,
    "online": true,
    "quantity": 1
  }
}

Step 3: Create Your First Product

Now let’s create a new product:
curl -X POST https://lightyshare.com/api/token-secured/product \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "product": {
      "title": "Professional Camera",
      "description": "High-quality DSLR camera for professional photography",
      "rent": 150.0,
      "cost": 2500.0,
      "productType": 0,
      "stock_type": 0,
      "sku": "CAM-001",
      "quantity": 1,
      "online": true
    }
  }'
Success response:
{
  "success": true,
  "id": 12345,
  "location": "/api/token-secured/product/12345"
}

Common Use Cases

Product Management

Create, update, and manage your rental products

Bundle Creation

Group related products into rental packages

Rental Access

View and manage active rentals

Error Handling

Learn how to handle API errors gracefully

API Versioning

Lightyshare uses date-based versioning. Your API token is automatically tied to the latest version when created. You can override the version per request:
curl -X GET https://lightyshare.com/api/token-secured/product/123 \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "lighty-version: 2025-01-15"

Rate Limits

The API has the following rate limits:
  • Standard tier: 100 requests per minute
  • Pro tier: 500 requests per minute
  • Enterprise: Custom limits
Rate limit information is returned in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

Next Steps

1

Explore the API Reference

Check out the complete API documentation for all available endpoints.
2

Learn Core Concepts

3

Try Examples

See practical examples for creating products and handling errors.

Need Help?