A small e-commerce flow: browse products, build a cart, apply coupons and check out. Out-of-stock items return 409, invalid coupons 422, expired coupons 410, and checkout honors Idempotency-Key so retries never double-charge.
The Shop API is a checkout: products with real stock counts, carts, and coupons that expire. Stock is decremented on checkout, so the interesting failures happen between adding an item and paying for it — which is precisely the window most e-commerce test suites skip.
Base URL: https://funapi.dev/api/shop/v1 · 9 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
things you do not need
GET /shop/v1/products — List products, filter by categoryGET /shop/v1/products/{id} — Get one productadd, remove, regret
POST /shop/v1/carts — Create an empty cartGET /shop/v1/carts/{id} — Get a cart with its running totalPOST /shop/v1/carts/{id}/items — Add a product (409 when out of stock)DELETE /shop/v1/carts/{id}/items/{productId} — Remove a product from the cartwhere the money pretends to move
GET /shop/v1/coupons/{code} — Validate a coupon (410 when expired)POST /shop/v1/carts/{id}/checkout — Check out (idempotent, coupon-aware)GET /shop/v1/orders/{id} — Get an order