# How to associate a Composition with a Folder? **Category:** [Platform](https://discourse.openehr.org/c/platform-implem/7) **Created:** 2020-07-15 12:10 UTC **Views:** 673 **Replies:** 4 **URL:** https://discourse.openehr.org/t/how-to-associate-a-composition-with-a-folder/876 --- ## Post #1 by @ian.mcnicoll I have never used FOLDERs in anger. Just cannot figure out how to associate a composition/contribution with a FOLDER, either in Better Ehrscape or the openEHR REST API. Any pointers? --- ## Post #2 by @thomas.beale Well a Contribution causes modifications to the Folders structure, just like any other structure. Contribution = version change set record. --- ## Post #3 by @birger.haarbrandt Hi Ian, this example is from the integration tests of EHRbase. Should hopefully work: { "_type": "FOLDER", "name": { "_type": "DV_TEXT", "value": "root" }, "archetype_node_id": "openEHR-EHR-FOLDER.generic.v1", "folders": [ { "_type": "FOLDER", "name": { "_type": "DV_TEXT", "value": "subfolder 1" }, "archetype_node_id": "openEHR-EHR-FOLDER.generic.v1" }, { "_type": "FOLDER", "name": { "_type": "DV_TEXT", "value": "subfolder 2" }, "archetype_node_id": "openEHR-EHR-FOLDER.generic.v1" } ], "items": [ { "id": { "_type": "HIER_OBJECT_ID", "value": "d936409e-901f-4994-8d33-ed104d46015b" }, "namespace": "my.system.id", "type": "VERSIONED_COMPOSITION" } ] } --- ## Post #5 by @Dileep_V_S In my understanding, the composition is linked to the root folder. If you need to associate compositions with a sub folder, you can create an item array under that also. --- ## Post #6 by @linforest Thanks, @Dileep_V_S. It works as you suggested, and even with "items": [] or without it. --- **Canonical:** https://discourse.openehr.org/t/how-to-associate-a-composition-with-a-folder/876 **Original content:** https://discourse.openehr.org/t/how-to-associate-a-composition-with-a-folder/876