Authentication
Every API key is scoped to a single customer. To get a key, contact your Umax Fleet administrator.
Each key has a public key_id and a one-time secret.
Authenticate with either a Bearer token (preferred) or HTTP Basic.
Option A — exchange for a Bearer token
POST /api/v1/auth
Content-Type: application/json
{ "key_id": "umaxk_...", "secret": "..." }
Response 200:
{
"access_token": "...",
"token_type": "Bearer",
"expires_in": 3600,
"scopes": ["account","transactions","locations"]
}
Option B — HTTP Basic on every call
Authorization: Basic base64(key_id:secret)
Endpoints
GET /api/v1/account-details
Return the authenticated customer's profile.
{
"id": "uuid",
"name": "ABC Trucking",
"fee_deduction_per_gallon": 0.10,
"is_active": true,
"created_at": "2024-08-12T10:00:00Z"
}
GET /api/v1/transactions
| Param | Default | Notes |
|---|---|---|
| page | 1 | 1-indexed |
| limit | 50 | max 200 |
| from | - | ISO 8601 datetime, inclusive |
| to | - | ISO 8601 datetime, inclusive |
GET /api/v1/transactions/{id}
Single transaction with carrier-side audit fields.
GET /api/v1/locations
| Param | Default | Notes |
|---|---|---|
| page | 1 | |
| limit | 100 | max 500 |
| brand | - | ta | petro | other |
| state | - | 2-letter state code |
| q | - | substring search on name/city/loc_num |
GET /api/v1/locations/{id}
Full station detail including address, phone, prices, amenities.
Errors
{ "error": { "code": "not_found", "message": "Transaction not found." } }
- 401 missing / invalid Authorization or IP not allow-listed
- 403 token does not have the required scope
- 404 resource not found OR not owned by your customer
- 429 rate limit exceeded (default 120 req/min)
OpenAPI
Machine-readable spec: GET /api/docs/openapi.