How can I fix this error JSONError: Unexpected token 'N' at



Hi @uyenthanh. Welcome to the Postman Community.

Can you share more details about this error? I can’t find the error anywhere in the screenshots you shared. What were you trying to do when you got this error? Was this error presented in the response tab or in the Postman console? Please provide more details so we can better understand the issue.

You are getting a 404 not found status code.

Instead of a valid JSON response.

The URL is somehow incorrect. Either the initial URL, or the booking ID.

The first thing that you usually do in the tests tab is parse the JSON response into a JavaScript object.

Therefore the code in the tests tab that parse the response will fail due to the 404 status code.

If you are new to Postman and API’s, I would recommend a trip to the Learning Centre first.

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 features. This will also teach you some of the core debugging elements like the response tab, and the console log (which would have helped you diagnose this particular problem).

Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses.