# Request body from individual json files - not as iteration data

**URL:** <https://community.postman.com/t/request-body-from-individual-json-files-not-as-iteration-data/23286>\
**Category:** Help Hub\
**Created:** [April 30, 2021, 6:13pm UTC](https://community.postman.com/t/request-body-from-individual-json-files-not-as-iteration-data/23286 "2021-04-30T18:13:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adii](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@adii](https://community.postman.com/u/adii)\
**Post date:** [April 30, 2021, 6:13pm UTC](https://community.postman.com/t/request-body-from-individual-json-files-not-as-iteration-data/23286/1 "2021-04-30T18:13:34Z")

</div>

I have multiple large json payloads that I need to use as raw POST body on my requests. Each payload and response is unique (so are the tests) for each POST.

Can I store these payloads as JSON files in a data folder in my project folder (with the collection and env. variable) and parametrize their path+name to POST body on the request? Is there some approach to achieve this? I could not find any samples anywhere.  
With this approach I will be able to edit my payload json files (when I need to) without modifying the collection itself.

I am not asking how I can use individual key value data from json data files and feed them to the request with {{keyname}} variables in the payload pasted under the Raw tab.

I am also not asking how I can use objects from a json array to feed as iteration data to a collection. I use that in certain other projects I have. I use that by creating a request body variable in the pre-test script and then using that variable in the POST Raw Body. But this is not what I am now asking for.  
pm.environment.set(“requestBody”, JSON.stringify(pm.iterationData.toObject());

My APIs don’t accept form-data File uploads. So I cannot provide the payload json file as form-data.

please advice.

---

<div class="post-metadata">

**Author:** ![jfbriere](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jfbriere/32/8444_2.png) [@jfbriere](https://community.postman.com/u/jfbriere)\
**Post date:** [May 9, 2021, 6:39pm UTC](https://community.postman.com/t/request-body-from-individual-json-files-not-as-iteration-data/23286/2 "2021-05-09T18:39:31Z")

</div>

You could use a node express http server that delivers the static large json files from your data folder.  
Then on each test that need one of the large payloads, do a pm.sendRequest in the Pre-Request Script to fetch the large payload and to initialize a variable with it (pm.variables.set).  
That variable is then used in the request body.
