Skip to content

Latest commit

 

History

History
1749 lines (1167 loc) · 18.8 KB

objects.md

File metadata and controls

1749 lines (1167 loc) · 18.8 KB

Objects

This document describes all known JSON objects, internal JavaScript objects, request payloads, response schemas, and data structures used by the GdeBenz frontend.

The documentation has been produced by reverse engineering the official client (vendor/app.js) and observing network traffic.


Table of Contents

  • Station
  • NearbyStation
  • FullStation
  • VoteRequest
  • VoteResponse
  • VTObject
  • RTObject
  • CVTObject
  • Fingerprint
  • NotHereRequest
  • SuggestionRequest
  • SuggestionResponse
  • SearchResult
  • ViewCounter
  • ThanksObject
  • TrustObject
  • CityLiveObject
  • ShareSnapshot
  • ConfigObject
  • UserObject
  • ErrorObject

Station

The basic station object returned by most endpoints.

Example

{
    "osm_id":"268902927",
    "name":"Газпромнефть",
    "brand":"Газпромнефть",
    "lat":55.752418,
    "lon":37.615724,
    "status":"yes",
    "distance_km":1.82
}

Fields

Field Type Required Description
osm_id string Yes OpenStreetMap object id
name string Yes Display name
brand string No Fuel company
lat number Yes Latitude
lon number Yes Longitude
status string No Current station status
distance_km number No Distance from current user

Status values

Possible values observed in client:

Value Meaning
yes Fuel available
queue Queue
low Low fuel
no No fuel

The frontend stores these values inside

ST

Example

ST = {

    yes:{

        l:"Есть топливо",

        c:"#22C55E",

        t:"#4ADE80"

    },

    queue:{

        l:"Очередь",

        c:"#F97316",

        t:"#FB923C"

    },

    low:{

        l:"Мало топлива",

        c:"#FACC15",

        t:"#FACC15"

    },

    no:{

        l:"Нет топлива",

        c:"#EF4444",

        t:"#F87171"

    }

}

Meaning

Property Description
l Localized label
c Main color
t Accent color

NearbyStation

Returned by

GET /api/nearby

Observed example

{
    "osm_id":"268902927",
    "name":"Газпромнефть",
    "status":"yes",
    "distance_km":1.82,
    "confirmations":32,
    "updated":1751734100,
    "fuels_now":"92,95,98,DT"
}

Possible fields

Field Type
osm_id string
name string
lat number
lon number
status string
confirmations integer
confirmationsFresh integer
confidenceBase integer
updated unix timestamp
fuels_now string
limited boolean
freshConflict object
realCount integer
distance_km number

FullStation

The frontend internally extends Station objects.

Observed structure

{
    "osm_id":"268902927",
    "name":"Газпромнефть",
    "brand":"Газпромнефть",
    "lat":55.75,
    "lon":37.61,
    "status":"yes",
    "confirmations":42,
    "confirmationsFresh":37,
    "confidenceBase":94,
    "updated":1751734100,
    "views":312,
    "fuels_now":"92,95,98,DT",
    "limited":false,
    "freshConflict":null
}

Field descriptions

Field Description
confirmations Total confirmations
confirmationsFresh Fresh confirmations
confidenceBase Trust score
updated Last update timestamp
views Number of views
fuels_now Available fuels
limited Fuel limitation warning
freshConflict Recent conflicting report

Fuel grades

Frontend constant

FUEL_GRADES

Observed values

92

95

98

100

DT

LPG

CNG

Used for

  • vote form

  • map filters

  • station cards

  • current availability


Fuel Object

Internally represented as

{
    "92":true,
    "95":true,
    "98":false,
    "100":false,
    "DT":true
}

Example

S.fuel = {

    "92":true,

    "95":true,

    "DT":true

}

Purpose

Stores selected fuel grades before vote submission.


Confirmation Object

Used by confidence UI.

Example

{
    "confirmations":45,
    "confirmationsFresh":31,
    "confidenceBase":96
}

Meaning

Field Description
confirmations Total reports
confirmationsFresh Fresh reports
confidenceBase Trust score from backend

Conflict Object

