API Response Structure in Postman (original) (raw)

Last Updated : 23 Jul, 2025

Postman, a widely-used API testing tool, is essential for developers to interact with APIs efficiently. Understanding the API response structure in Postman is key to successful testing and debugging. From status codes to response body options, Postman provides a user-friendly interface for analyzing and interpreting API responses.

API Response Structure in Postman

Let's talk about the way the API response is visualized in Postman. Firstly, we have status codes, time section, and size are present.

API Response Structure in Postman

Response structure example

1. Status Code

In the above response structure example, you can see on the right that "200 OK" means the status code.

2. Time

The "524ms" represents time section.

3. Size

The next time, size is present ("1.89 KB" in the image).

4. Body

You can see in the below image we have Pretty, Raw, and Preview sections.

Body

Body section

Pretty:

As you can see in the below pic, the key colors(id, category, ..) are different and the values colors(coffee, true, ..) are different.

Pretty

Overview of preview section

Raw:

Raw

Overview of raw section

Preview:

Preview

Overview of preview section

Visualize:

Visualize section is helpful when we have add some test scripts and also add some graphics to visualize our test. Since, we do not have any test scripts right now for this request, this section is empty.

Visualize

Visualize section

5. Cookies

Cookies are the small files that are sent from the web server to clients (example: Browser). They store necessary information.

**Example: One of the cookies use case shopping website, when we add items to the cart, if you close the browser logged in or logged out. It is the cookie files that stores that particular information( i.e. the items are still added to the cart). This is all possible because cookie files that are being sent from server to client are save in your computer and once you access this browser again on that particular website you can able to fetch the items you have added previously.

So, cookie headeris basically used to send cookie from the client and Set-Cookie is the key, that is used to set the cookie that are returned by the server and then this cookie gets saved in the cookies section of the postman.

If we have any cookies those will be visible here.

Cookies

Cookies Section example

Cookies

Header section when cookies are present

6. Response Headers

The example response header is mentioned below:

Response Headers

Response header example

7. Test Results

It is an important feature of postman that allows us to write test scripts that will run on the response that we received from the server. Tests in Postman are Javascript code that is executed after receiving response.

Example of writing a basic test:

  1. Starts with **pm.test
  2. First parameter: name of the test
  3. Second parameter: A function that contains assertions like **pm response status

Test Results

Test Results Section example

In the above example, the executed example tests are shown.

Conclusion

The Postman API response structure provides a comprehensive view of the interaction between a client and a server. From status codes and response times to various ways of visualizing the response body, it offers essential tools for developers and testers. This structured approach simplifies the debugging process and enhances the overall efficiency of API testing and development workflows.