Your request is fine. It’s returning a 200 Ok status.
The error message is related to parsing JSON and is caused by your code in the tests tab. Which you do twice with pm.response.json() and also with JSON.parse.
Does varGystSession exist in your response?
Isn’t it just “gystSession”?
Therefore, it will be one of these lines causing the issues, so the best way to troubleshoot this is to console log these elements before you try and PARSE them.
Pretty sure you don’t need to parse the second time with JSON.parse, and on face value it looks like you have the element name wrong (but as you’ve only posted part of the response, I’m not 100% sure of this). You also need to target the “value” object first, so it would be pm.response.json().value.gystSession.
When you are trying to target elements, you should again use the console log. Target the top element and then add one element at a time to you get to your desired key/value. This way, its easier to spot when you’ve missed an element or spelt a key name wrong.
When posting code, including responses, please use the preformatted text option in the editor. It will stop everything getting aligned to the left, and it will also allow us to copy and paste to reproduce your response in a mock or using Postman Echo.
You’ve got your console log taking up most of the bottom half of the screen.
You can view the body of the response using the GUI like the following (which then allows you to cut and paste).
Using the performatted text option produces the following.
{
"args": {},
"data": {
"@search.facets": {
"State": [
{
"count": 1,
"value": "Michigan"
},
{
"count": 1,
"value": "California"
}
]
},
"value": []
},
"files": {},
"form": {},
"headers": {