0% found this document useful (0 votes)
15 views7 pages

API Endpoint

cdcdcdcdcdcdcdcdcdcđcdcdcdcdc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

API Endpoint

cdcdcdcdcdcdcdcdcdcđcdcdcdcdc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

ĐẠI HỌC KINH TẾ TPHCM

VIỆN CÔNG NGHỆ VÀ ĐỔI MỚI SÁNG TẠO

Backend-Database Report

Group : 7
Class : TI001-K48
Mentor : PhD Nguyễn Thiên Bảo

Thanh pho Ho Chi Minh, Oct 25th 2024


DATABASE SCHEMA

MODEL DATABASE

Xe dù - Ho Chi Minh City delivery service Dataset is a single table dataset which
contains all of the successful orders of Xe dù from the beginning date until the time this
dataset is updated.
Xe dù (Umbrella delivery service) is a startup enterprise in Ho Chi Minh City, Vietnam,
which focus on providing delivery service with agility, cost-effective and oriented
towards people. The dataset was created aiming to provide basic needs for routing
optimization algorithms research, which play a crucial role in the company core value.

Here are the brief description for the column inside the dataset:
Column name type Description

id string Primary key of the order (unique)

UTC
createdAt Order creation date
date

expectedDeliveryTi UTC
Expected delivery date
me date

UTC
deliveredAt Order actual delivery date
date

mdh string Order identifier (unique)

package_name string Name of the package

orderStatus string Success

Address of the sender (Vietnamese address


senderAddress string
format)

senderLat float Sender latitude

senderLng float Sender longitude

Address of the receiver (Vietnamese address


receiverAddress string
format)

receiverLat float Receiver latitude

receiverLng float Receiver longitude

shippingDistance int Distance between sender and receiver


Column name type Description

shipper string Shipper ID

weight float Weight of the package

serviceType string 3h, 5h, luu_kho, ban_tai_nhanh, ban_tai_4h

image string Image url of the package

APIs

1. Create Order

Endpoint: POST /order


Create order and Order detail

Request Body (JSON)

"customer_id": 123,
"product_id": 456,
"quantity": 2,
"address": "789 Warehouse Blvd",
"weight": 5.5,
"shipping_method": "express"
}
{

"order_id": 789, "message":

"Order created successfully"

2. Get Order

Endpoint: GET /orders/{order_id}

Chức năng: Return order detail

"order_id": 789,

"customer_id": 123,

"product_id": 456,

"quantity": 2,

"address": "789 Warehouse Blvd",

"weight": 5.5,

"shipping_method": "express",

"predicted_delivery_time": "2024-09-30T10:00:00Z",
"status": "pending"

3. Order Predict

Endpoint: POST /orders/{order_id}/predict

Chức năng: Use AI model to predict delivery times

Request: Không cần body, chỉ cần order_id.

"order_id": 789,

"predicted_delivery_time": "2024-09-30T10:00:00Z",

"confidence": 0.95

4. Update order status

Endpoint: PATCH /orders/{order_id}


Chức năng: Update order status (e.g deliverd, canceled)

Request Body (JSON):

"status": "delivered"

"order_id": 789,

"status": "delivered",

"message": "Order status updated"

}
5. Predict batch order

Endpoint: POST /orders/batch/predict


Chức năng: Predict many orders

Request Body (JSON):

Reponse:

You might also like