Updates in API?

Richard Just shared this question 27 days ago
Need Answer

Has the endpoints for accessing the IO API changed?

categories is now categories_list:

GET /api2/categories_list/?apiKey=XXXXXX {

The response in the documentation still says:

/categories

What is the endpoint and format now to retrieve items within a category?

Previously /categories?xxxxxx would work, now it does not return the correct items within a category

Comments (8)

photo
1

We haven't changed api2 in a long time... the current version is api5, but it mostly added functionality and didn't change old things.


Anyway it does look like /categories/ ever worked right. you should just use /categories_list/

if you want to get a list of items in a certain category you can call rentals_list with a categoryid.

photo
1

Thanks Joel.


What's the format?

This does not return the correct results:

https://www.inflatableoffice.com/api5/rentals_list/categoryid=47187&apiKey=xxxx

https://www.inflatableoffice.com/api5/rentals_list?categoriesid=47187


Neither of the above return the correct results.

photo
1

Hi Joel,
Already tried that combo:
https://www.inflatableoffice.com/api5/rentals_list?categoryid=47187&apiKey=xxxx
Items not found in the category. Categoryid is correct and contains multiple items.

  1. {status: 404, message: "No rentals found"}
  2. message: "No rentals found"
  3. status: 404 }

photo
1

Either it returns no rentals found or it returns the wrong items:

https://www.inflatableoffice.com/api5/rentals_list?categoryid=47185&apiKey=xxxx https://www.inflatableoffice.com/api5/rentals?categoryid=47185&apiKey=xxxx

Tried all types of combinations.

A call to that endpoint just returns the same results as a call to: https://www.inflatableoffice.com/api5/rentals?offset=0&limit=25

photo
2

Sorry for the trouble with this. I just discovered it's because of the multiple quote pages you are using. It was guessing which to use and was picking the wrong one:


https://www.inflatableoffice.com/api5/rentals_list?categoryid=47187&apiKey=xxxx&pagename=Brizzy%20Jumping%20Castles

photo
1

Awesome! Works as expected. Thanks boss!

photo
1

Hey Joel,

API related question again, are you able to add fields to the data that's returned from rentals_list?

Using &body=1 prints more fields out though, I was wanting the rating, and capacity, without having to make a separate call to each product.

Is this something you can do or something we can do within IO?


Thanks.

photo