Admin API Integration

Admin integrations should use the public gateway, not internal service ports.

Flow

  1. Log in through POST /auth/login.
  2. Read GET /auth/me to choose customer or reseller context.
  3. Send Authorization and tenant headers on every protected request.
  4. Keep pagination, filters, and timestamps explicit.

Example: List Vehicles

curl -sS \
  https://api.outlog.serv.si/api/v1/vehicles \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "X-Customer-Id: $CUSTOMER_ID"

Example: Query GPS

curl -sS \
  "https://api.outlog.serv.si/api/v1/telemetry/gps?vehicle_id=$VEHICLE_ID&from=2026-05-01T00:00:00.000Z&to=2026-05-02T00:00:00.000Z" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "X-Customer-Id: $CUSTOMER_ID"

Error Handling

  • 400: request validation failed.
  • 401: token missing, expired, or invalid.
  • 403: membership, permission, or tenant mismatch.
  • 409: duplicate or conflicting assignment.
  • 429 and 5xx: retry with exponential backoff.