How can I use response variable in other request

Problem : Hello I want to use response variable in the next request but problem is that I use 1 request in which I use Multiple hit (With use of CSV) and for each hit I get response and I want to use that response data in other request.

For Ex: Request 1 :

{
  "structure_type": "Individual",
  "structure_name": "{{structure name}}",
  "isActive": true,
  "is_pf_cal_gross": false
}

Response :

{
    "structure_id": 0,
    "success": false,
    "message": "",
    "validationErrors": [
        ""
    ],
    "responsedata": null,
    "responseCode": 0,
    "responseInfo": ""
}

Note : I want to use Structureid(From response into Request No 2)

Request 2 :

{
  "masterHeadsId": [1,2,3,4],
  "payStructureId": "{{structure_id}}"
}

Any help will be appreciated.

This type of activity is covered in the Postman Learning Centre.

If you are new to Postman, then I would suggest a visit to the Learning Centre.

Overview | Postman Learning Center

Including the Postman Training links under “Resources”.

image

I would recommend the “Galaxy APIs 101” course first as it gets you used to the application\GUI features.

Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses. It includes defining and using variables from responses.

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