-
Notifications
You must be signed in to change notification settings - Fork 0
API Endpoints
Leonid Polechshuk edited this page Jun 13, 2026
·
2 revisions
Base URL: http://localhost:8080
| Method | Endpoint | Description |
|---|---|---|
| GET | /trips |
Get all trips |
| GET | /trips/{id} |
Get trip by ID |
| GET | /trips/status/{status} |
Get trips by status (planned, in_progress, completed) |
| POST | /trips |
Create a trip |
| POST | /trips/{tripId}/assign-order/{orderId} |
Assign an order to a trip |
| PATCH | /trips/{id}/complete |
Complete a trip |
{
"driverPersonalNumber": "9001011234",
"logisticianPersonalNumber": "8505051234",
"licensePlate": "AB12345",
"departureTime": "2026-06-10T08:00:00"
}| Method | Endpoint | Description |
|---|---|---|
| GET | /orders |
Get all orders |
| GET | /orders/{id} |
Get order by ID |
| GET | /orders/status/{status} |
Get orders by status (created, assigned, delivered, cancelled) |
| GET | /orders/pending |
Get unassigned orders |
| POST | /orders |
Create an order |
| PATCH | /orders/{id}/cancel |
Cancel an order |
{
"companyId": "12345678",
"price": 5000.00,
"weight": 2500.00,
"pickupLocation": "London",
"deliveryLocation": "Manchester"
}| Method | Endpoint | Description |
|---|---|---|
| GET | /drivers |
Get all drivers |
| GET | /drivers/{personalNumber} |
Get driver by personal number |
| GET | /drivers/available |
Get drivers with no active trip |
| POST | /drivers |
Add a driver |
{
"personalNumber": "9001011234",
"firstName": "John",
"lastName": "Smith",
"dateOfBirth": "1990-01-01",
"licenseNumber": "DL123456"
}| Method | Endpoint | Description |
|---|---|---|
| GET | /trucks |
Get all trucks |
| GET | /trucks/{licensePlate} |
Get truck by license plate |
| GET | /trucks/available |
Get available trucks |
| POST | /trucks |
Add a truck |
{
"licensePlate": "AB12345",
"vin": "12345678901234567",
"maxWeight": 10000.00
}| Method | Endpoint | Description |
|---|---|---|
| GET | /clients |
Get all clients |
| GET | /clients/{companyId} |
Get client by company ID |
| GET | /clients/{companyId}/orders |
Get all orders of a client |
| GET | /clients/inactive?days=90 |
Get clients with no orders in last N days |
| POST | /clients |
Add a client company |
{
"companyId": "12345678",
"name": "Global Freight Ltd",
"phone": "+441234567890",
"email": "info@globalfreight.com",
"city": "London",
"street": "Baker Street",
"houseNumber": "221B"
}| Method | Endpoint | Description |
|---|---|---|
| GET | /logisticians |
Get all logisticians |
| POST | /logisticians |
Add a logistician |
{
"personalNumber": "8505051234",
"firstName": "James",
"lastName": "Wilson",
"dateOfBirth": "1985-05-05"
}