Mock. How to create different flows based on request bodies

How to create a Mock Server that will retrieve different responses based on the request body/request body parameters?
How does the Response Matching/Request Body setting actually work? As I am
getting the following error when trying to use it?

{ "error": {
        "name": "mockRequestNotFoundError",
        "message": "Double check your method and the request path and try again.",
        "header": "No matching requests"    } }

Basically, I need to get different responses by passing in the request body e.g this:

{ "transactionId": "12345" }   /  {   "transactionId": 12345 }

Hey @navigation-cosmona10 :wave:

Welcome to the Postman Community! :postman:

Are you able to share more details about how you have your requests and examples set up?

More details about mock servers can be found on our learning center:

Here’s the section about matching request bodies:

Hey Danny,
I have read the manuals before but could not retrieve different responses for different bodies, the Mock server settings was correct. But the problem is solved now :wink: probably I’ve made some changes in the examples when the collection was already mocked

1 Like

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