Introduction
Local variables store data temporarily during a single request in Postman. They help keep information handy without affecting other requests.
When you want to save a value to use later in the same request.
When you need to pass data between scripts within one request.
When you want to avoid changing global or environment variables accidentally.
When testing APIs that require temporary tokens or session IDs.
When you want to keep your tests clean and isolated.