Like the other services, our OMS needs to be callable publicly. We do that by setting up routes that allow the user, and other services, to call this service. The routes we set up in this section will do this for us.
This service does most of its work behind the scenes and not publicly. For the end user (or consumer), the following two actions are important:
- Submit a new order.
- Retrieve the history of orders.
For an administrator, we need to do the following:
- Get the list of all orders
- Add payment to an order
The following table list the orders:
strong>Path | strong>Parameters | Output/Description | |
/*/orders (Auth required) | POST | Expected Total Order Items | Submits an order from an end-user/consumer |
/*/orders (Auth required) | GET | - | Returns all orders of the user from the JWT |
/*/orders (Auth required, admin level) | GET | - | Returns all users |
/*/orders... |