API guide
Rules for clients, errors, and the owner flow call by call: authentication, catalog, localization, garage, odometer, maintenance with every reason code, service events and errors. Section 10 records a run against staging and names the commit each statement was checked on; where versions behave differently, the text says which one does what.
Rendered from docs/public-api-contract.md at commit 8565409 (main). The schema of record is the API reference; production, staging and main differ where Versions says so.
5. Rules for clients
- Ignore unknown fields. Responses gain fields without notice. A client that fails on an unknown field breaks on a normal release.
- Expect new enum values. Every enum may grow: section states, attention levels,
manufacturerResponse,identification, and so on. Map an unknown value to a safe fallback. For example, show an unknown section state as "not available", never as "all clear". - Reason codes are extensible. See §8.
- Ids are opaque UUID-format strings. Do not parse them, derive meaning from them, or sort by them. Store them as strings.
- Branch on
code, never on text.title,detail,displayNameand the regulator texts are for display only. NOT_YET_AVAILABLEis not "nothing wrong". Never present it as all clear. See §7.- Mock ids are not production ids. Fixture ids use the synthetic range
00000000-0000-7000-8000-…. Never persist them beyond a mock build, and clear local caches when switching from mock to a real backend. - Send
Idempotency-Key(a fresh UUID per user action) on the create operations that declare it. Reuse it only for a retry of the same action.
How to build a mock adapter (an HTTP interceptor, a local mock server or generated stubs) is each client's decision and lives in that client's repository.
6. Envelopes and errors
Lists always use one page envelope, even when there is only one page:
{ "data": [], "page": { "nextCursor": null, "hasMore": false } }
Request the next page with ?cursor=<page.nextCursor> (and optionally &limit=, 1–100). Cursors are opaque.
Errors are RFC 9457 application/problem+json, the ProblemDetailsResponse schema:
{ "type": "about:blank", "title": "Conflict", "status": 409, "code": "email_taken",
"detail": "An account with this email already exists.", "instance": "/api/v1/auth/register",
"requestId": "…", "errors": [{ "field": "email", "message": "…" }] }
- Each operation lists its codes per status in
x-error-codes. - Server errors (5xx) never carry a
detail. Show a generic message and logrequestId.
Codes defined today:
| Code | Status | Where |
|---|---|---|
validation_failed | 400 | any operation with input; errors lists each field |
unauthenticated | 401 | any signed-in operation: token missing, expired or invalid (refresh and retry once) |
invalid_credentials | 401 | login |
refresh_token_invalid, session_revoked | 401 | refreshSession: sign in again |
invalid_provider_token | 401 | signInWithGoogle |
forbidden | 403 | a route the caller may not use |
not_found | 404 | unknown id, or another user's resource |
catalog_entry_not_found | 404 | createVehicle with an unknown generation or profile |
email_taken | 409 | register |
account_link_required | 409 | signInWithGoogle (provisional) |
idempotency_in_progress | 409 | a retry while the first request is still running |
model_year_not_covered, profile_not_in_generation, market_contradicts_profile, engine_not_in_generation, in_service_date_without_baseline, in_service_date_in_future | 422 | createVehicle, updateVehicle |
odometer_decreased, recorded_on_in_future | 422 | createOdometerReading |
unknown_item_code, performed_on_in_future | 422 | createServiceEvent |
rate_limited | 429 | register, login, refreshSession (Retry-After header, in seconds) |
service_unavailable | 503 | register, login while Redis is down (the rate limiter fails closed) |
internal_error | 500 | anything unexpected |
10. Owner flow reference, as observed on staging
Everything in this section was run against https://api.staging.rool.am on 2026-10-06, deployed commit 205d1e99, by the suite in test/staging/ (runbook staging-e2e.md; evidence in docs/readiness/staging-e2e-2026-10-06/), not read from code. These are historical results of that run: they describe that staging release, not main as it is now and not production (0697919). A rerun needs a reason. Where a row says observed, it is behaviour the contract does not promise and a client must not depend on. openapi.json stays the schema of record; this section adds what a schema cannot say.
Headers on every call: Accept: application/json, Content-Type: application/json on a body. Signed-in calls add Authorization: Bearer <accessToken>. Staging also needs X-Rool-Staging-Key (mobile-api-connection.md §4a). Production needs neither staging header nor any other gate.
10.1 Authentication
| Call | Request | Success | Errors |
|---|---|---|---|
POST /api/v1/auth/register | { email, password (10 to 128 chars), locale? }; unknown fields are 400 | 201 AuthSession | 400 validation_failed (errors[].field), 409 email_taken, 429 rate_limited |
POST /api/v1/auth/login | { email, password } | 200 AuthSession | 400, 401 invalid_credentials (the same answer for a wrong password and an unknown address), 429 |
POST /api/v1/auth/refresh | { refreshToken } | 200 AuthSession, a new refresh token | 400, 401 refresh_token_invalid (unknown or expired), 401 session_revoked, 429 |
POST /api/v1/auth/logout | bearer, { refreshToken } | 204, no body | 400, 401 unauthenticated |
GET /api/v1/me | bearer | 200 Me | 401 unauthenticated |
PATCH /api/v1/me | bearer, { displayName?, locale? } (en, hy, ru) | 200 Me | 400, 401 |
- Email is case-insensitive: it is stored lower-cased, and registering
A@xaftera@xis 409. - Access token: JWT, valid 15 minutes (
accessTokenExpiresAt). Refresh token: opaque, 60 days from the moment it is issued. Treat both as secrets and as opaque strings. AuthSession.useris the same object asGET /me.emailVerifiedis alwaysfalseuntil email verification exists.Cache-Control: no-storeon register, login and refresh (ROOL-202, PR #26) is inmainsinceead8e10and was on staging205d1e9when the E2E ran. Production runs0697919, which predates it: those answers carry noCache-Controlthere until the next production release. Do not rely on either.
Refresh rotation.
| Situation | Result |
|---|---|
| Refresh with the latest refresh token | 200, new access and refresh token. The old refresh token is now spent. The old access token keeps working until it expires. |
| Refresh with a spent token (a retry, or two devices sharing a token) | 401 session_revoked, and every token of that sign-in dies, including the newest one and its access token (verified: GET /me is then 401). Other sign-ins of the same account are untouched. |
| Two refreshes of the same token at the same time | Exactly one answers 200; the other is 401 session_revoked, and the winner's new tokens are revoked at once. The user has to sign in again. |
| Refresh with a made-up token | 401 refresh_token_invalid, nothing is revoked |
Safe client recovery. There is no grace window (a deliberate gap in authentication.md). The client therefore:
- allows one refresh in flight at a time, per account, in the whole app (a mutex, not a queue of retries);
- writes the new refresh token to secure storage before it uses the new access token;
- after a refresh whose result it did not see (timeout, connection lost after sending), must assume the old token may already be spent. Retrying it will answer
session_revokedand end the sign-in. There is no safe retry; the client shows sign-in. Do not loop; - treats 401
session_revokedand 401refresh_token_invalidas "signed out": clear tokens, keep nothing but the email, show sign-in; - treats a 401
unauthenticatedon an ordinary call as "refresh once, then retry the call once".
Logout. The first logout is 204 and takes effect at once: the access token is 401 unauthenticated immediately, not after 15 minutes, and the refresh token is session_revoked. A second logout with the same (now revoked) access token is 401 unauthenticated, not a second 204: treat 401 on logout as "already signed out". It ends only this sign-in; other devices stay signed in. No logout-everywhere endpoint exists.
Rate limits (per authentication.md): 10 registrations per hour per client address, 5 wrong passwords per account per address per 15 minutes (the 6th attempt is 429, and while limited even the correct password is 429). A 429 always carries Retry-After in seconds. A client behind a shared mobile-carrier address shares the per-address bucket with everyone on it.
10.2 Catalog
All public: no bearer token. Cache-Control: public, max-age=300, stale-while-revalidate=60 and an ETag on lists. A compressing proxy may append -gzip to the ETag it sends: send back exactly the value you received in If-None-Match; an unchanged list is then 304. Your HTTP client must not add Cache-Control: no-cache to that revalidation.
| Call | Query | Returns |
|---|---|---|
GET /api/v1/makes | limit (1 to 100), cursor | page of { id, name } |
GET /api/v1/models | makeId (UUID), paging | page of { id, makeId, name } |
GET /api/v1/generations | modelId, paging | page of { id, modelId, code, name, modelYearFrom, modelYearTo } (modelYearTo null while in production) |
GET /api/v1/vehicle-profiles | generationId, paging | page of { id, generationId, displayName, engine, transmission, drivetrain, market, modelYearFrom, modelYearTo } |
GET /api/v1/generations/{id}/variant-options | none | { generationId, engines: [{ id, label }], transmissions, drivetrains, conditions, markets, scheduleOptions } |
makeId, modelId and generationId are required on their lists (400 validation_failed without). A malformed id is 400 validation_failed; a well-formed id that does not exist is 404 not_found, not an empty page. The chain is make, model, generation, then optionally a profile. A vehicle references a generation (required) and may reference a profile and an engine variant (engines[].id).
10.3 Localization
GET /api/v1/localization/{locale}, public, locale exactly en, hy or ru: 200 { version, strings } with an ETag and Cache-Control: public, max-age=300, stale-while-revalidate=60; 304 on a matching If-None-Match; any other value (de, EN, hy-AM) is 404 locale_not_supported. In main since 13a853e (ROOL-189, PR #20) and on staging 205d1e9; not on production (0697919), where it answers a plain 404 until the next production release. Details: localization.md. A client that cannot get a catalog (404, error, offline) needs a bundled fallback; whether a given client has one is for that client's team to state, this document does not.
10.4 Garage
| Call | Notes |
|---|---|
POST /api/v1/me/vehicles | Idempotency-Key header is required (400 validation_failed without it). Body: generationId, modelYear required; vehicleProfileId, engineVariantId, nickname (40), transmission, drivetrain, severeUse, conditions, market, scheduleOptions, serviceBaseline, inServiceOn, odometerKm optional. 201 Vehicle. |
GET /api/v1/me/vehicles | page of the caller's vehicles |
GET /api/v1/me/vehicles/{id} | 200, or 404 not_found for an unknown id and for another user's id (the two are indistinguishable by design) |
PATCH /api/v1/me/vehicles/{id} | any create field except generationId; 200 Vehicle; 422 model_year_not_covered when the year is outside the generation |
DELETE /api/v1/me/vehicles/{id} | 204; afterwards the vehicle, its maintenance, odometer readings and service events are 404 |
odometerKmon create is accepted (integer, 0 to 2,000,000, kilometres). It is stored as the vehicle's first odometer reading, dated today (server date, UTC), and returned aslatestOdometer. A negative value is 400.- Unknown generation: 404
catalog_entry_not_found. A malformed vehicle id in a path is 404not_found, not 400. identificationisEXACTwhen a profile is set,GENERATION_ONLYotherwise.Idempotency-Key(a UUID per user action, max 128 chars): the same key and body returns the same vehicle with 201, so a retry after a lost response never creates a second car. Observed: the same key with a different body also returns the first vehicle unchanged, with 201, instead of an error. Never reuse a key for a different action.- Unit of every distance in the API: kilometres. Imperial values appear only inside
interval.distance({ value, unit: "MI" }) next to the converteddistanceKm.
10.5 Odometer
POST /api/v1/me/vehicles/{id}/odometer-readings, Idempotency-Key required, body { odometerKm (integer, km), recordedOn (YYYY-MM-DD) } → 201 { id, odometerKm, recordedOn, createdAt }.
- There is no list endpoint and no separate "current" endpoint.
Vehicle.latestOdometer(also insideGET /me/vehicles/{id}) is the reading with the latestrecordedOn, and among readings of the same day the one created last. A reading dated before the current latest one is stored but does not becomelatestOdometer. latestOdometeris not the value the maintenance calculation uses.GET …/maintenancereportsodometerKmas the highest confirmed value across all readings and service-event odometers (§10.6, §10.7). The two can differ.- Rules (all 422
problem+json): a reading lower than an earlier one isodometer_decreased, and so is a reading dated before a reading that has a lower value (chronology is checked both ways); a date after the server's today isrecorded_on_in_future. An equal value is accepted. Dates are server-side UTC days: a phone in Armenia just after midnight local time can be "in the future" for up to four hours. How ROOL should treat the owner's local calendar date is an open question; today the API compares the date it is sent with the server's UTC day and does not adjust it. - The check runs against every stored reading, not only the latest one or its neighbours: any reading dated on or before the new one must not be higher, and any reading dated after it must not be lower. On the same day a lower value than an existing reading is
odometer_decreased; an equal or higher value is accepted. If bothrecorded_on_in_futureandodometer_decreasedapply,recorded_on_in_futureis returned. - A 422 is an ordinary problem+json answer with the standard fields (
type,title,status,code,detail,instance,requestId) and noerrors[]array:errors[]is only on 400validation_failed. Branch oncode. - Retrying with the same key returns the same reading (looked up first, per vehicle, before any validation). Only a 201 is stored, so a 422 is not replayed: the same key sent again is validated again.
10.6 Maintenance
GET /api/v1/me/vehicles/{id}/maintenance → 200 VehicleMaintenance:
{ "vehicleId": "…", "asOf": "2026-10-06", "odometerKm": 52000, "state": "AVAILABLE",
"fixtureData": true, "questions": [{ "dimension": "TRANSMISSION", "options": [], "itemsWaiting": 1 }],
"unavailableItemCodes": [], "items": [ { "itemCode": "ENGINE_OIL", "action": "REPLACE",
"applicability": "APPLIES", "due": { "state": "NOT_DUE", "distanceRemainingKm": 11570,
"monthsRemaining": 5, "dueAtOdometerKm": 63570, "dueOn": "2027-04-01", "reasons": [] },
"interval": { "basis": "WHICHEVER_FIRST", "distanceKm": 12070, "months": 6 },
"lastService": { "serviceEventId": "…", "performedOn": "2026-10-01", "odometerKm": 51500, "action": "REPLACE" },
"sources": [{ "title": "…", "page": 511 }] } ] }
| Field | Meaning |
|---|---|
state | AVAILABLE, NOTHING_APPLIES (published data exists for the model and none reaches this car) or NOT_YET_AVAILABLE (items is []; unavailableItemCodes lists what ROOL cannot yet say). All three are HTTP 200. A car with no published schedule is not an error. |
fixtureData | true means the schedule is test data (staging only). Production refuses fixtures. Never present a fixtureData: true schedule as real. |
due.state | NOT_DUE, DUE_SOON, OVERDUE, UNKNOWN_LAST_SERVICE, NEEDS_VEHICLE_INFO, NO_FIXED_INTERVAL, NOT_SCHEDULED. The enum may grow; map unknown values to "not available". OVERDUE and DUE_SOON are defined in openapi.json and are not exercised by the staging fixture. |
odometerKm (top level) | The highest confirmed value across odometer readings and service-event odometers, in km; null when there is none. Not the same as Vehicle.latestOdometer (§10.5). |
due.distanceRemainingKm, dueAtOdometerKm | kilometres; null when the last service has no odometer, or the state is unknown. |
due.monthsRemaining, dueOn | whole months and the calendar date; null when unknown. |
UNKNOWN_LAST_SERVICE | no service event recorded for the item: every due field is null, lastService is null, reasons is [{ code: "NO_SERVICE_RECORD" }]. Ask the owner when it was last done. |
NEEDS_VEHICLE_INFO | the item depends on a fact the owner has not given (reasons[0].params.facts, e.g. ENGINE); questions lists the choices. |
applicability | APPLIES, or MAY_APPLY with applicabilityReasons (e.g. ENGINE_UNKNOWN when no engine variant is set). |
The staging fixture covers one generation, Nissan Rogue T32 (engine QR25DE). Every other generation answers NOT_YET_AVAILABLE. Production has no published maintenance at all as of 2026-10-06 (the catalog is empty).
10.6.1 Reason codes in maintenance responses
Unlike the rest of §10, this subsection was read from the code, not observed on staging: the emission sites in src/modules/maintenance/domain/ (applicability.ts, due.ts, schedule.ts) at main 00d3bbe (which includes ROOL-201), with each shape also checked by a local integration run at the earlier main 50e70a2 and the domain unit tests re-run on the current candidate. Not all of it is deployed. Staging 205d1e9 and production 0697919 run the code of 50e70a2: they still send MARKET_DIFFERS (below); main no longer does. Reason is a provisional schema, and so is this list.
Every reason is { "code": string, "params": object }. params is always an object, {} when the code has none. They appear in two places:
items[].applicabilityReasons, only on items whoseapplicabilityisAPPLIESorMAY_APPLY;items[].due.reasons.
Reasons that explain why a rule does not reach the car (a model year outside the schedule, an engine or gearbox that differs, severe use or a condition that was not selected, and, on main, a car whose market the schedule does not support) are never sent: that rule is absent from items, so no code exists for them on the wire. Do not rely on the order of reasons in a list or on a code being present: the same item can carry several.
Units in params: distances are whole kilometres (km), rounded, whatever unit the manual printed (the printed unit is in interval.distance); months are whole months; dates are YYYY-MM-DD. engines holds the engine labels as printed (for example QR25DE), not ids; the ids are in questions[].options[].value.
applicabilityReasons:
| Code | params | Sent when |
|---|---|---|
MODEL_YEAR_COVERED | modelYear int, from int, to int or null (open end) | Always, first: the car's year is inside the schedule |
SEVERE_USE_SELECTED | none | A severe-use schedule, and the car has severeUse: true |
CONDITION_DECLARED | condition string (condition code from getVariantOptions) | A condition-specific schedule, and the owner declared that condition |
SCHEDULE_OPTION_SELECTED | option string (option code) | The car's scheduleOptions contains this schedule's option |
SCHEDULE_OPTION_UNKNOWN | option string | The schedule belongs to an option and the car selected none: MAY_APPLY, a SCHEDULE_OPTION question |
MARKET_UNKNOWN | scheduleMarkets string[] (alpha-2 or EU) | The schedule is limited to markets and the car's market is null: MAY_APPLY, a MARKET question |
MARKET_DIFFERS | scheduleMarkets string[], vehicleMarket string | Only on staging 205d1e9 and production 0697919, until their next release; main (ROOL-201) does not send it. The car's market is outside the schedule's: MAY_APPLY, the item is kept with a computed due state. On main the same car gets no item from that schedule (internally NOT_APPLICABLE / MARKET_NOT_SUPPORTED, never sent), no countdown, and, if nothing else applies, state NOTHING_APPLIES; a car whose market is unknown is still asked (MARKET_UNKNOWN, MAY_APPLY, no countdown) |
ENGINE_UNKNOWN | engines string[] | The schedule is limited to engines and the car has no engineVariantId: MAY_APPLY, an ENGINE question |
ENGINE_NAMED | engines string[] | The car's engine is one of the schedule's |
TRANSMISSION_UNKNOWN, TRANSMISSION_NAMED | transmissions string[] (MANUAL, AUTOMATIC, CVT, DCT, SINGLE_SPEED) | As for the engine, on the car's transmission |
DRIVETRAIN_UNKNOWN, DRIVETRAIN_NAMED | drivetrains string[] (FWD, RWD, AWD, FOUR_WD) | As for the engine, on the car's drivetrain |
IF_EQUIPPED | none | An if-equipped schedule that the car's stated variant does not settle: MAY_APPLY |
due.reasons:
| Code | params | Sent when |
|---|---|---|
VEHICLE_INFO_NEEDED | facts string[], any of ENGINE, TRANSMISSION, DRIVETRAIN, MARKET, SCHEDULE_OPTION (order not significant) | due.state is NEEDS_VEHICLE_INFO; the only reason then. Lists what this rule waits on, so it can be shorter than questions. The names match questions[].dimension |
NO_SERVICE_RECORD | none | UNKNOWN_LAST_SERVICE: no event and no SINCE_NEW baseline. Also appended to a condition-based item with a backstop and no starting point |
NOT_SCHEDULED_BY_MANUFACTURER | none | NOT_SCHEDULED: the manufacturer prints no scheduled replacement |
FIRST_SERVICE_ONLY_DONE | none | NOT_SCHEDULED: a first-service-only schedule that is already done; ROOL does not invent a repeat |
INSPECTION_STANDS_IN | none | The last covering event was an INSPECT standing in for a REPLACE item |
COUNTING_FROM_NEW | inServiceOn date or null | No event, and the car's serviceBaseline is SINCE_NEW: counting from delivery at 0 km |
FIRST_SERVICE_INTERVAL | none | The first-service interval is used instead of the repeat interval |
CONDITION_BASED | none | The manufacturer says "by condition" (the car's monitor decides) |
BACKSTOP | km int or null, months int or null | A condition-based item with a stated outer limit |
SERVICE_ODOMETER_UNKNOWN | none | The distance half cannot be counted: the service event has no odometerKm |
ODOMETER_UNKNOWN | none | The distance half cannot be counted: the car has no odometer value at all |
IN_SERVICE_DATE_UNKNOWN | none | The time half cannot be counted: SINCE_NEW without inServiceOn |
DISTANCE_REMAINING | km int, 0 or more | The distance half was counted, not yet due |
DISTANCE_OVERDUE | km int, how far past, rounded to whole km (so a few hundred metres past shows 0) | The distance half was counted, past due |
MONTHS_REMAINING | months int, 0 or more; dueOn date | The time half was counted, not yet due |
MONTHS_OVERDUE | months int, 1 or more, how far past; dueOn date | The time half was counted, past due |
Example, as emitted for the Rogue T32 FIXTURE schedule (a 2018 car with no engine set, then a 2016 QR25DE with an oil change recorded at 51,500 km and an odometer of 52,000 km; items abridged to their reasons):
{ "itemCode": "ENGINE_OIL", "applicability": "MAY_APPLY",
"applicabilityReasons": [ { "code": "MODEL_YEAR_COVERED", "params": { "modelYear": 2018, "from": 2014, "to": 2019 } },
{ "code": "ENGINE_UNKNOWN", "params": { "engines": ["QR25DE"] } } ],
"due": { "state": "NEEDS_VEHICLE_INFO",
"reasons": [ { "code": "VEHICLE_INFO_NEEDED", "params": { "facts": ["ENGINE"] } } ] } }
{ "itemCode": "ENGINE_OIL", "applicability": "APPLIES",
"applicabilityReasons": [ { "code": "MODEL_YEAR_COVERED", "params": { "modelYear": 2016, "from": 2014, "to": 2019 } },
{ "code": "ENGINE_NAMED", "params": { "engines": ["QR25DE"] } } ],
"due": { "state": "NOT_DUE",
"reasons": [ { "code": "DISTANCE_REMAINING", "params": { "km": 7547 } },
{ "code": "MONTHS_REMAINING", "params": { "months": 5, "dueOn": "2027-04-01" } } ] } }
Unknown codes. The list grows additively. A client that meets a code it does not know ignores it and shows the wording that fits the item's applicability and due.state (which are the enums that carry the verdict). It never shows an unknown reason as "all clear", and it ignores params keys it does not know. ENGINE_UNKNOWN, ENGINE_NAMED and MARKET_DIFFERS also appear in the intelligence list in §8 (for maintenance, MARKET_DIFFERS only on the deployed releases, see its row) with different params (engineCodes, engineCode, sourceMarket). That list is not served yet; the shapes above are the only ones sent today, and a client must key its parsing on the endpoint, not on the code alone.
10.7 Service events
POST /api/v1/me/vehicles/{id}/service-events, Idempotency-Key required:
{ "itemCode": "ENGINE_OIL", "action": "REPLACE", "performedOn": "2026-10-01",
"odometerKm": 51500, "note": "optional, max 500" }
→ 201 { id, itemCode, action, performedOn, odometerKm, note, createdAt }. action is REPLACE, INSPECT or SERVICE (anything else is 400); itemCode must be a code ROOL knows (422 unknown_item_code); performedOn in the future is 422 performed_on_in_future; odometerKm is optional (without it only the time interval can count: the item is NOT_DUE with reason SERVICE_ODOMETER_UNKNOWN and dueAtOdometerKm: null).
- Recalculation is synchronous. The next
GET …/maintenancealready reflects the event:dueAtOdometerKm = event.odometerKm + interval.distanceKm,distanceRemainingKm = dueAtOdometerKm − latest odometer,dueOn = performedOn + interval.monthscalendar months. Verified exactly on staging (51,500 + 12,070 = 63,570; 2026-10-01 + 6 months = 2027-04-01). GET …/service-eventsis a page ordered byperformedOn, newest first.DELETE …/service-events/{eventId}→ 204; the item returns toUNKNOWN_LAST_SERVICE. A second delete is 404.- Duplicates. The same
Idempotency-Keyreturns the same event. The same body with a new key creates a second event: the backend does not detect duplicates by content. - A service event's
odometerKmis not checked against, and does not create, an odometer reading: an event at 60,000 km on a car whose latest reading is 50,000 km is accepted andlatestOdometerstays 50,000. Submit the reading separately. - It does count as a confirmed odometer value for maintenance: in that example
GET …/maintenancereportsodometerKm: 60000and computes distances from it, whilelatestOdometerstill says 50,000. A later reading of 55,000 is still accepted by the odometer check, which looks at readings only, and does not lower the maintenanceodometerKm. (Read fromGarageRepository.highestOdometerMand reproduced locally onmain50e70a2.) - Two routes are in
openapi.jsonand not served (x-implemented: false; their contract controllers are not mounted):GET /api/v1/me/vehicles/{vehicleId}/intelligence(getVehicleIntelligence) andGET /api/v1/vehicle-profiles/{profileId}/intelligence(getProfileIntelligence). Both answer 404not_foundtoday (staging, 2026-10-06). They are part of the ROOL-99 pre-beta contract (recalls and known issues); the server side is ROOL-93 (Phase F, backlog) and nothing is published for them yet. Beta scope lists Known Issues / Recalls as Should, "only with reliable data coverage, otherwise hidden" (Beta-v1-Scope §19), so a client is expected to hide the section while the route is unavailable (that is the agreed scope; whether an app does so is for its team to state). It does not block the rest of the owner flow.
10.8 Errors
Application errors are RFC 9457 application/problem+json with type (always about:blank), title, status, code, detail (absent on 5xx), instance, requestId and, for 400, errors: [{ field, message }]. Every problem keeps the field set above; branch on code.
| Status | When | code |
|---|---|---|
| 400 | body or query fails validation (unknown field, wrong type, missing Idempotency-Key) | validation_failed |
| 401 | no, malformed, expired or revoked access token | unauthenticated |
| 404 | unknown route under /api/v1 | not_found |
| 404 | another user's resource | not_found (same as unknown) |
| 409 | duplicate email | email_taken |
| 429 | rate limit | rate_limited + Retry-After |
Not in problem+json. These come from the edge, not the application:
| Where | What the client sees |
|---|---|
Staging without or with a wrong X-Rool-Staging-Key | 404, empty body, no content type, on every path |
/health/ready, /internal/* on any hostname | 404, empty body (never routed publicly) |
| Request body over 1 MB | 413, empty body |
| Plain HTTP to production | 308 redirect to HTTPS (to any other host, 404) |
Handle "404 with an empty body" as "wrong environment or missing key", not as "not found".
10.9 Ownership
Two disposable accounts were used: the second cannot list, read, update, delete, read maintenance or service events of, submit odometer readings to, or create service events on the first account's vehicle. All answer 404 not_found, and the first account's data is unchanged.