API changes in this plan

Only the endpoints and schemas this plan adds, changes, or removes. The rest of the Bookstore API is unchanged.
NEW CHANGED REMOVED + added field ~ changed field − removed field
Endpoints
POST/wishlistAdd a book to the wishlistNEW▸

Request body

application/json
schema: WishlistInput

Responses

CodeDescriptionSchema
201Saved to wishlistWishlistItem
401Not signed inError
POST/ordersPlace an orderCHANGED▸

Request body

application/json
schema: OrderInput (+ coupon)

Responses

CodeDescriptionSchema
201Order placedOrder
+409Coupon already usedError
422Empty or invalid cartError
DELETE/books/{id}Remove a bookREMOVED▸
Dropped in this plan. Books are archived, not deleted.
Schemas
WishlistItemobject · 3 propertiesNEW
PropertyTypeRequired
idULIDrequired
book_idULIDrequired
added_atdatetimerequired
OrderInputobject · 2 propertiesCHANGED
PropertyTypeRequired
itemsLineItem[]required
+couponstringoptional
Bookobject · 5 propertiesCHANGED
PropertyTypeRequired
idULIDrequired
titlestringrequired
author_idULIDrequired
price_centsintegerrequired
~isbnstringnow required (was optional)