Overview

The Bandit API provides the raw data for each product displayed on this site. As with most APIs, product information can be requested by ID, listed by category, and paginated as needed.

Base URL: banditchippers.com/wp-json/wp/v2/

Requesting Individual Items

To request an individual item, use this format:

Path: /project/{item_id}

The response will be a data blob containing the item’s title, subtitle, description, metrics, and IDs of related content like images.

Requesting a List of Items

Requesting a list of all items by category is simple. Simply provide the id of the category.

Path: /project?category={category_id}

A list of items will be returned, along with the item ID, in the case that additional information needs to be queried.

Additional parameters:

How information is formatted per page is highly configurable. Here’s a list of the available options:

  • ?page={page_number} – specify requested page
  • ?per_page={items_per_page} – specify how many items you want in each page
  • ?offset={offset} – set an arbitrary offset at which to begin retrieving items from the full list
  • ?order={“asc” or “desc”} – by default, results are ordered by “desc”
  • ?orderby={name_of_field} – manually configure which field to order by

Requesting Available Categories

As defined above, requesting data from Bandit is best done by category. At the time of writing, this is the list of available categories:

ID Name
7 Hand-Fed Chippers
8 Stump Grinders
9 Skid Steer Attachments
10 Horizontal Grinders
11 Whole Tree Chippers
12 Track Carriers
13 Slow-Speed Shredders

To get an up-to-date list of all categories, their IDs and names, this request can be made.

Path: /project_category

Requesting Item Media

Throughout the API, media items are often referred to with an id. For example, the response for an individual chipper may include a property like “product_image_carousel_1”: 1926. In this case, an additional request can be made to the media endpoint to load metadata about this media object and get a link to its direct hosted location.

Path: /media/{media_id}

The response includes a variety of helpful metadata, as well as an array of available sizes, detailed in the “media_details” array. Here, the desired size file can be located and displayed using the source_url.