BookNest developer surface

Testing API

REST endpoints for functional, negative, stateful, concurrency and resilience PoCs.

Execution isolation

Send X-Test-Run-Id on every request. State with different run IDs is completely isolated. Send X-Client-Id to preserve and merge an anonymous cart. The default run is shared-demo.

Endpoints

GET/api/v1/booksCatalogue search, filters, sorting and pagination
GET/api/v1/books/{id}Book details and inventory version
POST/api/v1/auth/registerRegistration validation and duplicate handling
POST/api/v1/auth/loginBearer session and anonymous-cart merge
GET/POST/PATCH/DELETE/api/v1/cartPersistent cart and stock limits
POST/api/v1/promotions/validateValid, expired and unknown codes
GET/POST/api/v1/ordersOrder history and idempotent checkout
POST/api/v1/orders/{id}/cancelCancellation and stock restoration
GET/POST/api/v1/test/scenarioProtected deterministic failure controls
POST/api/v1/test/resetProtected test-run reset

Authentication and errors

Customer operations use a synthetic bearer token returned by login. Test-control operations require X-Test-Admin-Key. Errors use a consistent JSON envelope containing status, code, message, details and trace ID.