Retrieve a paged list of the active rental items in your inventory. You can return everything, or only the items in one category.
| Method | URL | API key permission | Package |
|---|---|---|---|
| GET | https://rental.software/api6/rentals | Settings Rental Inventory: Read Only or Full Access | WP/API |
Request
GET /api6/rentals/?apiKey=YOUR_API_KEY&categoryid=1234&offset=0&limit=2
| Parameter | Default | Description |
|---|---|---|
| apiKey | Required. Your API key | |
| categoryid | ID of the category you'd like to retrieve all rentals from. Get category IDs from API - Categories - Retrieve List | |
| pagename | Name of one of your quote pages. Only used together with categoryid | |
| changes_since | Unix timestamp. Only returns items created or modified since that time | |
| _body | false | If true, returns the full details of each item, the same as API - Rentals - Retrieve Details. The request may take a little longer |
| _prices | false | If true, returns an array of price details by hour for each item. Only works together with _body=true |
| 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/rentals?apiKey=YOUR_API_KEY&offset=0&limit=2"
Response
{
"offset": 0,
"limit": "2",
"count": "127",
"first": "https://rental.software/api6/rentals?offset=0&limit=2",
"next": "https://rental.software/api6/rentals?offset=2&limit=2",
"previous": "https://rental.software/api6/rentals?offset=0&limit=2",
"items": [
{
"id": "336198",
"href": "https://rental.software/api6/rentals/336198",
"ridename": "10x10 Tent",
"imageloc": "https://rental.software/users/images/example-tent-small.jpg",
"imagelocbig": "https://rental.software/users/images/example-tent-large.jpg",
"description": "",
"Is Option": "0",
"Active": "1",
"Weight": "0",
"Electric": "0.00",
"Dimensions": "",
"Footprint": "",
"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 2": "",
"Image Big 2": "",
"Image 3": "",
"Image Big 3": "",
"Image 4": "",
"Image Big 4": "",
"Is Package": "0",
"Allow Discounts": "all"
},
{
"id": "336199",
"href": "https://rental.software/api6/rentals/336199",
"ridename": "11 x 11 Castle Jumper",
"imageloc": "",
"imagelocbig": "",
"description": "",
"Is Option": "0",
"Active": "1",
"Increment": "1",
"Is Package": "0",
"Allow Discounts": "all"
}
],
"request_time": 1760000000
}The second item is shortened. Every item has the same set of fields as the first one.
Good to Know
- Only active items are returned.
- count is the total number of items that match, across all pages. Use it to know how many pages there are.
- Several field names contain capital letters and spaces, such as "Setup Time". Read them exactly as shown.
- If the API key is limited to certain locations, only items in those locations (and items not assigned to a location) are returned.
- The first, next and previous links only carry offset and limit. Add your API key and your other parameters again before calling one.
- To keep a copy of your inventory in sync, store the time of your last sync and pass it as changes_since on the next one.
Errors
| Status | Message | What to do |
|---|---|---|
| 404 | No rentals found | Nothing matched, or you paged past the end of the list |
| 405 | Only accepts GET requests | Use GET for the list |
See API - Errors and Rate Limits for errors that apply to every call.