Need all child level data in single API call

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
programmer110
Posts: 2
Joined: 10 Mar 2022, 11:39

Need all child level data in single API call

Post by programmer110 » 10 Mar 2022, 12:03

hello,

We have an API call to get all catalogs including child catalogs via an API call: /jsonapi/catalog and with include parameter (include=catalog). but this is returning only child catalogs on the first level. We need an API call that returns all levels of catalogs in a single call with text and media.

Like if the c1 catalog has a child c2 catalog. and c2 catalog has child c3.
Then our goal is to call API on the c1 catalog, which returns details of c2 and c3 both

Thanks

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

Re: Need all child level data in single API call

Post by aimeos » 11 Mar 2022, 07:47

Which Aimeos version do you use?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

programmer110
Posts: 2
Joined: 10 Mar 2022, 11:39

Re: Need all child level data in single API call

Post by programmer110 » 11 Mar 2022, 09:33

Hi,

Please find the version in the attached image.

Thanks
Attachments
image.png
image.png (36.98 KiB) Viewed 820 times

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

Re: Need all child level data in single API call

Post by aimeos » 11 Mar 2022, 12:11

Use this configuration to get the whole tree:
https://github.com/aimeos/ai-client-jso ... #L119-L137
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply