Skip to content

Instantly share code, notes, and snippets.

@Reinoptland
Last active October 30, 2020 11:07
Show Gist options
  • Select an option

  • Save Reinoptland/8474697d5ab0a9adc0f29f630bc350c2 to your computer and use it in GitHub Desktop.

Select an option

Save Reinoptland/8474697d5ab0a9adc0f29f630bc350c2 to your computer and use it in GitHub Desktop.

Webshop routes

  1. As a customer I want to see a list of available products so I know what I can buy

GET /products

  1. As a customer I want to see the products belonging to a specific category, so I can find what I am looking for

GET /categories/:categoryId/products

  1. As a new customer I want to be able to sign up & log in so I can start making an order

Signup: POST /users Login: POST /auth/login

  1. As a customer I want to create a new empty order, so I can start purchasing products

POST /orders (get the userId from the token)

  1. As a customer I add a product to my order, so I can purchase a product

POST /orders/:orderId/products/:productId

  1. As a customer I want to see which products are part of my order, so I know what I am paying for

GET /orders/:orderId -> include Products GET /orders/:orderId/products

  1. As an admin I want to be able to add a new product to the shop

POST /products POST /categories/:categoryId/products

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment