You can support this site from as little as $1 a month on Patreon.

The support pays for site hosting and the expansion of this content.

In addition, Patreon Supporters gain access to exclusive online video training courses and ebooks.

Join Now

Buggy API

Buggy API hero image showing the Buggy API ER Model with the headline Break a shopping cart on purpose.

The Buggy API is a small public Shopping Cart practice API mounted at /shop.

It is deliberately buggy by default, so it is useful for practising exploratory API testing, auth checks, business-rule testing, and checkout validation.

Main Workflow

  1. Create a cart with POST /shop/register.
  2. Copy the returned token.
  3. View catalogue products with GET /shop/products.
  4. Add items with POST /shop/carts/{cartId}/items using Authorization: Bearer {token}.
  5. Review a cart with GET /shop/carts/{cartId}.
  6. Checkout with POST /shop/checkout/{cartId} using the same bearer token.

Domain Rules

  • Anyone can view products.
  • Only the cart owner token should allow cart mutation or checkout.
  • Product catalogue data is read-only.
  • Product stock is maintained automatically so at least 10 products have stock greater than zero.
  • Stock maintenance never deletes products.
  • Old carts are pruned so only 100 carts remain in memory.

Useful Links