There are many cases for which a REST API can be developed. One such case is delivery logistics. In the logistics world, many entities play an important role. To know what to implement, you need to know the terminology that's used for logistics. Here, we are going to model a few JSON documents that can be implemented for MongoDB. After going through this section, try to use this schema information as a guide to building a Logistics REST API.
The following six minimal components are essential in any delivery logistics design:
- Sender
- Receiver
- Package
- Payment
- Carrier
- Shipment
Let's look at a schema for each and every component:
- A sender is a person sending the package:
{
_id: ObjectId("5cfe142a7ba402aacb71f710"),
first_name: "Philip",
last_name: "Zorn",
address: {
type: "...