# 08. API Documentation

Base URL:

```text
http://localhost:5000/api
```

## User API

| Method | Endpoint | Description |
| --- | --- | --- |
| POST | `/users/register` | Create a user account |
| POST | `/users/login` | Login user |
| POST | `/users/recover-password` | Recover password |
| POST | `/users/logout` | Logout user |
| GET | `/users/session` | Get current session user |

## Supplier API

| Method | Endpoint | Description |
| --- | --- | --- |
| POST | `/suppliers` | Insert supplier |
| GET | `/suppliers` | Get suppliers for display, dropdowns, and reports |

## Shipment API

| Method | Endpoint | Description |
| --- | --- | --- |
| POST | `/shipments` | Insert shipment |
| GET | `/shipments` | Get shipments |
| PUT | `/shipments/:id` | Update shipment |
| DELETE | `/shipments/:id` | Delete shipment |

## Delivery API

| Method | Endpoint | Description |
| --- | --- | --- |
| POST | `/deliveries` | Insert delivery |
| GET | `/deliveries` | Get deliveries |
| PUT | `/deliveries/:id` | Update delivery |
| DELETE | `/deliveries/:id` | Delete delivery |

