Page 1 of 1

api request

Posted: 24 May 2022, 09:34
by ahmed31916
Hello,
This api request returns the node category:

Code: Select all

var params = {};

var result = $.ajax({
    method: "GET",
    dataType: "json",
    url: '/jsonapi/default/catalog', 
    data: {}
});

result.done( function( result ) {
    console.log( result.data );
});
How can get the subcategories for this node category?

Re: api request

Posted: 25 May 2022, 15:14
by aimeos
Add "&include=catalog" to your request URL:
https://aimeos.org/docs/latest/frontend ... categories

Re: api request

Posted: 25 May 2022, 22:13
by ahmed31916
no, I want category level 3 for the node category 1

Re: api request

Posted: 27 May 2022, 06:06
by aimeos
There's a configuration option which allows fetching categories of several levels at once:
https://aimeos.org/docs/2022.x/config/c ... alog/#deep

Re: api request

Posted: 27 May 2022, 11:51
by ahmed31916
I change it, but nothing changed on the response !
I want childrens of category number 1.

Re: api request

Posted: 29 May 2022, 07:09
by aimeos
You have to set the configuration AND pass the parameter "&include=catalog"