Page 1 of 1

Help!!!! Fail to create catalogGroup with parent

Posted: Fri Apr 19, 2024 5:52 am
by Alantod17
Hi

I am trying to create and catalog group with an parant group id but got following error.

could you pls let me know how to create a catalogGroup with parent pls

{
"errors": [
{
"path": null,
"message": "Group 2977 is already at 4th level and cannot be a parent.",
"value": null
}
]
}


EndPoint: /api/v1.0/companies/0/catalogGroups/
Body: {"Name":"Switches","ParentGroup":2977}

Re: Help!!!! Fail to create catalogGroup with parent

Posted: Mon Apr 22, 2024 12:50 am
by AidenTew
Hi Alantod17,

As per the error you are getting. Simpro only allows for 4 levels of groups for Catalog.

what you've entered to create catalogue groups is correct.

Re: Help!!!! Fail to create catalogGroup with parent

Posted: Mon Apr 22, 2024 3:21 am
by Alantod17
AidenTew wrote: Mon Apr 22, 2024 12:50 am Hi Alantod17,

As per the error you are getting. Simpro only allows for 4 levels of groups for Catalog.

what you've entered to create catalogue groups is correct.
Thanks for the reply. The problem is more related to how can I create an group that is not in 4th level?

the parent group I used in the request is created by me as well by post the name only.

How can I create parent group and its children?

Re: Help!!!! Fail to create catalogGroup with parent

Posted: Tue Apr 23, 2024 12:55 am
by AidenTew
Hi Alantod17,

At the moment there's no way to tell which level the group belongs to through the API.

This is something we're looking into improving in the future.

https://developer.simprogroup.com/apido ... d17c6fa45d

so if a ParentGroup is not mentioned in the request when trying to create a group, it will just create the group at the first level ( group without any parent )

and if you want to add a child group for the parent, just make sure to mention the catalog group on the ParentGroup during the request.

Hope that helps.