Using Postman Runner for a post call with different data

Hello everybody,

Im using Postman to support external parties that want to build an integration between their application and our application.
I managed to use the Postman Runner succesfully by uploading a JSON with a list of guids so that each Post call uses a different guid but with the same result since the body of the call is for every guid the same.
For the next step i also want to make Post calls for a list of guids but with different values in the fields. So different enddates, different reasons for the enddates (these all relate to fields in the application). On this way i will be able to quickly process more data. I just cant figure out how to make this work. I tried to make use of a csv with colums for each field but it doesn’t seem to work.

Example of the body of the Post call:

{
“endDate”: “2023-01-31”,
“endOfEmploymentReason”:
{
“key”: 7
},
“endOfEmploymentDueToIllness”: false,
“createMdvEntry”: false,
“endOfEmploymentReasonTaxAuthorities”:
{
“key”: 4
}
}

This works fine if its for every guid (employment) the same date and reason etc. But if these fields differ per guid how do i make this work?
I tried the community but couldn’t find an article/subject with the information desired. Any help will be greatly appreciated.

If I’m reading this right, you just need a CSV file with three column headers, one for the Guid, one for the Enddate, and another for the Reason.

In the body, you target the header the same as you do for any other variable.

{{guid}}, {{endDate}}, {{reason}}, etc.

If you want the value in a script, then its data.guid, data.EndDate, etc.

Using CSV and JSON Data Files in the Postman Collection Runner | Postman Blog

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.