Page 1 of 1

POST Folders - Is there Multiple endpoint available?

Posted: Thu Mar 06, 2025 10:20 am
by jmc2408
Hi,

Is there a multiple endpoint for creating folders and sub-folders?
I know i can create a template and add manually to every project, but i have many (c.2000 jobs) i need to create this folder setup on.

I've tried a few combinations but nothing seems to work.

Thanks
John

Re: POST Folders - Is there Multiple endpoint available?

Posted: Fri Mar 07, 2025 5:58 am
by SimproAPITeam
Hi jmc,
Post multiple for folders would only allow posting multiple folders on one job. From your question it looks like you want to post multiple jobs.

You can POST Sub resources to see if that works for you on folders to reduce the number of queries. See example here :
https://developer.simprogroup.com/apido ... bresources

Other wise you would have to use post multiple for jobs and then update the jobs individually to create the folders you need.

Regards

Re: POST Folders - Is there Multiple endpoint available?

Posted: Fri Mar 07, 2025 9:44 am
by jmc2408
Thanks for the clarification!

Yes, I only need to create the folder structure on a single job at a time, I can get the API to loop through each job but I want to ensure it’s nested correctly.

Here’s an example of what I’m trying to achieve:
• Root Folder (Project)
• Plans
• Revisions
• Permits
• Photos
• Reports
• Site Inspection
• Completion

I’ve tried constructing the JSON body like this, but it’s not working as expected:

Code: Select all

{
    "folders": [
        {
            "name": "Project",
            "subFolders": [
                {
                    "name": "Plans",
                    "subFolders": [
                        {
                            "name": "Revisions"
                        }
                    ]
                },
                {
                    "name": "Permits"
                },
                {
                    "name": "Photos"
                },
                {
                    "name": "Reports",
                    "subFolders": [
                        {
                            "name": "Site Inspection"
                        },
                        {
                            "name": "Completion"
                        }
                    ]
                }
            ]
        }
    ]
}
I get the keys might be not be correct but what do they need to be? Could you confirm if this structure is supported, or do I need to make separate API calls for each nested level? Any guidance on the correct approach would be appreciated.

Thanks,
John

Re: POST Folders - Is there Multiple endpoint available?

Posted: Thu Mar 13, 2025 12:01 pm
by jmc2408
Any feedback if a multiple endpoint and array post is possible for Folders?

Re: POST Folders - Is there Multiple endpoint available?

Posted: Sun Mar 16, 2025 11:31 pm
by SimproAPITeam
Hi jmc2408,

With ur example of creating folder structures, it wouldn't be possible in a single call.

You can only use the Post and Patch Multiple to create multiple folders in a single call: https://developer.simprogroup.com/apido ... h-multiple

But you will need to know the parent folder ID for subfolders.

eg. for Customer Folders - [buildURL]/api/v1.0/companies/[companyID]/customers/[customerID]/attachments/folders/multiple/

Code: Select all

[
    {
        "Parent": 43170,
        "Name": "3-1"
    },
    {
        "Parent": 43170,
        "Name": "3-2"
    },
    {
        "Parent": 43170,
        "Name": "3-3"
    }
]
Hope that helps.