Represents recent contradictory reports.

Example

{
    "status":"no",
    "ageMin":14
}

Meaning

Someone recently submitted a different station status.

Frontend displays

⚠ Situation may have changed

Limited Object

Example

{
    "limited":true
}

Displayed as

Fuel limits may apply.

VoteRequest

Used by

POST /api/comments

This is the primary request sent when a user submits a fuel report.

Example

{
    "osm_id":"268902927",
    "name":"Газпромнефть",
    "lat":55.752418,
    "lon":37.615724,
    "status":"yes",
    "text":"",
    "fp":"bfa22fd4f8aa9710bc45dd5cbfa32e92",
    "cf":"",
    "vt":"2f8819c09b094bb48d4aa407",
    "cvt":"9d55291b963b052d3567d04d",
    "vlat":55.752521,
    "vlon":37.615839
}

Fields

Field Type Required Description
osm_id string Yes Station OSM identifier
name string Yes Station name
lat number Yes Station latitude
lon number Yes Station longitude
status string Yes Selected status
text string No Additional comment
fp string Yes Device fingerprint
cf string No Cloudflare Turnstile token
vt string Yes Vote token
cvt string No Current vote token
vlat number No User latitude
vlon number No User longitude

VoteResponse

Successful request

HTTP 200

Observed behavior

Frontend updates

  • station status
  • confirmation counter
  • local vote history
  • map marker
  • clusters
  • share dialog

No response body is required.


Vote Error

Possible responses

HTTP 403
{
    "detail":"forbidden"
}

Frontend message

Available only from Russia 🇷🇺

HTTP 409
{
    "detail":"revote_cooldown"
}

Displayed

This station can only be updated every 4 hours.

HTTP 429

Displayed

Too many requests.

VTObject

Returned by

GET /api/vt

Observed response

{
    "vt":"2f8819c09b094bb48d4aa407",
    "ttl":1800
}

Fields

Field Type Description
vt string Vote token
ttl integer Lifetime in seconds

Current implementation

window.__VT

Automatically refreshed every

900 seconds

or

15 minutes

RTObject

Returned by

GET /api/rt

Example

{
    "rt":"06b2295cbf9d79b7ed51490e"
}

Stored as

window.__RT

Header

X-RT: <token>

Refresh interval

600 seconds

or

10 minutes

CVTObject

Temporary confirmation token.

Stored in

window._cvt

Observed object

{
    "osm":"268902927",
    "tok":"9d55291b963b052d3567d04d"
}

Fields

Field Description
osm OSM station id
tok Current vote token

Included only when

window._cvt.osm == osm_id

Fingerprint

Generated by

getFingerprint()

Priority

Method 1

Persistent identifier

localStorage.gas_cid

Generated once

crypto.getRandomValues()

Length

16 bytes

Converted to

32 hexadecimal characters

Method 2

Canvas fingerprint

If gas_cid does not exist.

Canvas draws

  • background
  • text
  • platform
  • CPU count

Collected information

navigator.platform

navigator.hardwareConcurrency

screen.width

screen.height

navigator.language

timezone

The resulting string is hashed using

SHA-256

via

crypto.subtle.digest()

Only first

32 hex characters

are used.

Example

bfa22fd4f8aa9710bc45dd5cbfa32e92

Visitor Object

Constructed before voting.

{
    "fp":"device fingerprint",
    "vt":"vote token",
    "cvt":"confirmation token"
}

Geo Object

Included only when precise location is available.

Example

{
    "vlat":55.75241,
    "vlon":37.61577
}

Conditions

GEO_OK

GEO_PRECISE

!GEO_MANUAL

Maximum distance

300 meters

User Location

Frontend object

USER

Observed properties

{
    "lat":55.75,
    "lon":37.61
}

Additional properties may exist.


Local Vote History

Stored in

localStorage

Key

gas_votes

Example

{
    "268902927":"yes",
    "185497425":"queue"
}

Vote Timestamp Object

Stored in

gas_votes_t

Example

{
    "268902927":1751734100
}

Purpose

Prevents duplicate voting for

4 hours

Runtime State

Frontend keeps current station in

S.active

Typical object

