POST Folders - Is there Multiple endpoint available?

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
jmc2408
Posts: 100
Joined: Thu Jul 09, 2020 3:41 pm
Location: Glasgow, Scotland
Contact:

POST Folders - Is there Multiple endpoint available?

Post by jmc2408 » Thu Mar 06, 2025 10:20 am

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
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: POST Folders - Is there Multiple endpoint available?

Post by SimproAPITeam » Fri Mar 07, 2025 5:58 am

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
Simpro API Team | Simpro Software Group
jmc2408
Posts: 100
Joined: Thu Jul 09, 2020 3:41 pm
Location: Glasgow, Scotland
Contact:

Re: POST Folders - Is there Multiple endpoint available?

Post by jmc2408 » Fri Mar 07, 2025 9:44 am

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
Last edited by jmc2408 on Thu Mar 13, 2025 12:03 pm, edited 1 time in total.
jmc2408
Posts: 100
Joined: Thu Jul 09, 2020 3:41 pm
Location: Glasgow, Scotland
Contact:

Re: POST Folders - Is there Multiple endpoint available?

Post by jmc2408 » Thu Mar 13, 2025 12:01 pm

Any feedback if a multiple endpoint and array post is possible for Folders?
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: POST Folders - Is there Multiple endpoint available?

Post by SimproAPITeam » Sun Mar 16, 2025 11:31 pm

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.
Simpro API Team | Simpro Software Group
Post Reply