Base URL: http://localhost:8000/api/v1
- URL:
/auth/login - Method:
POST - Description: Authenticate admin and receive a JWT token.
- Request (Form Data):
username: stringpassword: string
- Response:
Token{ "access_token": "string", "token_type": "bearer" }
- URL:
/auth/forgot-password - Method:
POST - Description: Request a password reset link to be sent to the admin's email.
- Request Body:
{ "email": "string" }
- URL:
/auth/reset-password - Method:
POST - Description: Reset password using a valid token.
- Request Body:
{ "token": "string", "new_password": "string" }
- URL:
/public/check - Method:
POST - Description: Check parcel status using 3-field verification (Name, Phone, Tracking Suffix).
- Request Body:
ParcelPublicLookup{ "student_name": "string", "phone_number": "string", "tracking_suffix": "string (4 digits)" } - Response:
List[ParcelRead]
Requires Bearer Token
- URL:
/parcels/ - Method:
GET - Description: Retrieve a list of all parcels in the system.
- Response:
List[ParcelRead]
- URL:
/parcels/ - Method:
POST - Description: Add a new parcel to the tracking system.
- Request Body:
ParcelCreate{ "student_name": "string", "phone_number": "string", "tracking_number": "string", "courier_name": "string (optional)", "notes": "string (optional)" } - Response:
ParcelRead
- URL:
/parcels/{id}/collect - Method:
PATCH - Description: Mark a specific parcel id as collected.
- Response:
ParcelRead
Requires Bearer Token
- URL:
/admin/dashboard/stats - Method:
GET - Description: Get summary counts for the dashboard.
- Response:
DashboardStats{ "pending_parcels": 0, "collected_today": 0, "arrived_today": 0, "timestamp": "ISO-8601 string" }
- URL:
/admin/profile - Method:
GET - Description: Get the profile of the currently logged-in admin.
- Response:
AdminRead
- URL:
/admin/profile - Method:
PATCH - Description: Update username, full name, or password.
- Request Body:
AdminUpdate(All fields optional) - Response:
AdminRead
{
"id": 0,
"student_name": "string",
"phone_number": "601...",
"tracking_number": "string",
"courier_name": "string",
"arrived_at": "ISO-8601 string",
"status": "PENDING | COLLECTED",
"collected_at": "ISO-8601 string | null",
"collected_by_name": "string | null",
"notes": "string"
}