I was just buzzing around Postman, sending requests, and found something odd: the API returned 200 OK, but the body screamed error!

Type of testing: Endpoint Testing

Status: code 200

Step to Reproduce (Mock Server):

  1. Create a Mock Server in Postman.
  2. Add endpoint: GET /orders?customerId=123.
  3. Define 3 responses, all with status 200 OK:
    • Success → status: confirmed
    •  Fail → status: error
    • Edge Case 200 OK – Invalid Quantity

Added screenshot of request & response

Success → status: confirmed 

Postman collection showing API endpoint test “orders 200 ok” with success response and query parameter customerId

Fail → status: error

Postman API test showing failed response for orders endpoint with error “Customer not found” and code ERR_CUSTOMER

Edge Case 200 OK – Invalid Quantity

Postman API test showing edge case with invalid quantity (-5) returning error “Invalid quantity” and code ERR_QTY despite 200 OK status.
Postman API response showing error “Invalid quantity” with code ERR_QTY returned with 200 OK status.

Technical Concept:

  • Endpoint testing = validate status code + body + headers.
  • 200 OK doesn’t always mean success.
  • Always test for:
    • Error codes in body
    • Required fields
    • Business rules (like positive quantity)

What This Shows:

  • Status code 200 OK does not always mean success
  • The API may return errors inside the response body
  • You must validate both status code and response content

 Pro Tips:

  • Always check the response body, not just the status
  • Validate error fields even when status is 200
  • Include negative test cases in your endpoint testing
  • Automate checks for status + body consistency

Lesson:

200 OK doesn’t always mean OK. Sometimes it just means: â€œI answered
 but badly.”