{
    "osm_id":"268902927",
    "name":"Газпромнефть",
    "lat":55.75,
    "lon":37.61
}

This object is referenced by almost every action.

reportStation()

reportNotHere()

submitComment()

confirmCurrent()

shareCurrent()


Internal State Object (S)

The frontend stores almost all runtime information inside a global object named S.

This is the main application state.

Observed structure

S = {

    active: {},

    statuses: {},

    conflicts: {},

    markers: {},

    cluster: {},

    map: {},

    pinMark: null,

    sel: null,

    det: {},

    fuel: {},

    curStatus: null,

    curConf: 0,

    curViews: 0,

    curFuels: "",

}

active

Current selected station.

{
    "osm_id":"268902927",
    "name":"Газпромнефть",
    "lat":55.75,
    "lon":37.61
}

Used by

submitComment()

reportStation()

reportNotHere()

confirmCurrent()

shareCurrent()

renderStatusBlock()

statuses

Dictionary containing station status cache.

Example

{
    "268902927":"yes",
    "157824572":"queue",
    "852741963":"no"
}

Type

Map<osm_id,status>

conflicts

Stores recent conflicting reports.

Example

{
    "268902927":{

        "status":"no",

        "ageMin":14

    }
}

markers

Leaflet marker cache.

Example

S.markers[osm_id]

Contains

Leaflet Marker

Purpose

Avoid recreating map markers.


cluster

Leaflet MarkerCluster instance.

Methods observed

refreshClusters()

map

Leaflet map instance.

Methods observed

getCenter()

setView()

invalidateSize()

on()

off()

addLayer()

removeLayer()

getZoom()

pinMark

Temporary draggable marker.

Created by

pickStartPin()

Removed after

closePick()

sel

Current selected status.

Possible values

yes

queue

low

no

Set by

selectStatus()

det

Additional vote details.

Initially

{}

Filled depending on vote type.

Example

{

    "queue":"20-50",

    "fuel":"95"

}

fuel

Selected fuel grades.

Example

{

    "92":true,

    "95":true,

    "DT":true

}

Used by

composeDetail()

curStatus

Currently displayed station status.

Example

yes

curConf

Current confidence score.

Example

94

curViews

Number of station views.

Example

132

curFuels

Current available fuels.

Example

92,95,98,DT

USER Object

Represents current user location.

Observed object

{
    "lat":55.75,
    "lon":37.61
}

Fields

Field Description
lat Latitude
lon Longitude

GEO Flags

Observed runtime flags

GEO_OK

GEO_PRECISE

GEO_MANUAL

GEO_FRESH

Meaning

Flag Description
GEO_OK Location available
GEO_PRECISE GPS accuracy acceptable
GEO_MANUAL User selected manually
GEO_FRESH Recently updated

Station Suggestion Object (SG)

Frontend keeps station submission form state in

SG

Observed structure

SG={

    lat:null,

    lon:null,

    name:"",

    url:"",

    src:"",

    approx:false,

    busy:false,

    _rv:0,

    _lastResolved:""

}

name

Station name.

Example

Газпромнефть

url

Original source URL.

Supported providers

Yandex Maps

2GIS

lat

Latitude.


lon

Longitude.


approx

Approximate location flag.

Boolean.


busy

Submission in progress.

Used to prevent duplicate requests.


_rv

Internal resolver version.


_lastResolved

Last successfully resolved URL.


Suggestion Request

Sent to

POST /api/station-suggestions

Example

{
    "name":"Газпромнефть",
    "source_url":"https://yandex.ru/maps/...",
    "lat":55.75,
    "lon":37.61,
    "source_type":"map",
    "visitor_id":"fingerprint"
}

Suggestion Check Request

POST /api/station-suggestions/check

Body

{
    "name":"Газпромнефть",
    "source_url":"https://yandex.ru/maps/...",
    "lat":55.75,
    "lon":37.61,
    "source_type":"map",
    "visitor_id":"fingerprint"
}

Suggestion Check Response

Observed

{
    "banned":false,
    "has_block":false,
    "has_pending":false,
    "pending":[],
    "candidates":[]
}

Fields

