Skip to content

Internal endpoints

xavier edited this page Aug 15, 2026 · 3 revisions

Volvo playground docs

Describes any unique additional API endpoints. Most of them are in /internal/*

Built in api keys:

  • vcc_api_key
  • all_values
  • vcc_api_key_Oauth2

/internal/APIKey

This GET endpoint creates a new API key

{"message":<api_key/str>,"description": f"THIS IS INTERNAL API/API key generated successfully"}

/internal/addCar

This POST endpoint creates a new Car. Header:

  • vcc-api-key the api key created or the ready scenario key Body:
  • VIN string (Use a dummy/simulated VIN for privacy)
  • attributes a list of attributes (door status, engine status...) to be change. Can be empty
  • values a list if values of changed attributes (it is not validated so your values could be not correct)

info: attribute and values length should be the same

/internal/update

This POST endpoint updates a specific car attributes. Header:

  • vcc-api-key the api key created or the ready scenario key Body:
  • VIN string
  • attributes a list of attributes (door status, engine status...) to be change.
  • values a list if values of changed attributes (it is validated. It means that only valid values for that attributes are updated)

info: there is additional attrbute nextInvoiceStatus it force the next invoice status ("" means auto mode)

/internal/status/ws

Websocket on start sends all data about the car then sends data only of changed attributes. Query:

  • VIN VIN of virtual vehicle you want to monitor
  • key api key

/internal/status

This GET endpoint all data about the car. Header:

  • VIN VIN of virtual vehicle you want to monitor
  • key api key

/internal/oauth2

This GET endpoint sends all information about Oauth2 settings header:

  • vcc_api_key api key with enabled Oauth2
{
  "client_secret": <str>,
  "code": <str>,
  "access_token": <str>,
  "refresh_token": <str>,
  "token_type": <str>,
  "expires_in": 3599, # doesn't change and doesnt work
  "redirect_uri": <str> # if nothing then all redirects are alowed. This examptions is made for testing and doesnt exist in volvo api
}

/internal/oauth2/deactivate

This POST endpoint disable Oauth2 flow for provided API key header:

  • vcc_api_key api key with enabled Oauth2
{
  "message": "OAuth2 deactivated successfully"
}

/internal/oauth2/regenerate

This POST endpoint creates new access and refresh tokens header:

  • vcc_api_key api key with enabled Oauth2
{
  "access_token": <str>,
  "refresh_token": <str>,
  "token_type": "Bearer", #static
  "expires_in": 3599 #static
}

/internal/oauth2/activate

This POST endpoint activate Oauth2 flow for provided API key header:

  • vcc_api_key api key with enabled Oauth2 body:
{
  "client_secret": <str>,
  "PKCE": <bool>,
  "redirect_uri": <str/optional>
}
{
    "message": "OAuth2 activated successfully"
}

/internal/snapshot

This POST endpoint saves or loads saved data about one API key (persistent storage about car and OAuth2 status) header:

  • vcc_api_key api key body: { "command": , "name": } legend:
  • command: load or save
  • name: It is a name about: Data is stored in snapshots.json it load at start and save every time one is created You can save a snapshots of one api key and use it in different one

/internal/scenario

This POST endpoint this scenario can be used for faster setting resetting statuses about car header:

  • vcc_api_key api key body: { "VIN": , "scenario": } legend:
  • scenario: name from scenario in scenario.json
  • VIN: the car VIN from the api key that you want to load the scenario about: Scenario is stored in scenarios.json. You can manual add or delete the scenario there. If scenarios.json is not valid JSON file then only default scenarios will be loaded

Errors

If an error is returned and it is not caused by missing data, the response will have the following format:

{ "error": {"message": "THIS IS INTERNAL API/<Error text>","description": <error description>"}}

Playground sites:

/internal/terminal

Shows what the websocket sends. Query:

  • VIN VIN of virtual vehicle you want to monitor
  • key api key

/

If public mode is active it will show a small page with GitHub and and compare app else it will redirect to the login page

/internal/welcome

The main dashboard for the playground simulator. It allows you to:

  • Generate a new API key or log in with an existing key.
  • Select a virtual vehicle and modify its attributes or live state.
  • Easily navigate to all other internal tools and endpoints.

Clone this wiki locally