How to Feed Live Rental Stock Data to Your Website
HireHop allows you to seamlessly feed live stock data straight to your company website. This powerful feature enables you to list your hire and rental inventory online — complete with images, descriptions and real-time availability — perfectly synchronised with your HireHop database.
You can easily filter stock lists by category or name, and sort them by name, price, weight or available stock quantities. The system also lets you choose what format you want the export in, whether it’s JSON, CSV, or XML.
This feature can also be used to export your hire stock data easily, enabling you to export filtered parts of your data or all of it at once.
How to Get a Stock List
Before you export a list, you must first create an export key. This key is like a password that must be passed to get the list. If you change the export key, any requests made without the new key will be denied.
To get the export, you need a link, which you can get from the Hire Stock Management page:
- Filter the page to show the exact stock view you want. For example, if you select a category, the link will produce all the stock in that category, just as it is listed on the page.
- Click on Menu and then Get data link.
- A box will appear with a link to get a list for your current filtered view. (Note: You must be authorised to get this link in your user permissions.)
The data returned by HireHop includes the name, an image link, quantity, category, weight, dimensions, prices, part number, etc.
Technical Parameters
The generated link will look something like the example below, and has various parameters that you can change in order to filter or sort your stock data:
https://s.myhirehop.com/modules/stock/stock_export.php?id=10&key=abc1234def&depot=1&cat=0&sidx=TITLE&sord=asc&format=xml
Here’s an explanation of what each parameter means:
| Parameter | Meaning |
| id | This is a unique ID for your company. |
| key | The generated export key. |
| depot | An identifier for a depot (zero means all depots), to get the quantity. |
| cat | The identifier for a category. |
| cat_name | The name of a category. |
| name | The name search. |
| del | If set to one, deleted items will be listed. |
| unq | A unique ID of an item. If set, only one item will be returned. |
| sidx | The column to sort by. |
| sord | The sort order; asc = ascending & desc = descending. |
| format | The format the data will be returned in, being XML, CSV or JSON (default). |
Code Example (Using jQuery)
To load the data into your web page, you can Ajax it using JSONP. For example, with jQuery:
$.ajax({
url: "https://s.myhirehop.com/modules/stock/stock_export.php?id=10&key=abc1234def",
dataType: "jsonp",
success: function( data ) {
console.log( data );
}
});
Please note, the service, PAT test and test intervals are in ISO 8601 period formats and all dimensions and weights are metric.
Developer Resources & API Updates
Feeding live rental stock data directly to an external website is one of the most effective ways to automate client enquiries and show real-time availability.
If you are a developer working with the HireHop API or building custom web integrations, you can subscribe to our Developer Mailing List to receive technical documentation alerts, webhook notes and core system release updates directly to your inbox.