cajund
cajund

Reputation: 141

Categories API only pulling 50 categories

I'm trying to pull all of the categories from my store via the API. But I can't seem to get it to work. I only get 50. Is there a limit to how many categories that can be pulled?

Thanks,

Upvotes: 0

Views: 476

Answers (1)

user2066189
user2066189

Reputation:

By default the API will return a maximum of 50 items for any resources requested via the API. To increase the number of returned categories you can include a limit parameter in your request. In addition you can also specify a page parameter to retrieve a particular page of results.

Example

To return the 2nd page of the categories with 10 results per page, you would make the following request

GET /categories.json?limit=10&page=2

Upvotes: 1

Related Questions