Authentication
The API uses Laravel Sanctum bearer tokens. Obtain a token via the client-token endpoint, then include it in every request as an Authorization header.
Obtain a Token
| Method | POST |
| URL | /api/v1/auth/client-token |
| Auth | None (this is the authentication endpoint) |
Request body (JSON):
{
"email": "admin@deprixa.com",
"password": "your-password",
"device_name": "My Integration"
}
Response (200):
{
"token": "1|abc123def456...",
"token_type": "Bearer"
}
Using the Token
Include the token in every subsequent request:
curl -H "Authorization: Bearer 1|abc123def456..." \
-H "Accept: application/json" \
https://yourdomain.com/api/v1/shipments
Authenticated User
| Method | GET |
| URL | /api/v1/user |
| Auth | Bearer Token |
| Description | Returns the authenticated user's profile information. |
Public Tracking
This endpoint is public and does not require authentication. Rate limited to 60 requests per minute.
| Method | GET |
| URL | /api/tracking/{tracking_number} |
| Auth | None (public) |
| Rate Limit | 60 requests/minute |
| Description | Returns shipment tracking information including current status and status history. |
Example:
curl https://yourdomain.com/api/tracking/TRK00012345
Shipments
CRUD operations for shipments. All endpoints require Bearer Token authentication.
List Shipments
| Method | GET |
| URL | /api/v1/shipments |
| Scope | shipments.view |
| Description | Returns a paginated list of shipments for the authenticated user's organization. |
Create Shipment
| Method | POST |
| URL | /api/v1/shipments |
| Description | Creates a new shipment. Returns the created shipment with tracking number. |
Get Shipment
| Method | GET |
| URL | /api/v1/shipments/{id} |
| Description | Returns full details of a specific shipment by its ID. |
Update Shipment
| Method | PUT |
| URL | /api/v1/shipments/{id} |
| Description | Updates an existing shipment. Send only the fields you want to change. |
Rates
Get Shipping Quote
| Method | POST |
| URL | /api/v1/rates/quote |
| Scope | rates.quote |
| Description | Calculates shipping rates for a given origin, destination, weight, and service type. Returns available rates and estimated delivery times. |
Customers
List Customers
| Method | GET |
| URL | /api/v1/customers |
| Scope | customers.view |
| Description | Returns a paginated list of customers for the authenticated user's organization. |
Create Customer
| Method | POST |
| URL | /api/v1/customers |
| Scope | customers.create |
| Description | Creates a new customer in the authenticated user's organization. |
Driver Endpoints
These endpoints are restricted to users with the Driver role. Used by the driver mobile experience.
Get Assigned Shipments
| Method | GET |
| URL | /api/v1/driver/assigned-shipments |
| Role | Driver |
| Description | Returns all shipments currently assigned to the authenticated driver. |
Update Shipment Status
| Method | POST |
| URL | /api/v1/driver/update-status |
| Role | Driver |
| Description | Updates the status of an assigned shipment (e.g., Picked Up, In Transit, Delivered). |
Report Location
| Method | POST |
| URL | /api/v1/driver/location |
| Role | Driver |
| Description | Reports the driver's current GPS coordinates for live tracking on the dispatch map. |
Driver Profile
| Method | GET |
| URL | /api/v1/driver/profile |
| Role | Driver |
| Description | Returns the authenticated driver's profile information. |
Locations
Endpoints for geographic data used in dynamic select dropdowns (country, state, city cascading selects).
| Method | URL | Description |
| GET | /api/v1/locations/countries | List all countries |
| POST | /api/v1/locations/countries | Create a country |
| GET | /api/v1/locations/states | List states (filter by country) |
| POST | /api/v1/locations/states | Create a state |
| GET | /api/v1/locations/cities | List cities (filter by state) |
| POST | /api/v1/locations/cities | Create a city |
Warehouse
| Method | URL | Description |
| GET | /api/v1/warehouse/manifests | List warehouse manifests |
| POST | /api/v1/warehouse/manifests | Create a warehouse manifest |
| GET | /api/v1/warehouse/inventory | List inventory items |
| POST | /api/v1/warehouse/inventory/movements | Record an inventory movement |
Endpoint Summary
Complete list of all available API endpoints:
| Method | Endpoint | Auth | Description |
| POST | /api/v1/auth/client-token | None | Obtain bearer token |
| GET | /api/tracking/{tracking} | None | Public shipment tracking |
| GET | /api/v1/user | Token | Authenticated user profile |
| GET | /api/v1/shipments | Token | List shipments |
| POST | /api/v1/shipments | Token | Create shipment |
| GET | /api/v1/shipments/{id} | Token | Get shipment details |
| PUT | /api/v1/shipments/{id} | Token | Update shipment |
| POST | /api/v1/rates/quote | Token | Get shipping rate quote |
| GET | /api/v1/customers | Token | List customers |
| POST | /api/v1/customers | Token | Create customer |
| GET | /api/v1/driver/assigned-shipments | Driver | Driver's assigned shipments |
| POST | /api/v1/driver/update-status | Driver | Update shipment status |
| POST | /api/v1/driver/location | Driver | Report GPS location |
| GET | /api/v1/driver/profile | Driver | Driver profile |
| GET | /api/v1/locations/countries | Token | List countries |
| POST | /api/v1/locations/countries | Token | Create country |
| GET | /api/v1/locations/states | Token | List states |
| POST | /api/v1/locations/states | Token | Create state |
| GET | /api/v1/locations/cities | Token | List cities |
| POST | /api/v1/locations/cities | Token | Create city |
| GET | /api/v1/warehouse/manifests | Token | List manifests |
| POST | /api/v1/warehouse/manifests | Token | Create manifest |
| GET | /api/v1/warehouse/inventory | Token | List inventory |
| POST | /api/v1/warehouse/inventory/movements | Token | Record inventory movement |
Total: 24 endpoints (1 public, 1 auth, 22 authenticated)