API - Categories - Retrieve List

Retrieve the list of inventory categories for your account. Use this endpoint to get category IDs and names for building menus, syncing sites, or driving other API calls.

MethodURLAPI key permissionPackage
GEThttps://rental.software/api6/categories_listSettings Categories: Read Only or Full AccessWP/API

Prerequisites

  • An active API key created under Settings > API Keys. Include it as ?apiKey=YOUR_API_KEY on the request URL. See API - Setup Access.
  • Give the API key access to Settings Categories in its permissions.
  • Categories must be turned on in your account.
  • When creating a key, it is recommended to restrict allowed IP addresses to the servers that will make the calls (optional but recommended).

Step-by-Step Instructions

  1. Generate or copy an API key from Settings > API Keys.
  2. Build a GET request to the categories_list endpoint and include your API key plus any filters:
    GET https://rental.software/api6/categories_list/?apiKey=YOUR_API_KEY&offset=0&limit=25
  3. Send the request (example using curl):
    curl "https://rental.software/api6/categories_list/?apiKey=YOUR_API_KEY&offset=0&limit=25" -H "Accept: application/json"
  4. Inspect the JSON response for the items array containing the category records.

Parameters

ParameterDefaultDescription
apiKeyRequired. Your API key
limitAllNumber of records to return. If you leave it out, every category is returned in one response
offset0Start record number for paging. Only used when limit is also sent
location_idMulti-location accounts only. Returns the categories of that location
wpidID of a WordPress sync (the ID number at the end of the URL when viewing the sync entry in IO). When sent, the categories come back in the display order set for that website

Response (Example)

{
  "offset": 0,
  "limit": 25,
  "first": "https://rental.software/api6/categories?offset=0&limit=25",
  "next": "https://rental.software/api6/categories?offset=25&limit=25",
  "previous": "https://rental.software/api6/categories?offset=0&limit=25",
  "items": [
    {
      "id": "19912",
      "href": "https://rental.software/api6/rentals?categoryid=19912",
      "name": "Moonwalks & Bounce Houses",
      "imageloc": "https://rental.software/users/images/example-category-small.jpg",
      "imagelocbig": "https://rental.software/users/images/example-category-large.jpg",
      "description": "",
      "order": "1",
      "wordpress_urls": [],
      "location_id": "0"
    },
    {
      "id": "928",
      "href": "https://rental.software/api6/rentals?categoryid=928",
      "name": "Equipment",
      "imageloc": "",
      "imagelocbig": "",
      "description": "",
      "order": "13",
      "wordpress_urls": [],
      "location_id": "0"
    }
  ],
  "request_time": 1760000000
}

Returned Fields

FieldDescription
offset, limit, first, next, previousPaging values and paging URLs. Only present when you send a limit
itemsArray of category objects
id, name, descriptionCategory ID, name and description
hrefAPI URL that lists the rentals in this category
imageloc, imagelocbigURLs of the small and large category image
orderDisplay order of the category
wordpress_urlsThe category's page on each of your synced WordPress sites, as a list of website and relative_url
location_idLocation the category belongs to (0 on single location accounts)

Use Cases

  • Populate a navigation menu or category list on your website or external app using category id and name.
  • Get a category id to pass into the Rentals endpoint to retrieve all rentals in that category. See API - Rentals - Retrieve List.

Troubleshooting & FAQs

What you seeWhat it meansWhat to do
401 "No API Key provided"The request has no apiKeyAdd ?apiKey=YOUR_API_KEY to the URL
404 "No categories found"No categories matchedCheck the location_id you sent, or page back to an earlier offset
405 "Categories are turned off"Your account is not using categoriesThis endpoint only works for accounts that use categories
429 "Too Many Requests"You exceeded a rate limitWait, then retry less often. See API - Errors and Rate Limits

No paging values in the response? They are only included when you send a limit. Without one, all categories are returned at once.

Category IDs for Rentals. Use the category id from this response when calling the Rentals list endpoint to retrieve rentals for that category.


Related Links

Is this article helpful?
0 0 0