A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript of a Delivery API
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
This document outlines the endpoints and their functionalities for the Order Management API.
- Method: POST
- Endpoint:
/order
- Description: Create a new order with pickup and dropoff details along with package information.
- Request Body:
{ "dropoff": { "address": "Oudenoord 330", "city": "Utrecht", "country": "Netherlands", "email": "[email protected]", "name": "Name", "zipcode": "1234 AB", "phonenumber": "+31612795443" }, "pickup": { "address": "Oudenoord 330", "city": "Utrecht", "country": "Netherlands", "email": "[email protected]", "phonenumber": "+31612795443", "zipcode": "5678 XZ", "name": "Name" }, "packages": [ { "height": 50, "length": 20, "width": 10, "weight": 50 }, { "height": 10, "length": 10, "width": 10, "weight": 5 } ] }
- Method: PUT
- Endpoint:
/order/:id
- Description: Update the status of an existing order.
- Request Body:
{ "status": "PICKED_UP" }
- Method: GET
- Endpoint:
/order?address="O"&zipcode="1234 AB"
- Description: Search for orders based on partial address and full zipcode.
- Query Parameters:
address
: Partial address to search for.zipcode
: Full zipcode to match.
- Response: Returns the list of orders matching the search criteria.
# unit tests
$ npm run test
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Alaa Kurdi
Nest is MIT licensed.