Commerce Shop API Workflow Lab
Practice real commerce APIs — registration, authentication, products, cart, and orders — every action hits a genuine backend. Verify each response, cross-check it in the Shop UI, and automate the same workflow with Postman or your API test framework.
Key Topics
1. Register a New Account
Create a real account through POST /api/auth/register — this writes to the real users table.
Test Scenario
Enter your own details, or use Fill Sample Data for a ready-made example.
Current Execution
No request sent yet — fill in the form and send to see the real response here.
2. Login
A registered visitor wants to log in. This sends a genuine POST /api/auth/login request and establishes the real httpOnly session cookie used across this entire site.
Not authenticated yet.
Test Scenario
Shared demo credentials are prefilled for quick practice. You can replace them with your own test data before sending.
Password will be omitted from this request.
Current Execution
No request sent yet — select a scenario and send to see the real response here.
Role-Based Access Check
Once signed in, does your session let you reach an admin-only resource? GET /api/admin/dashboard-stats answers with a real 401, 403, or 200.
3. Browse Products
The API route can be working correctly while a specific requested product still does not exist. Compare a collection request, a successful item lookup, and a missing-resource lookup.
View products in Tech Shop ↗ The Tech Shop shows the customer-facing product catalog. Use the scenarios below to inspect the same catalog through the API.
Test Scenario
A known existing product ID is prefilled for quick practice. You can replace it before sending.
This request asks for the product collection, not one specific product.
Current Execution
No request sent yet — select a scenario and send to see the real response here.
Response Body
Not run yet
4. Shopping Cart
Practice authenticated cart requests and compare real 200, 400, 404, and 422 responses. Cart endpoints require a valid signed-in session.
Authentication required
Not signed in. Cart requests require a valid application session — the same real pw_session_token httpOnly cookie used across this site. Sign in once to create that real session.
Authenticated
Test Scenario
Current Execution
No request sent yet — select a scenario and send to see the real response here.
Response Body
Not run yet
5. Checkout / Create Order
Checkout creates an order from your authenticated, server-side cart. It requires a signed-in session, a non-empty cart, and a valid payment card. Card details are fetched live from the real /api/payment-cards.json endpoint — nothing here is guessed.
Authentication required
Not signed in. Checkout requires the same real pw_session_token session used across this site.
Authenticated
Test Scenario
Card IDs come from the real /api/payment-cards.json endpoint used by the Tech Shop checkout.
Complete a successful checkout above to unlock Order Lookup below.
✓ Order created successfully.
Order Lookup
6. Rate Limits & Temporary Failures
Real APIs can temporarily fail or reject requests. See how each failure looks, and how a test should handle it.
Test Scenario
Current Execution
No request sent yet — select a scenario above, then Send Request.
Response Body
Not run yet
7. API Investigation
Investigate each destination below and determine how it actually behaves — you won't know the outcome until you check.
Lab simulation — these are controlled scenarios, and every HTTP response you get back is real.
Portal Directory
Selected Portal
None · Not Checked
Current Execution
No destination investigated yet — pick one from the Portal Directory.
Response Body
Not run yet
8. Status Codes
Status codes tell you whether a request succeeded, failed because of the client, or failed on the server. Here are the codes this lab actually returns.
2xx — Success
3xx — Redirects
4xx — Client Errors
5xx — Server Errors