Get your most popular rental items, in order from most rented to least rented. Pass the number of days to look back.
| Method | URL | API key permission | Package |
|---|---|---|---|
| GET | https://rental.software/api6/popular_items | Settings Rental Inventory: Read Only or Full Access | WP/API |
Request
GET /api6/popular_items/?apiKey=YOUR_API_KEY&lastxdays=100
| Parameter | Default | Description |
|---|---|---|
| apiKey | Required. Your API key | |
| lastxdays | 30 | How many days to look back |
| includeaccessories | No | Send 1 to include options and accessories. Leave it out to only count main rentals |
| offset | 0 | Record number to start at. The first record is 0 |
| limit | 25 | Count of records to return |
Example using curl:
curl "https://rental.software/api6/popular_items?apiKey=YOUR_API_KEY&lastxdays=100&limit=10"
Response
{
"offset": 0,
"limit": "10",
"items": [
{
"ID": "341900",
"Is Option": "0",
"Name": "12' Wet and Dry Slide - Tropical Theme",
"Active": "1",
"Quantity": "1",
"Description": "All of our Wet and Dry Slides feature landing zones with curved stop walls.",
"Weight": "290",
"Electric": "0.00",
"Dimensions": "21x10x12",
"Footprint": "21x10x12",
"Tie Downs": "0",
"Tie Down Weight": "0",
"Operating Staff": "0",
"Volunteers": "0",
"Setup Staff": "0",
"Setup Time": "0.00",
"Tear Down Time": "0.00",
"Packing List": "",
"Serial Number": "",
"Contract Details": "",
"Operating Instructions": "",
"Inspection List": "",
"Increment": "1",
"Notes": "",
"Image 1": "https://rental.software/users/images/example-slide-small.jpg",
"Image Big 1": "https://rental.software/users/images/example-slide-large.jpg",
"Image 2": "",
"Image Big 2": "",
"Image 3": "",
"Image Big 3": "",
"Image 4": "",
"Image Big 4": "",
"Is Package": "0",
"Allow Discounts": "all",
"Times Rented": "7"
}
],
"request_time": 1760000000
}Good to Know
- Times Rented counts how many completed events the item was on. Only events that have already happened, within the last lastxdays days, and that are in a status marked as complete are counted.
- Only active items are returned.
- The field names contain capital letters and spaces, such as "Times Rented". Read them exactly as shown.
- If the API key is limited to certain locations, only items assigned to those locations are returned.
- To page through the results, add your limit to offset yourself for each call. Do not rely on the first, next and previous links in this response.
Errors
| Status | Message | What to do |
|---|---|---|
| 404 | No rentals found | No items were rented in that time frame. Try a larger lastxdays |
| 405 | Only accepts GET requests | Use GET |
See API - Errors and Rate Limits for errors that apply to every call.