Skip to content

Instantly share code, notes, and snippets.

@mamund
Last active December 2, 2021 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamund/a5e073b8f3fa48029d163ad45d0e67f5 to your computer and use it in GitHub Desktop.
Save mamund/a5e073b8f3fa48029d163ad45d0e67f5 to your computer and use it in GitHub Desktop.

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Complete Shopping Profile

Operation Name Description Participants Resource(s) Emitted Events Operation Details Traits
listBooks() List books by category or release date Customer, Call Center Book Books.Listed Request Parameters: categoryId, releaseDate Returns: Books[] read
searchBooks() Search for books by author, title Customer, Call Center Book Books.Searched Request Parameters: searchQuery Returns: Books[] read
addItemToCart() Add a book to the customer's cart Customer, Call Center Cart Item, Cart Cart.ItemAdded Request Parameters: cartId, bookId, quantity Returns: Cart write
removeItemFromCart() Remove a book from the customer's cart Customer, Call Center Cart Item, Cart Cart.ItemRemoved Request Parameters: cartItemId Returns: Cart write
clearCart() Remove all books from the customer's cart Customer, Call Center Cart Cart.Cleared Request Parameters: cartId Returns: Cart write
viewCart() View the current cart and total Customer, Call Center Cart Cart.Viewed Request Parameters: cartId Returns: Cart read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment