Reverse-engineered fuel-price submission used by the public frontend.
Users can report current fuel prices per station. Prices are entered per fuel grade, validated client-side against a configured range, then submitted via POST /api/price.
POST /api/price
Content-Type: application/json
{
"osm_id": "268902927",
"fp": "<fingerprint>",
"prices": { "92": 55.9, "95": 60.4, "ДТ": 62.0 },
"vt": "<vote token>",
"cvt": "<cvt token>"
}| Field | Condition | Meaning |
|---|---|---|
osm_id |
always | Station OSM id |
fp |
always | Visitor fingerprint (Zt()) |
prices |
always | Map of fuel grade → price (RUB/L) |
vt |
always | Vote token (window.__VT) |
cvt |
window._cvt.osm === osm_id |
Comment/onsite token |
Input for a grade is accepted only if:
value >= cfg.prices.min && value <= cfg.prices.max // default 40..250
- Comma or dot decimals allowed (
"55,9"→55.9). yb()returns the accepted prices map rounded to 2 decimals, ornullif none valid.gb()returns the list of grades that were filled but rejected (emptynull/""values are skipped).
Fuel grades iterated (sn) include 92, 95, 98, 100, ДТ.
| Status | Meaning | Client handling |
|---|---|---|
200 |
Accepted (possibly partial) | May include price_rejected[] |
403 |
Not allowed | "Цена принимается только на открытой карточке" |
409 |
No recent vote | "Сначала отметьте эту заправку" / нужна отметка за последние 12 часов |
On partial rejection the response includes:
{
"price_rejected": [
{ "g": "95", "lo": 45, "hi": 65 }
]
}g = grade, lo/hi = allowed range. Client builds messages like АИ-95 — от 45 до 65 ₽ and keeps the accepted grades for resubmission.
Own reported prices are cached under localStorage["gas_myprice"]:
{
"268902927": { "prices": { "92": 55.9 }, "g": ["92"], "t": 1699999999, "edited": 1 }
}| Field | Meaning |
|---|---|
prices |
Accepted prices map |
g |
Grades list |
t |
Timestamp (Dx(0)) |
edited |
1 if manually edited |
All information was obtained from the publicly distributed JavaScript bundle. No server-side source code or private implementation details are included.