# Bolesat Internal Tracking API v1.0 — Preview candidate Official hostname: https://api.bolesat.com (validated Preview, not production yet). Use the canonical /api/v1 routes to avoid redirects. Developer center: https://developers.bolesat.com. Console: https://developers.bolesat.com/console. ## Server-only authentication Set BOLESAT_REDIS_REST_URL and BOLESAT_REDIS_REST_TOKEN as Preview-only secrets for a compatible HTTPS Redis REST store. Fail closed without store. Provision a random 32-byte base64url key prefixed btk_. Keep raw key in consumer server secret only. Store SHA-256 hex of full key as Redis key bolesat:tracking:v1:preview:key:. Value JSON: {"active":true,"platform_id":"bolesat-web","scopes":["track:read","track:bulk","detect:read","carriers:read"],"rate_per_minute":30,"expires_at":UNIX_SECONDS}. Rotate by creating new hash record, migrate consumer, then delete old record. Revoke by deleting or setting active false. Rate is atomic per platform per minute; bulk costs number of unique AWBs. Use a dedicated store and least privileges. Production namespace is separate. ## API GET /api/v1/track?awb=...; POST /api/v1/track/bulk with tracking_numbers array (1–5); GET /api/v1/detect?awb=...; GET /api/v1/carriers; GET /api/v1/health. Bearer required except health. 400,401,403,405,429,503 errors. Tracking availability found, partial, unavailable, upstream_error; format-only detection is not proof. Weight type unspecified if upstream does not verify it. Timestamp without zone remains as supplied. Events use normalized status and original codes; no raw carrier response. Health only checks configuration, not upstream. ## Gemini Register gemini-tools.json functionDeclarations in the server-side Gemini tools configuration. On function call, validate arguments; call the matching API route with Authorization Bearer from server environment, not client or model. Return sanitized JSON as a function response matching the function name; run model again to answer in customer's language. Never invent events or treat unavailable as nonexistent. Never pass secrets, raw customer records, or arbitrary URLs to Gemini. Keep the API key and base URL on the backend. Configure an authenticated user/session rate limit separately on the website. ## Release gates Verify authentication, revocation, rotation, scopes, quota, real single/bulk tracking and protected deployment access before production approval. Carrier catalog currently limited; numeric formats are ambiguous. Existing public tracking routes are unchanged.