Theidcan be either one of the constants-root-,-shared-,-my-or an Alfresco Node Identifier (e.g. 444be4a6-5693-4d10-af4b-b55448fe4f97). The POST data defines the folder metadata and looks like in this example:
"name": "My Folder",
"cm:title": "My Folder",
"cm:description": "My new folder"
If you would have to create the folder and subfolders in one go, you would have to create your custom webscript to handle your specific requirement. In your webscript you can include the code to create folders/subfolders based on the path value passed.