I’m new to Postman and using APIs but.. I’ve made a POST API call to get data:
[
{
"oha_c_2": "da7274da-2c3e-4197-994d-b3bcf89f73f0"
}
]
I’m trying to save variable so I could use it in my next API call but it keeps saying variable is undefined.
This is the post-res script I use:
const response = pm.response.json();
console.log(response.oha_c_2);
pm.collectionVariables.set('reference', response.oha_c_2)
I’m sure it’s an easy fix for someone with some experience, any help is appreciated!