← API Testing with Postman learning path
API Testing with Postman · Module 6 of 10

Chaining requests and workflows

Build end-to-end API flows.

📖 Key ideas

  1. Chain requests by passing values: login → token → create order → get order.
  2. Save IDs from responses into variables.
  3. Collection Runner runs requests in order.
  4. pm.execution.setNextRequest controls flow.
  5. Clean up test data after flows.
💡 Real-life example: Chaining is a relay race: each request passes the baton (token or ID) to the next.
Request chainingUsing one response in the next request
Collection RunnerRuns a collection in sequence
setNextRequestChanges which request runs next
CleanupRemoving data created by tests