# Sending bulk data to post to API for volume testing

**URL:** <https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [March 26, 2019, 6:34pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713 "2019-03-26T18:34:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesst9](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@jamesst9](https://community.postman.com/u/jamesst9)\
**Post date:** [March 26, 2019, 6:34pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/1 "2019-03-26T18:34:29Z")

</div>

Hi,

I’m trying to test 1000 records hitting the API I developed, but it’s not reading anything from the CSV file I made with the data. I don’t have any pre-request script logic happening. If there’s something I need to have where it goes and finds the first line of data and then loops back through the consecutive other pieces of data, then I would like to know.

Thanks!

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [March 27, 2019, 6:52am UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/2 "2019-03-27T06:52:01Z")

</div>

@jamesst9 Could you share some insights on the following:

- What is the structure of the CSV file?
- How exactly does your request look like?
- Are you using the CSV file as a datafile in collection runner?
- Are you familiar with the concept of [data files usage inside collection runner](https://learning.getpostman.com/docs/postman/collection_runs/working_with_data_files/)?

---

<div class="post-metadata">

**Author:** ![jamesst9](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@jamesst9](https://community.postman.com/u/jamesst9)\
**Post date:** [March 27, 2019, 1:12pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/3 "2019-03-27T13:12:21Z")

</div>

1. It has the property names on the first line followed by the values beneath it. This is for receiving health insurance leads

2. To start, the api receives data, whether it’s in xml or json format and deserializes them into the respective properties.

That’s how it gets it.

1. Yes I’m trying to use it as the data file, but it is returning nothing at all.
2. Yes I’ve mulled over this page for hours. When I try to import as a collection file, it returns an error. My preview data looks similar to the example in collection runner. I feel as though I need something in the pre-request script, but I’m not sure what.

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [March 27, 2019, 1:22pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/4 "2019-03-27T13:22:45Z")

</div>

Can you share with me the request where you’re using the data variables?  
A screenshot would help.

Are you using it in the request body/query param/headers?

For eg. this is how you can use it in the query params:  
 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/b/b3f4956601bd68320f3feb72bd745741a3762b97.png)

---

<div class="post-metadata">

**Author:** ![jamesst9](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@jamesst9](https://community.postman.com/u/jamesst9)\
**Post date:** [March 27, 2019, 1:32pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/5 "2019-03-27T13:32:24Z")

</div>

I’m getting it from the request body. My url looks like this: [http://localhost:63993/Post/Post](http://localhost:63993/Post/Post)

---

<div class="post-metadata">

**Author:** ![jamesst9](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@jamesst9](https://community.postman.com/u/jamesst9)\
**Post date:** [March 27, 2019, 1:36pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/6 "2019-03-27T13:36:19Z")

</div>

I’ve tried converting the data to json and putting it into the body of the postman call, but my code only handles one entry at a timen. I would assume that you wouldn’t need it though if you import a file for the collection runner.

---

<div class="post-metadata">

**Author:** ![jamesst9](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@jamesst9](https://community.postman.com/u/jamesst9)\
**Post date:** [March 27, 2019, 2:55pm UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/7 "2019-03-27T14:55:09Z")

</div>

I figured it out. I needed to have a json example in the body and have the endpoints in brackets for them to point to it.

```
{
"phone": "{{phone}}",
"address1": "{{address1}}",
"address2": "{{address2}}",
"city": "{{city}}",
"State": "{{state}}",
"firstname": "{{firstname}}",
"lastname":"{{lastname}}",
"vendorname": "{{vendorname}}",
"password": "{{password}}",
"vendorid": "{{vendorid}}",
"leadcost": "{{leadcost}}",
"campaignid" : "{{campaignid}}",
"sourceipaddress" : "{{sourceipaddress}}",
"sourceurl" : "{{sourceurl}}",
"email" : "{{email}}",
"county" : "{{county}}",
"zip" : "{{zip}}",
"contacttime" : "{{contacttime}}",
"clientipaddress" : "{{clientipaddress}}",
"clientsessionid" : "{{clientsessionid}}",
"clientbrowser" : "{{clientbrowser}}",
"externalleadid" : "{{externalleadid}}",
"callconsent" : "{{callconsent}}",
"smsconsent" :"{{smsconsent}}",
"text" : "{{text}}",
"url" : "{{url}}",
"coveragetype" : "{{coveragetype}}",
"currentcompany" : "{{currentcompany}}",
"currentlyinsured": "{{currentlyinsured}}",
"qualifyinglifeevent" : "{{qualifyinglifeevent}}",
"qualifyinglifeeventdate" : "{{qualifyinglifeeventdate}}",
"deniedcoverage" : "{{deniedcoverage}}",
"lostcoverage" : "{{lostcoverage}}",
"pregnant" : "{{pregnant}}",
"treated" : "{{treated}}",
"hospitalized" : "{{hospitalized}}",
"prescriptionmedications" : "{{prescriptionmedications}}",
"majorconditions" : "{{majorconditions}}",
"householdincome" : "{{householdincome}}",
"selfemployed" : "{{selfemployed}}",
"notes" : "{{notes}}",
"gender" : "{{gender}}",
"birthdate" :"{{birthdate}}",
"height" : "{{height}}",
"weight" : "{{weight}}",
"tobacco" : "{{tobacco}}",
"campaignname" : "{{campaignname}}",
"dialerstrategy" : "{{dialerstrategy}}",
"dialerpriority" : "{{dialerpriority}}",

```

}

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [March 28, 2019, 5:02am UTC](https://community.postman.com/t/sending-bulk-data-to-post-to-api-for-volume-testing/4713/8 "2019-03-28T05:02:25Z")

</div>

Yes, that’s how you use variables in the request body.  
Great!