Field Description
banned User banned
has_block Duplicate station
has_pending Already pending
pending Pending stations
candidates Existing nearby stations

Candidate Object

Returned inside

candidates[]

Observed fields

{
    "hard":true,
    "block":false
}

Additional fields may exist.


Pending Object

Represents unapproved station.

Example

{
    "name":"Газпромнефть",
    "lat":55.75,
    "lon":37.61
}


8. View Object

Represents view statistics for a station.

Example

{
  "osm_id": 268902927,
  "views": 1543,
  "today": 241,
  "last_update": "2026-07-05T17:41:00Z"
}

Fields

Field Type Description
osm_id integer Station identifier
views integer Total views
today integer Views today
last_update string Last statistics update

9. Trust Object

Represents calculated trust information.

Example

{
  "osm_id": 268902927,
  "confidence": 0.91,
  "level": "high",
  "fresh": true
}

Fields

Field Type Description
osm_id integer Station identifier
confidence float Confidence score
level string low / medium / high
fresh boolean Fresh information indicator

10. Report Object

Used when reporting an incorrect station.

Example

{
  "osm_id": 268902927,
  "visitor_id": "8d9c76af..."
}

Fields

Field Type Description
osm_id integer Station identifier
visitor_id string Anonymous visitor fingerprint

11. Station Suggestion Object

Represents a new station submitted by users.

Example

{
  "name": "Gazpromneft",
  "source_url": "https://yandex.ru/maps/...",
  "lat": 55.755,
  "lon": 37.618,
  "source_type": "map",
  "visitor_id": "3bc8df8..."
}

Fields

Field Type Description
name string Station name
source_url string Source map URL
lat float Latitude
lon float Longitude
source_type string map
visitor_id string Anonymous identifier

12. Suggestion Check Response

Returned by:

POST /api/station-suggestions/check

Example

{
  "has_block": false,
  "has_pending": false,
  "banned": false,
  "candidates": [],
  "pending": []
}

Fields

Field Type Description
has_block boolean Duplicate exists
has_pending boolean Pending submission exists
banned boolean User banned
candidates array Duplicate stations
pending array Pending suggestions

13. Suggestion Resolve Object

Returned after coordinates are extracted from a map link.

Example

{
  "lat": 55.755,
  "lon": 37.618,
  "approx": false
}

Fields

Field Type Description
lat float Latitude
lon float Longitude
approx boolean Approximate coordinates

14. Search Result Object

Returned by:

GET /api/search

Example

{
  "osm_id": 268902927,
  "brand": "Rosneft",
  "name": "Rosneft",
  "city": "Moscow",
  "lat": 55.755,
  "lon": 37.618
}

Fields

Field Type Description
osm_id integer Station identifier
brand string Brand
name string Display name
city string City
lat float Latitude
lon float Longitude

15. Share Snapshot Object

Used for social sharing.

Example

{
  "image": "https://cdn.example.com/share/123.png",
  "title": "Gazpromneft",
  "description": "Fuel available"
}

Fields

Field Type Description
image string Snapshot URL
title string Card title
description string Card description

16. Error Object

Common API error response.

Example

{
  "detail": "Too many requests"
}

Fields

Field Type Description
detail string Human-readable error

Object Relationships

Station
 ├── Status
 ├── Fuel[]
 ├── Comment[]
 ├── View
 ├── Trust
 └── Share Snapshot

Comment
 ├── Fingerprint
 ├── Visitor Token
 ├── Status
 └── Fuel[]

Suggestion
 ├── Source URL
 ├── Coordinates
 └── Visitor ID

Primitive Types

Type Description
integer Whole number
float Decimal number
string UTF-8 text
boolean true / false
array JSON array
object JSON object
null Missing value

Coordinate Format

All coordinates use WGS84 decimal degrees.

Example:

{
  "lat": 55.755826,
  "lon": 37.617300
}

Time Format

All timestamps are ISO-8601 UTC.

Example

2026-07-05T18:30:21Z

Identifier Types

Identifier Description
osm_id OpenStreetMap object ID
fp Anonymous fingerprint
vt Visitor token
rt Report token
cvt Comment validation token