api request

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
ahmed31916
Posts: 90
Joined: 14 Apr 2022, 12:15

api request

Post by ahmed31916 » 24 May 2022, 09:34

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?

User avatar
aimeos
Administrator
Posts: 6197
Joined: 01 Jan 1970, 00:00

Re: api request

Post by aimeos » 25 May 2022, 15:14

Add "&include=catalog" to your request URL:
https://aimeos.org/docs/latest/frontend ... categories
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Posts: 90
Joined: 14 Apr 2022, 12:15

Re: api request

Post by ahmed31916 » 25 May 2022, 22:13

no, I want category level 3 for the node category 1

User avatar
aimeos
Administrator
Posts: 6197
Joined: 01 Jan 1970, 00:00

Re: api request

Post by aimeos » 27 May 2022, 06:06

There's a configuration option which allows fetching categories of several levels at once:
https://aimeos.org/docs/2022.x/config/c ... alog/#deep
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Posts: 90
Joined: 14 Apr 2022, 12:15

Re: api request

Post by ahmed31916 » 27 May 2022, 11:51

I change it, but nothing changed on the response !
I want childrens of category number 1.

User avatar
aimeos
Administrator
Posts: 6197
Joined: 01 Jan 1970, 00:00

Re: api request

Post by aimeos » 29 May 2022, 07:09

You have to set the configuration AND pass the parameter "&include=catalog"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply